The media source
specifies the location of an audio or video resource.
Syntax
The syntax for representing this
component varies depending on the authoring format:
Authoring format
Syntax and example
XDITA
<media-source>
<audio autoplay="false" controls="true" loop="false"
muted="false">
<desc>Theme song for the LwDITA podcast</desc>
<fallback>
<p>The theme song is not available.</p>
</fallback>
<media-source href="theme-song.mp3"/>
<media-track srclang="en" href="theme-song.vtt"/>
</audio>
HDITA
<source>
<audio title="Theme song for the LwDITA podcast" controls>
<source src="theme-song.mp3">
<track src="theme-song.vtt" kind="captions" srclang="en">
<p data-class="fallback">The theme song is not available.</p>
</audio>
MDITA
There is no specific support in the MDITA core
profile. If needed, use an HDITA snippet.
Usage information
The media source is modeled on the
<source> element used in HTML5 media
elements.
Rendering expectations
When multiple <media-source> components are
present, the user agent evaluates them in document order and selects the first resource that
can be played.
Attributes
The available attributes vary based on the
authoring format:
For the MDITA core profile, the equivalent
of the XDITA @keyref attribute is supported. For
the MDITA extended profile, attributes can be specified by using
the HDITA representation.