ⓘ audio – audio stream NEW # T
An
audio
element represents an audio stream.
Permitted contents #
Transparent,
with the following specific structure:
Permitted attributes #
- ⓘ
global attributes
- Any attributes permitted globally.
- ⓘ
autoplay =
d:string "autoplay"
or d:string ""
#
- Instructs the UA to automatically begin playback of
the audio stream as soon as it can do so without
stopping.
- ⓘ
preload =
d:string "none"
or d:string "metadata"
or d:string "auto"
or d:string ""
#
- Represents a hint to the UA about whether optimistic
downloading of the audio stream itself or its
metadata is considered worthwhile.
- "none": Hints to the UA that the user
is not expected to need the audio stream, or that minimizing
unnecessary traffic is desirable.
- "metadata": Hints to the UA
that the user is not expected to need the audio stream,
but that fetching its metadata (duration and so on) is
desirable.
- "auto": Hints to the UA that
optimistically downloading the entire audio stream is
considered desirable.
Specifying the empty string is equivalent to specifying
the value "auto".
- ⓘ
controls =
d:string "controls"
or d:string ""
#
- Instructs the UA to expose a user interface for
controlling playback of the audio stream.
- ⓘ
loop =
d:string "loop" or d:string ""
#
- Instructs the UA to seek back to the start of the
audio stream upon reaching the end.
- ⓘ
mediagroup = string
#
- Instructs the UA to link multiple videos and/or audio streams
together.
- ⓘ
muted =
d:string "muted" or d:string ""
#
- Represents the default state of the audio stream,
potentially overriding user preferences.
- ⓘ
src =
non-empty URL potentially surrounded by spaces
#
- The URL for the audio stream.
Additional constraints and admonitions #
-
The interactive element “audio”
with the attribute “controls” must not
appear as a descendant of the “a” element.
-
The interactive element “audio”
with the attribute “controls” must not
appear as a descendant of the “button” element.
-
“audio” element has more than one “track”
child element with a “default” attribute.
Permitted parent elements #
any element that can contain
phrasing elements, any element that can contain
flow elements