我的视频播放器出现问题,现在我正在寻求帮助
Video.js无法在IE 9中播放视频(可能是10,我无法检查),所有其他浏览器都能正确显示视频
IE控制台显示以下错误:
日志:视频错误[对象对象]
HTML code:
<video class='video-js vjs-default-skin' controls data-setup='{"techOrder": ["flash", "html5", "links"]}' height='576' id='video_16' poster='/system/videos/file_previews/000/000/016/medium/1360091100-30.jpg?1360091101' preload='none' width='720'>
<source src='http://uklasi.com.ua/5-klas/matematika/koordinatniy-promin/16.mp4' type='video/mp4'>
<source src='http://uklasi.com.ua/5-klas/matematika/koordinatniy-promin/16.webm' type='video/webm'>
</video>
我的HTTP标头:
HTTP/1.1 200 OK
Server: nginx/1.2.6
Date: Sun, 10 Feb 2013 12:05:40 GMT
Content-Type: video/mp4
Content-Length: 41625464
Last-Modified: Tue, 05 Feb 2013 19:05:00 GMT
Connection: keep-alive
Content-Disposition: inline; filename="koordinatniy-promin-16"
Cache-Control: max-age=0, private, must-revalidate
Accept-Ranges: bytes
以前有人遇到过这个问题吗? :(
答案 0 :(得分:6)
我有一个类似的问题,mp4和IE9播放video.js - 这解决了它:
<script type="text/javascript" charset="utf-8">
//mvp - if it is IE9 - the first line tests for IE9 - then fall back to flash
if(navigator.userAgent.indexOf("Trident/5")>-1){
_V_.options.techOrder = ["flash"];
_V_.options.flash.swf = "tech/flash/video-js.swf";
}
</script>
基本上它会强制使用flash播放器,如果它检测到IE9 ......
MVP
...更新13年3月28日 IE10和video.js也没有工作..添加了另一个块来测试IE10使用: “Trident / 6”(而不是5),这迫使IE10也使用Flash。 视频再次播放!
还没试过IE11 ....