HTML and CSS Reference
In-Depth Information
Media groups
The mediagroup attribute aims to support grouping videos or video tracks together
so that they all may be controlled at the same time as a group. It has yet to gain browser
support, however when it does, the idea is this: imagine a particular video presentation
that also has an accompanying video with a sign language interpretation of the video's
audio. When the main video is played, the sign language video should play as well. The
mediagroup attribute ties these two videos together so the browser knows that if one
plays, the other should play at the same time. This could mean the two videos are separ-
ate video files embedded on the same page, or it could mean that each video is contained
in a video track. Remember that the video format is a container format, meaning it con-
tains at least two types of media: a video track and an audio track. As a container format,
additional video and audio tracks can be embedded in a single file. Using the previous
example, a particular video may have a video and audio track for the main presentation
but have the sign language video as a second video track. In such a scenario, two video
elements may appear on the page, with each one accessing a different video track on the
same video source file. The playback of the two videos is then tied together by having
the same name set in their mediagroup attribute.
This attribute provides powerful possibilities for video broadcasting on the Web, so
keep your eyes on its further development and implementation!
Note Silvia Pfeiffer, author of The Definitive Guide to HTML5 Video (Apress), has
a great summary of how this attribute might be used on her blog at this address: ht-
tp://blog.gingertech.net/2011/05/01/html5-multi-track-
audio-or-video/ .
Audio
Audio in HTML5 admittedly has a fair way to go. Having control over audio on a web
page on par with what Adobe Flash is able to do 10 is an active part of development at
the moment. 11 Basic audio, allowing the user to start, stop, and adjust the volume of
an audio clip, is available using the new audio element. This element is really just
the video element without the moving image portion. The controls look like the con-
trols created by the browser; for example, compare Figure 5-8 to Figure 5-7 . It has the
following attributes, all of which should be familiar from reading the “Video” section:
src , preload , autoplay , loop , muted , controls , crossorigin , and me-
diagroup . Also like the video element, audio supports the source element and
Search WWH ::




Custom Search