com.vaadin.ui
Class Audio

java.lang.Object
  extended by com.vaadin.terminal.AbstractClientConnector
      extended by com.vaadin.ui.AbstractComponent
          extended by com.vaadin.ui.AbstractMedia
              extended by com.vaadin.ui.Audio
All Implemented Interfaces:
MethodEventSource, Connector, ClientConnector, RpcTarget, Sizeable, Component, Serializable

public class Audio
extends AbstractMedia

The Audio component translates into an HTML5 <audio> element and as such is only supported in browsers that support HTML5 media markup. Browsers that do not support HTML5 display the text or HTML set by calling AbstractMedia.setAltText(String). A flash-player fallback can be implemented by setting HTML content allowed ( AbstractMedia.setHtmlContentAllowed(boolean) and calling AbstractMedia.setAltText(String) with the flash player markup. An example of flash fallback can be found at the Mozilla Developer Network. Multiple sources can be specified. Which of the sources is used is selected by the browser depending on which file formats it supports. See wikipedia for a table of formats supported by different browsers.

Since:
6.7.0
Author:
Vaadin Ltd
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.vaadin.ui.AbstractComponent
AbstractComponent.ComponentErrorEvent, AbstractComponent.ComponentErrorHandler
 
Nested classes/interfaces inherited from interface com.vaadin.ui.Component
Component.ErrorEvent, Component.ErrorListener, Component.Event, Component.Focusable, Component.Listener
 
Nested classes/interfaces inherited from interface com.vaadin.terminal.Sizeable
Sizeable.Unit
 
Field Summary
 
Fields inherited from interface com.vaadin.terminal.Sizeable
SIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS
 
Constructor Summary
Audio()
           
Audio(String caption)
           
Audio(String caption, Resource source)
           
 
Method Summary
 
Methods inherited from class com.vaadin.ui.AbstractMedia
addSource, getAltText, getSources, getState, isAutoplay, isHtmlContentAllowed, isMuted, isShowControls, pause, play, setAltText, setAutoplay, setHtmlContentAllowed, setMuted, setShowControls, setSource, setSources
 
Methods inherited from class com.vaadin.ui.AbstractComponent
addListener, addListener, addListener, addListener, addShortcutListener, addStyleName, attach, detach, findAncestor, fireComponentErrorEvent, fireComponentEvent, fireEvent, focus, getActionManager, getApplication, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorHandler, getErrorMessage, getHeight, getHeightUnits, getIcon, getListeners, getLocale, getParent, getRoot, getStyle, getStyleName, getWidth, getWidthUnits, handleError, hasListeners, isConnectorEnabled, isEnabled, isImmediate, isReadOnly, isVisible, removeListener, removeListener, removeListener, removeListener, removeListener, removeShortcutListener, removeStyleName, requestRepaint, setCaption, setComponentError, setData, setDebugId, setDescription, setEnabled, setErrorHandler, setHeight, setHeight, setIcon, setImmediate, setLocale, setParent, setReadOnly, setSizeFull, setSizeUndefined, setStyle, setStyleName, setVisible, setWidth, setWidth, updateState
 
Methods inherited from class com.vaadin.terminal.AbstractClientConnector
addExtension, addMethodInvocationToQueue, createState, getAllChildrenIterable, getConnectorId, getExtensions, getRpcManager, getRpcProxy, getStateType, registerRpc, registerRpc, removeExtension, requestRepaintAll, retrievePendingRpcCalls
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.vaadin.terminal.gwt.server.ClientConnector
getExtensions, getStateType, removeExtension, requestRepaintAll, retrievePendingRpcCalls
 
Methods inherited from interface com.vaadin.terminal.gwt.client.Connector
getConnectorId
 
Methods inherited from interface com.vaadin.terminal.gwt.server.RpcTarget
getRpcManager
 

Constructor Detail

Audio

public Audio()

Audio

public Audio(String caption)
Parameters:
caption - The caption of the audio component.

Audio

public Audio(String caption,
             Resource source)
Parameters:
caption - The caption of the audio component
source - The audio file to play.


Copyright © 2000-2011 Vaadin Ltd. All Rights Reserved.