我看到其他几个与Firefox相关的线程没有正确呈现VideoJS的视频播放器并抛出“VideoError”。通过修改.htaccess文件以正确映射各种内容类型来解决大多数这些线程。我相信我已经排除了这个问题的根源。
这些是我到目前为止解决问题的步骤:
.mov
视频来源时:http://dev.muzioapp.com.s3-website-us-east-1.amazonaws.com/videoTest.html
.webm
视频来源:http://dev.muzioapp.com.s3-website-us-east-1.amazonaws.com/videoTest-noMov.html
标记(有多个来源):
<video id="vid-2" class="video-js vjs-muzio-skin">
<source type="video/mp4" src="http://dev.muzioapp.com.s3-website-us-east-1.amazonaws.com/content/ourMuzeVid1.mov" />
<source type="video/webm" src="http://dev.muzioapp.com.s3-website-us-east-1.amazonaws.com/content/ourMuzeVid1.webm" />
</video>
标记(仅包含.webm源代码):
<video id="vid-2" class="video-js vjs-muzio-skin">
<source type="video/webm" src="http://dev.muzioapp.com.s3-website-us-east-1.amazonaws.com/content/ourMuzeVid1.webm" />
</video>
JavaScript初始化VideoJS播放器:
<script type="text/javascript">
videojs('vid-2', {'controls': true, 'controls': true, 'autoplay': false, 'preload': 'auto', 'width': '800', 'height': '600'}, function() {});
</script>
我在Firefox控制台中看到的错误:
[17:59:46.293] ["Video Error", {type:"error", target:({}), currentTarget:({}), eventPhase:2, bubbles:false, cancelable:false, timeStamp:1372373986292000, defaultPrevented:false, stopPropagation:(function (){e.stopPropagation&&e.stopPropagation();a.cancelBubble=f;a.Ab=c}), preventDefault:(function (){e.preventDefault&&e.preventDefault();a.returnValue=l;a.yb=c}), initEvent:function initEvent() {
[native code]
}, stopImmediatePropagation:(function (){e.stopImmediatePropagation&&
e.stopImmediatePropagation();a.lc=c;a.stopPropagation()}), originalTarget:({}), explicitOriginalTarget:({}), preventBubble:function preventBubble() {
[native code]
}, preventCapture:function preventCapture() {
[native code]
}, getPreventDefault:function getPreventDefault() {
[native code]
}, isTrusted:true, NONE:0, CAPTURING_PHASE:1, AT_TARGET:2, BUBBLING_PHASE:3, MOUSEDOWN:1, MOUSEUP:2, MOUSEOVER:4, MOUSEOUT:8, MOUSEMOVE:16, MOUSEDRAG:32, CLICK:64, DBLCLICK:128, KEYDOWN:256, KEYUP:512, KEYPRESS:1024, DRAGDROP:2048, FOCUS:4096, BLUR:8192, SELECT:16384, CHANGE:32768, RESET:65536, SUBMIT:131072, SCROLL:262144, LOAD:524288, UNLOAD:1048576, XFER_DONE:2097152, ABORT:4194304, ERROR:8388608, LOCATE:16777216, MOVE:33554432, RESIZE:67108864, FORWARD:134217728, HELP:268435456, BACK:536870912, TEXT:1073741824, ALT_MASK:1, CONTROL_MASK:2, SHIFT_MASK:4, META_MASK:8, relatedTarget:(void 0), yb:function d(){return l}, Ab:function c(){return f}, lc:function d(){return l}, which:(void 0), cancelBubble:true}]
任何人都有任何想法会是什么问题?拥有.mp4 / .mov视频文件是此项目的要求,以支持所有基于webkit的浏览器,并且我不能使用Flash后备。我非常感谢任何帮助!!我已经筋疲力尽了我能想到的一切来解决这个问题。提前谢谢!
答案 0 :(得分:0)
HTML5 Firefox实施似乎不支持mov
个视频,我收到此错误:
Specified "type" attribute of "video/mp4" is not supported. Load of media resource http://dev.muzioapp.com.s3-website-us-east-1.amazonaws.com/content/ourMuzeVid1.mov failed.
关于这种(可能)混淆的解释在这里:https://stackoverflow.com/a/5080583/208067
当视频未嵌入为html5视频时,Firefox会寻找合适的插件来播放视频并找到QuickTime。 video
标记没有。
答案 1 :(得分:0)
我遇到了类似的问题。这是由于视频转换器没有正确编码视频。最后我决定使用YouTube。尝试另一个视频转换器。除此之外,.mov
是QuickTime,请尝试.mp4
。