简体   繁体   English

firefox冻结的HTML5视频,不会降级为Flash

[英]firefox frozen HTML5 video that will not downgrade to flash

I'm using the Video JS player to play a video. 我正在使用Video JS播放器播放视频。 Everything is great excpet for in Firefox. 一切都是Firefox的绝佳选择。 I've read a lot about it's issues with HTML5 video and having the correct MIME type. 我已经阅读了很多有关HTML5视频和具有正确MIME类型的问题。 When testing the Video JS player, it worked correctly with their sourced video, and not mine. 测试Video JS播放器时,它可以正确处理其来源的视频,而不是我的视频。 Is this because my server doesn't support the MIME type, or is there a mistake in my code? 这是因为我的服务器不支持MIME类型,还是我的代码有错误?

Thanks! 谢谢!

HTML: HTML:

<video id="example_video_1" class="video-js" width="780" height="520" autoplay="auto" loop="loop" poster="Images/home.jpg"> 
            <source src="Video/fernando.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' /> 
            <source src="Video/fernando.webm" type='video/webm; codecs="vp8, vorbis"' /> 
            <source src="Video/fernando.ogv" type='video/ogg; codecs="theora, vorbis"' /> 
        <!-- Flash Fallback -->
            <object id="flash_fallback_1" class="vjs-flash-fallback" width="780" height="520" type="application/x-shockwave-flash" data="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf"> 
                <param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf" /> 
                <param name="allowfullscreen" value="false" /> 
                <param name="flashvars" value='config={"playlist":["Images/home.jpg", {"url": "Video/fernando.mp4","autoPlay":true,"autoBuffering":true, onBeforeFinish: function() { return false; }, wmode: 'opaque'}]}' /> 
                <img src="Images/home.jpg" width="780" height="520" alt="Poster Image" title="No video playback capabilities." /> 
            </object> 
        </video> 

Javascript: Javascript:

    VideoJS.setupAllWhenReady({
    controlsBelow: false, // Display control bar below video instead of in front of
    controlsHiding: true, // Hide controls when mouse is not over the video
    defaultVolume: 0.85, // Will be overridden by user's last volume if available
    flashVersion: 9, // Required flash version for fallback
    linksHiding: true // Hide download links when video is supported
});

Try putting these in your .htaccecss file 尝试将它们放在您的.htaccecss文件中

AddType video/mp4 .mp4 AddType video / mp4 .mp4

AddType video/ogg .ogv AddType video / ogg .ogv

AddType video/webm .webm AddType video / webm .webm

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM