视频回退到Flash在Firefox中不起作用 [英] Video Fallback to Flash not working in Firefox

查看:115
本文介绍了视频回退到Flash在Firefox中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我使用虚拟视频来测试这个测试代码:

 < video width =944height =532controls preload =autoposter =imgs / vidPosterImg.jpg> 
< source src =videos / 2010reel.mp4type =video / mp4/>
< source src =videos / 2010reelogg.ogvtype ='video / ogg; codecs =theora,vorbis'>

< object width =320height =240type =application / x-shockwave-flash
data =flash / mainsceen.swf>
< param name =movievalue =flash / mainsceen.swf/>
< param name =allowfullscreenvalue =true/>
< / object>

< object type =application / x-shockwave-flashdata =flash / mainsceen.swfwidth =944height =532>
< param name =movievalue =flash / mainsceen.swf>
< param name =allowFullScreenvalue =true/>
< param name =allowscriptaccessvalue =always>
< / object>




< / video>

mp4的作品和ogv可以在Firefox中使用。但是Flash并没有。



另外,在Safari中,当元数据加载时,海报图像似乎被跳到视频的第一帧。解决方案:WP4在Firefox中不起作用,只支持OGG。您必须通过删除WP4和OGG源在Firefox中进行测试。如果您已经离开了OGG源代码,那么至少应该使用HTML5。


Firefox只会播放Ogg(WebM在Firefox 4中也支持),
如果没有兼容Firefox的视频
文件,它将不会降级到Flash。


因此,必须存在一个ogg源才能使闪回效果起作用。你必须相信它的工作原理。这就是FireFox浏览器解析视频元素的方式 - 如果它没有看到ogg源,那么它将不会到达闪回回退,并且回退将显示为中断。



如果您需要测试闪回回退是否正常工作,则必须移除其周围的视频和源代码,以便浏览器别无选择,只能运行闪回视频。

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.

解决方案

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.

这篇关于视频回退到Flash在Firefox中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆