【问题标题】:firefox frozen HTML5 video that will not downgrade to flashFirefox 冻结的 HTML5 视频不会降级为 Flash
【发布时间】:2011-06-11 11:29:08
【问题描述】:

我正在使用 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
});

【问题讨论】:

    标签: javascript firefox mime html5-video


    【解决方案1】:

    试着把这些放在你的 .htaccecss 文件中

    AddType video/mp4 .mp4

    AddType video/ogg .ogv

    AddType video/webm .webm

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-05-08
      • 1970-01-01
      • 1970-01-01
      • 2014-04-04
      • 1970-01-01
      • 2011-07-04
      • 2015-09-25
      相关资源
      最近更新 更多