MediaElement.js and FireFox
MediaElement.js and FireFox
我有这个简单的代码:
.HTML
<head>
<script src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
<script src="https://code.jquery.com/jquery-migrate-1.3.0.min.js"></script>
<script src="build/mediaelement-and-player.js"></script>
<link href="build/mediaelementplayer.css" rel="stylesheet">
<script src="main.js"></script>
</head>
<body>
<video id="video-player" preload="preload" autoplay="autoplay">
<source type="video/youtube" src="https://www.youtube.com/watch?v=q7o7R5BgWDY" />
</video>
</body>
.JS
$(function() {
$('video').mediaelementplayer();
});
我已将其与构建目录中 http://mediaelementjs.com/中的文件一起上传到我的服务器上。所有媒体元素文件都在构建目录中,而索引和 js 文件都在根目录中。
在Chrome中,这运行没有任何问题,在资源管理器/Edge中也是如此。但是FireFox不会运行它。具有所有控件的播放器加载,但视频无法播放,按下播放按钮也不起作用。Adobe Flash在尝试此操作时也在Firefox中启用。
在 jsfiddle http://jsfiddle.net/zE26G/27/中做了同样的例子在这里,jsfiddle中的视频在FireFox中运行,但不在Chrome/IE中运行。
Firebug 在这两个示例中都给出了这些警告:
不支持"视频/YouTube"的指定"类型"属性。负荷 的媒体资源 https://www.youtube.com/watch?v=q7o7R5BgWDY 失败。
"所有候选资源都无法加载。媒体加载已暂停。
虽然 Chrome 中的控制台不会给出任何错误。
这对我来说很奇怪。有人知道这里发生了什么吗?
这里已经报告了: https://github.com/johndyer/mediaelement/issues/1684
我遇到了类似的问题,并通过将库更新到最新版本进行了修复。
相关文章:
- javascript and css firefox issue
- 响应式设计适用于桌面浏览器、移动模拟器(Safari和Mozilla Firefox),但不适用于真正的智能手机(And
- Angular.js, iframes and Firefox
- contentEditable and lastChild IE, Firefox & Chrome LastC
- HTML5 playbackRate and Firefox
- HTML5 Audio, Web Audio API, CORS and Firefox
- MediaElement.js and FireFox
- setUninstallURL - in Safari and Firefox?
- TinyMCE and Firefox 11
- Ajax request and Firefox + Ghostery
- Onmousewheel event and Mozilla Firefox
- Eclipse JSDT Object Literal and firefox
- Prevent fouc in firefox and ie
- JavaScript, Doctype, and Firefox
- firefox and radialgradient (using html5 canvas)
- WebRTC Chrome and Firefox connection.setRemoteDescription
- innerHTML, <form> and Firefox
- Javascript validation (safari and firefox)
- foreignObject display:none in Firefox and Chrome
- Not working in Mozilla firefox and works fine in chrome $(