firefox冻结HTML5视频,不会降级为闪存

时间:2011-01-19 01:21:38

标签: javascript firefox mime html5-video

我正在使用Video JS播放器播放视频。在Firefox中,一切都很棒。我已经阅读了很多关于HTML5视频的问题并且具有正确的MIME类型。在测试Video JS播放器时,它与源视频一起正常工作,而不是我的。这是因为我的服务器不支持MIME类型,还是我的代码中有错误?

谢谢!

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:

    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
});

1 个答案:

答案 0 :(得分:1)

尝试将这些内容放入.htaccecss文件

AddType video / mp4 .mp4

AddType video / ogg .ogv

AddType video / webm .webm