HTML5 Guidelines for Web Developers

(coco) #1
4.6 Interim Solutions for Older Browsers 85

4.6.2 html5media


The JavaScript library html5media works even more reservedly than mwEmbed
and only takes action if the browser cannot play any of the specified video for-
mats. In that case, it loads the open-source Flash Video Player Flowplayer and
expects an MP4 (H.264) video as input. Unfortunately, the library contains a bug
in the current version, which means that older browsers return a JavaScript error
and output nothing if several source elements are specified:


<!DOCTYPE html>




html5media fallback



html5media fallback





In this case it is important to specify the width and height; otherwise, the Flow-
player will be displayed with a height of only a few pixels. Figure 4.8 provides an
example.


Figure 4.8 A video in Internet Explorer 8 playing on the free Flowplayer (Flash fallback)

Free download pdf