|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecteu.webtoolkit.jwt.WObject
eu.webtoolkit.jwt.WWidget
eu.webtoolkit.jwt.WWebWidget
eu.webtoolkit.jwt.WInteractWidget
eu.webtoolkit.jwt.WAbstractMedia
eu.webtoolkit.jwt.WAudio
public class WAudio
A widget that plays audio.
This is a low-level widget, mapping directly onto a
<audio> element available in HTML5 compliant browsers.
In almost every situation you should use the WMediaPlayer widget if
you want the user to be able to interact with the audio, or WSound
for simple sound feed-back.
Usage of the audio element consists of adding one or more audio sources and setting some options. Since not every browser supports HTML5 audio, the class provides a mechanism to display alternative content in browsers that cannot play the video.
There are two reasons why the a browser may use the alternative content: either because the browser does not support the HTML5 audio tag (alternative content is displayed even when JavaScript is not available), or because none of the specified sources contain an audio format that is understood by the browser (requires JavaScript to display the alternative content).
The WAbstractMedia#addSource() and
WAbstractMedia#setAlternativeContent() may not be called after the widget is
rendered.
WMediaPlayer| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class eu.webtoolkit.jwt.WAbstractMedia |
|---|
WAbstractMedia.Options, WAbstractMedia.PreloadMode, WAbstractMedia.ReadyState |
| Constructor Summary | |
|---|---|
WAudio()
Creates a audio widget. |
|
WAudio(WContainerWidget parent)
Creates a audio widget. |
|
| Method Summary | |
|---|---|
java.lang.String |
getJsAudioRef()
Returns the JavaScript reference to the audio object, or null. |
| Methods inherited from class eu.webtoolkit.jwt.WAbstractMedia |
|---|
addSource, addSource, addSource, clearSources, ended, getJsMediaRef, getOptions, getPreloadMode, getReadyState, isPlaying, pause, play, playbackPaused, playbackStarted, remove, setAlternativeContent, setOptions, setOptions, setPreloadMode, timeUpdated, volumeChanged |
| Methods inherited from class eu.webtoolkit.jwt.WInteractWidget |
|---|
clicked, doubleClicked, enterPressed, escapePressed, gestureChanged, gestureEnded, gestureStarted, isEnabled, keyPressed, keyWentDown, keyWentUp, load, mouseDragged, mouseMoved, mouseWentDown, mouseWentOut, mouseWentOver, mouseWentUp, mouseWheel, propagateSetEnabled, setDraggable, setDraggable, setDraggable, setDraggable, touchEnded, touchMoved, touchStarted |
| Methods inherited from class eu.webtoolkit.jwt.WWidget |
|---|
acceptDrops, acceptDrops, addCssRule, addCssRule, addStyleClass, animateHide, animateShow, boxBorder, boxPadding, containsExposed, disable, dropEvent, enable, getDrop, getJsRef, getParent, hide, htmlText, isLayoutSizeAware, layoutSizeChanged, positionAt, positionAt, removeStyleClass, resize, setClearSides, setHeight, setHidden, setLayoutSizeAware, setMargin, setMargin, setMargin, setMargin, setMargin, setOffsets, setOffsets, setOffsets, setOffsets, setOffsets, setToolTip, setVerticalAlignment, setWidth, show, stopAcceptDrops, toggleStyleClass, toggleStyleClass, tr |
| Methods inherited from class eu.webtoolkit.jwt.WObject |
|---|
addChild, getObjectName, setObjectName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WAudio(WContainerWidget parent)
A freshly constructed Audio widget has no media sources, no options, and has preload mode set to PreloadAuto.
public WAudio()
Calls this((WContainerWidget)null)
| Method Detail |
|---|
public java.lang.String getJsAudioRef()
It is possible, for browser compatibility reasons, that
WWidget#getJsRef() is not the HTML5 audio
element. getJsAudioRef() is guaranteed to
be an expression that evaluates to the media object. This expression may
yield null, if the video object is not rendered at all (e.g. on older
versions of Internet Explorer).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||