Audio"
From Documentation
Raymondchao (talk | contribs) |
Raymondchao (talk | contribs) |
||
Line 23: | Line 23: | ||
= Multiple Sources= | = Multiple Sources= | ||
− | + | Most browsers do not support all the audio formats,so we could specify multiple source files in different formats for different browsers. For examples: | |
<source lang="xml" > | <source lang="xml" > | ||
<audio src="music.wav, music.mp3, music.ogg" controls="true"></audio> | <audio src="music.wav, music.mp3, music.ogg" controls="true"></audio> |
Revision as of 15:22, 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. Developers might be able to control the play of an audio by the play, stop and pause methods.
Example
<audio src="music.wav" controls="true"></audio>
The audio supports controls property since 7.0.0
Supports HTML5
The audio component has now been enhanced to support HTML 5, it includes the properties like autoplay, controls, loop, muted and preload.
[Since 7.0.0]
Multiple Sources
Most browsers do not support all the audio formats,so we could specify multiple source files in different formats for different browsers. For examples:
<audio src="music.wav, music.mp3, music.ogg" controls="true"></audio>
[Since 7.0.0]
Supported Events
None | None |
- Inherited Supported Events: XulElement
Supported Children
*NONE
Use Cases
Version | Description | Example Location |
---|---|---|
Version History
Version | Date | Content |
---|---|---|
7.0.0 | August, 2013 | Audio now supports HTML 5 |