如何让播放器在更多浏览器中播放 [英] How to get the player to play in more browsers
问题描述
我设置了 video.js 播放器,但播放器没有出现在 IE8 中,它确实出现并在 IE10 中播放(也可能是 IE9).它在 Chrome 和 IOS 中出现并播放,但仅在 Firefox 中出现(不播放).
I the video.js player set up, but the Player doesn't appear in IE8, it does appear and play in IE10 (proably IE9 too). It appears and plays in Chrome and IOS, but only appears in Firefox (doesn't play)..
<script>
_V_.options.flash.swf = "http://theurl.com/video-js/video.js.swf"
</script>
<script>
videojs.options.flash.swf = "http://url.com/video-js/video.js.swf"
</script>
<video id=".mp4" class="video-js vjs-default-skin"
controls preload="none" width="640" height="264"
poster="[var.base_url]/[var.thumb_file]"
data-setup='{"example_option":true}'>
<source src="http://url.com/uploads/YfGNOH0ek3aSkGJll3Ml_1200k.mp4"
type='video/mp4' />
</video>
你能提供一些帮助,让它在大多数浏览器中出现和播放吗?谢谢
Can you provide some help so it appears and plays in most browsers? Thanks
推荐答案
此示例是否适用于所有这些浏览器?
http://jsbin.com/okofet/1/edit
(它对我有用)
Does this example work in all those browsers for you?
http://jsbin.com/okofet/1/edit
(it does for me)
尝试将所有 标签替换为:
Try replacing all your <script>
tags with:
<link href="http://vjs.zencdn.net/4.0/video-js.css" rel="stylesheet">
<script src="http://vjs.zencdn.net/4.0/video.js"></script>
(您可能还需要一个与.mp4"不同的 ID.我不确定这是否有效)
(You might also want a different id than '.mp4'. I'm not sure if that's valid)
这篇关于如何让播放器在更多浏览器中播放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!