1
我使用Video JS播放器播放視頻。在Firefox中,一切都非常棒。我已閱讀了很多有關HTML5視頻的問題,並且具有正確的MIME類型。在測試Video JS播放器時,它能夠正確處理源視頻,而不是我的視頻。這是因爲我的服務器不支持MIME類型,或者我的代碼中有錯誤嗎?不會降級到Flash的Firefox 5凍結HTML5視頻
謝謝!
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
});