public class Audio extends XulElement
An extension to XUL. Only works for browsers supporting HTML5 audio tag (since ZK 7.0.0).
Modifier and Type | Class and Description |
---|---|
protected class |
Audio.ExtraCtrl
A utility class to implement
HtmlBasedComponent.getExtraCtrl() . |
AbstractComponent.Children
Modifier and Type | Field and Description |
---|---|
protected java.util.List<java.lang.String> |
_src |
_zclass
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
AFTER_CHILD_ADDED, AFTER_CHILD_REMOVED, AFTER_PAGE_ATTACHED, AFTER_PAGE_DETACHED, CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE
Modifier and Type | Method and Description |
---|---|
Audio |
getContent()
Returns the content set by
setContent(org.zkoss.sound.Audio) . |
java.lang.Object |
getExtraCtrl()
Returns the client control for this component.
|
java.lang.String |
getPreload()
Returns whether and how the audio should be loaded.
|
java.util.List<java.lang.String> |
getSrc()
Returns the src.
|
boolean |
isAutoplay()
Returns whether to auto start playing the audio.
|
boolean |
isAutostart()
Deprecated.
As of release 7.0.0, use
isAutoplay() instead. |
protected boolean |
isChildable()
Default: not childable.
|
boolean |
isControls()
Returns whether to display the audio controls.
|
boolean |
isLoop()
Returns whether to play the audio repeatedly.
|
boolean |
isMuted()
Returns whether to mute the audio.
|
void |
pause()
Pauses the audio at the client.
|
void |
play()
Plays the audio at the client.
|
protected void |
renderProperties(ContentRenderer renderer)
Renders the content of this component, excluding the enclosing
tags and children.
|
void |
setAutoplay(boolean autoplay)
Sets whether to auto start playing the audio.
|
void |
setAutostart(boolean autostart)
Deprecated.
As of release 7.0.0, use
setAutoplay(boolean) instead. |
void |
setContent(Audio audio)
Sets the content directly.
|
void |
setControls(boolean controls)
Sets whether to display the audio controls.
|
void |
setLoop(boolean loop)
Sets whether to play the audio repeatedly.
|
void |
setMuted(boolean muted)
Sets whether to mute the audio.
|
void |
setPreload(java.lang.String preload)
Sets whether and how the audio should be loaded.
|
void |
setSrc(java.util.List<java.lang.String> src)
Sets the source list.
|
void |
setSrc(java.lang.String src)
Sets the src.
|
void |
stop()
Stops the audio at the client.
|
clone, getContext, getCtrlKeys, getPopup, getPropertyAccess, getTooltip, setContext, setContext, setContextAttributes, setCtrlKeys, setPopup, setPopup, setPopupAttributes, setTooltip, setTooltip, setTooltipAttributes
focus, getAction, getDraggable, getDroppable, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZindex, getZIndex, service, setAction, setClass, setDraggable, setDroppable, setFocus, setHeight, setHeight0, setHeightDirectly, setHflex, setHflex0, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setStyle, setTabindex, setTabindex, setTooltiptext, setTop, setTopDirectly, setVflex, setVflex0, setVflexDirectly, setWidth, setWidth0, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectly
addAnnotation, addAnnotation, addCallback, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, enableBindingAnnotation, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getCallback, getChildren, getClientAttribute, getClientDataAttribute, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, insertBefore, invalidate, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, replace, response, response, response, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setSubBindingAnnotationCount, setTemplate, setVisible, setVisibleDirectly, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerialize
public void play()
public void stop()
public void pause()
public java.util.List<java.lang.String> getSrc()
Default: [].
public void setSrc(java.lang.String src)
Calling this method implies setContent(null).
In other words, the last invocation of setSrc(java.lang.String)
overrides
the previous setContent(org.zkoss.sound.Audio)
, if any.
setContent(org.zkoss.sound.Audio)
public void setSrc(java.util.List<java.lang.String> src)
public boolean isAutostart()
isAutoplay()
instead.Default: false;
public void setAutostart(boolean autostart)
setAutoplay(boolean)
instead.public boolean isAutoplay()
Default: false.
public void setAutoplay(boolean autoplay)
public java.lang.String getPreload()
Default: null.
public void setPreload(java.lang.String preload)
preload
- which could be one of "none", "metadata", "auto".public boolean isControls()
Default: false.
public void setControls(boolean controls)
public boolean isLoop()
Default: false.
public void setLoop(boolean loop)
public boolean isMuted()
Default: false.
public void setMuted(boolean muted)
public void setContent(Audio audio)
Default: null.
Calling this method implies setSrc(null).
In other words, the last invocation of setContent(org.zkoss.sound.Audio)
overrides
the previous setSrc(java.lang.String)
, if any.
Note: setContent doesn't support in Chrome.
audio
- the audio to display.setSrc(java.lang.String)
public Audio getContent()
setContent(org.zkoss.sound.Audio)
.
Note: it won't fetch what is set thru by setSrc(java.lang.String)
.
It simply returns what is passed to setContent(org.zkoss.sound.Audio)
.
protected void renderProperties(ContentRenderer renderer) throws java.io.IOException
HtmlBasedComponent
renderProperties
in class XulElement
java.io.IOException
protected boolean isChildable()
isChildable
in class AbstractComponent
public java.lang.Object getExtraCtrl()
HtmlBasedComponent
Default: creates an instance of HtmlBasedComponent.ExtraCtrl
.
getExtraCtrl
in interface ComponentCtrl
getExtraCtrl
in class HtmlBasedComponent
Cropper
.ComponentCtrl.getExtraCtrl()
Copyright © 2005-2018 Potix Corporation. All Rights Reserved.