Audio"
From Documentation
Raymondchao (talk | contribs) |
Raymondchao (talk | contribs) |
||
Line 10: | Line 10: | ||
An <tt>audio</tt> component is used to play the audio at the browser. Like <tt>image</tt>, you could use the <tt>src</tt> property to specify an URL of an audio resource, or the <tt>setContent</tt> method to specify a dynamically generated audio. | An <tt>audio</tt> component is used to play the audio at the browser. Like <tt>image</tt>, you could use the <tt>src</tt> property to specify an URL of an audio resource, or the <tt>setContent</tt> method to specify a dynamically generated audio. | ||
− | Since ZK 7.0.0 | + | [Since ZK 7.0.0] |
the <tt>audio</tt> only works for browsers supporting HTML5 audio tag, it supports the properties like <tt>autoplay</tt>, <tt>controls</tt>, <tt>loop</tt>, <tt>muted</tt> and <tt>preload</tt>, and it could have multiple <tt>src</tt> attributes. Developers might be able to control the play of an audio by the <tt>play</tt>, <tt>stop</tt> and <tt>pause</tt> methods. | the <tt>audio</tt> only works for browsers supporting HTML5 audio tag, it supports the properties like <tt>autoplay</tt>, <tt>controls</tt>, <tt>loop</tt>, <tt>muted</tt> and <tt>preload</tt>, and it could have multiple <tt>src</tt> attributes. Developers might be able to control the play of an audio by the <tt>play</tt>, <tt>stop</tt> and <tt>pause</tt> methods. | ||
Revision as of 10:05, 22 October 2013
Audio
Employment/Purpose
An audio component is used to play the audio at the browser. Like image, you could use the src property to specify an URL of an audio resource, or the setContent method to specify a dynamically generated audio.
[Since ZK 7.0.0]
the audio only works for browsers supporting HTML5 audio tag, it supports the properties like autoplay, controls, loop, muted and preload, and it could have multiple src attributes. Developers might be able to control the play of an audio by the play, stop and pause methods.
Example
<audio id="audio" src="music.wav, music.mp3, backup.ogg" controls="true"></audio>
Supported Events
None | None |
- Inherited Supported Events: XulElement
Supported Children
*NONE
Use Cases
Version | Description | Example Location |
---|---|---|
Version History
Version | Date | Content |
---|---|---|