Reputation: 31
I've been reviewing material on different ways developers are adding Flash fallback to their HTML5 sites.
I have this test code with dummy video:
<video width="944" height="532" controls preload="auto" poster="imgs/vidPosterImg.jpg">
<source src="videos/2010reel.mp4" type="video/mp4" />
<source src="videos/2010reelogg.ogv" type='video/ogg; codecs="theora, vorbis"'>
<embed src="flash/mainsceen.swf" type="application/x-shockwave-flash" width="944" height="531" allowscriptaccess="always" allowfullscreen="true"></embed>
<object width="320" height="240" type="application/x-shockwave-flash"
data="flash/mainsceen.swf">
<param name="movie" value="flash/mainsceen.swf" />
<param name="allowfullscreen" value="true" />
</object>
<object type="application/x-shockwave-flash" data="flash/mainsceen.swf" width="944" height="532">
<param name="movie" value="flash/mainsceen.swf">
<param name="allowFullScreen" value="true" />
<param name="allowscriptaccess" value="always">
</object>
</video>
The mp4 works and the ogv works in Firefox. but Flash does not.
Also, in Safari, the poster image seems to be skipped over to the videos first frame when on metadata load.
Upvotes: 3
Views: 2322
Reputation: 10763
Correction, WP4 does not work in Firefox, only OGG is supported. You must have tested in Firefox by removing both the WP4 and OGG sources. If you had left the OGG source it would have at least played using HTML5.
Video For Everybody (Video Encode section) states:
Firefox will only play Ogg (WebM is also supported in Firefox 4), and it will not degrade to Flash if there is no Firefox-compatible video file.
Therefore, an ogg source must be present in order for the flash fallback to work. You have to just trust that it works. This is just how the FireFox browser parses video elements - if it does not see an ogg source, then it will not reach the flash fallback and your fallback will appear to be broken.
If you need to test that the flash fallback works, you must remove the video and source tags around it so that the browser has no choice but to run the flash video.
Upvotes: 5