HTML and CSS Reference
In-Depth Information
After the list of video sources, additional fallback content can be provided to handle
cases where the video element itself is not supported. For instance, the object ele-
ment could be included to provide a fallback to Flash video:
<video width="320" height="240">
<source src="trailer.webm" type='video/webm; co-
decs="vp8, vorbis"' />
<source src="trailer.mp4" type='video/mp4; codec-
s="avc1.4D401E, mp4a.40.2"' />
<source src="trailer.ogv" type='video/ogg; codec-
s="theora, vorbis"' />
<object type="application/x-shockwave-flash"
data="videoplayer.swf" width="320"
Note I've simplified the Flash embed code shown here for brevity; in practice this
would likely be more verbose, definitely so if you use the HTML wrapper gener-
ated by the Adobe Flash IDE, which contains additional parameters and formatting to
handle idiosyncrasies across different browsers. Specifically, Internet Explorer is no-
torious for not handling the data attribute like other browsers and instead requires that
the SWF be defined in a nested param element, like so: <param name="movie"
value="videoplayer.swf" /> .
While an additional SWF file would be included to provide a video player that would
handle the Flash video, thankfully a fourth copy of the video file would not need to be
created. Flash conveniently supports the H.264 video format, so it will be able to play
the existing MPEG-4 video.
Note For a great Flash video player, check out the one provided by the Open
Source Media Framework. It can even be configured directly in the browser: .
Further fallback can be added; for example, a poster image (a still image in place of
the video) could be added, followed by a text fallback. For extra accessibility in the text
fallback, links can be added to allow the video files to be downloaded. Since object
can contain fallback content like video , this additional fallback content is placed in
object , but it could be placed below the video source list if object were not in-
Search WWH ::

Custom Search