HTML and CSS Reference
Chapter . Media
The area most in flux in relation to the new media elements has to do with synchronized media
playback, multiple audio, video, and text tracks, and media element accessibility. As to be ex-
pected, these areas also have the least implementation support.
A new addition to the HTML5 media elements is the new media controller object. This object
provides for synchronized playback among multiple audio and video elements in a web page.
When implemented, we should be able to play video and/or audio files in multiple elements
in the web page via one controller user interface.
Another new addition is support for multiple audio and video tracks within the media re-
source. When this functionality is implemented, we should be able to pick from among a list
of audio tracks in different languages, play director commentary along with the video, or en-
joy picture-in-picture support.
There's also browser support for multiple text tracks, too. Currently, browsers parse the track
element and it becomes part of the Document Object Model (DOM), but no browser yet pro-
cesses the track element's contents and provides the caption or subtitle text. Happily, though,
ments, giving us at least some interim functionality, as we'll see at the end of the chapter.
No firm commitment has been made—either in the W3C or by the browser makers—as to
what text format to support for text tracks. There are multiple subtitle and caption formats cur-
rently in use with video files, such as SubRip (SRT), but none of them provide the additional
functionality many believe is needed for web-based media players. There are also parallel,
and somewhat competitive, efforts to define what this format is going to be, though there is a
possibility user agents will need to support more than one text track format.
So, welcome to the chaotic side of the HTML media elements.
Media Controllers and the MediaController Interface
A new attribute, mediagroup , has been added to the audio and video element specification.
This attribute is used to group media elements together so their playback is synchronized. The
existence of mediagroup attribute generates an instance of a mediacontrollerthat controls the
various media resources' playback..
How would something like a media controller work? One possible use case is a single video
with a separate audio resource, as well as a separate sign language video. Only one of the ele-