21 lines
1.1 KiB
Plaintext
21 lines
1.1 KiB
Plaintext
The HTML <audio> element is used to embed sound content in documents. It may contain several audio sources, represented using the src attribute or the <source> element; the browser will choose the most suitable one.
|
|
|
|
Fallback content for browser not supporting the <audio> element can be added too.
|
|
|
|
You can use the enhanced audio API features — which are Gecko-specific — to directly generate and manipulate audio streams from JavaScript code. See Introducing the audio API extension for details.
|
|
|
|
Content categories:
|
|
Flow content, phrasing content, embedded content. If it has a controls attribute: interactive content and palpable content.
|
|
|
|
Permitted content:
|
|
If the element has a src attribute: zero or more <track> element, followed by transparent content that contains no media elements, that is no <audio> or <video>
|
|
Else: zero or more <source> element, followed by zero or more <track> element, followed by transparent content that contains no media elements, that is no <audio> or <video>.
|
|
|
|
Tag omission:
|
|
None, both the starting and ending tag are mandatory.
|
|
|
|
Permitted parent elements:
|
|
Any element that accepts embedded content.
|
|
|
|
DOM interface:
|
|
HTMLAudioElement |