|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.zkoss.zk.ui.AbstractComponent org.zkoss.zk.ui.HtmlBasedComponent org.zkoss.zul.impl.XulElement org.zkoss.zul.Audio
public class Audio
An audio clip.
An extension to XUL. Only works for browsers supporting HTML5 audio tag (since ZK 7.0.0).
Nested Class Summary | |
---|---|
protected class |
Audio.ExtraCtrl
A utility class to implement HtmlBasedComponent.getExtraCtrl() . |
Nested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent |
---|
AbstractComponent.Children |
Field Summary | |
---|---|
protected java.util.List<java.lang.String> |
_src
|
Fields inherited from class org.zkoss.zk.ui.HtmlBasedComponent |
---|
_zclass |
Fields inherited from interface org.zkoss.zk.ui.Component |
---|
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE |
Fields inherited from interface org.zkoss.zk.ui.sys.ComponentCtrl |
---|
CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE |
Constructor Summary | |
---|---|
Audio()
|
|
Audio(java.lang.String src)
|
Method Summary | |
---|---|
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. |
Methods inherited from class org.zkoss.zul.impl.XulElement |
---|
clone, getContext, getCtrlKeys, getPopup, getTooltip, setContext, setContext, setCtrlKeys, setPopup, setPopup, setTooltip, setTooltip |
Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent |
---|
focus, getAction, getDraggable, getDroppable, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZindex, getZIndex, service, setAction, setClass, setDraggable, setDroppable, setFocus, setHeight, setHeightDirectly, setHflex, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setStyle, setTooltiptext, setTop, setTopDirectly, setVflex, setWidth, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectly |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.util.List<java.lang.String> _src
Constructor Detail |
---|
public Audio()
public Audio(java.lang.String src)
Method Detail |
---|
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
See also ZK Client-side Reference: Property Rendering
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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |