mediaelement.js:未完全预加载时,在 Firefox 中不可能寻找特定时间
我有问题,如果使用 Firefox (10.0.2) 时文件未完全预加载(我想要跳转的位置已预加载),我无法将音频文件 (mp3) 查找到特定位置,在 Safari 中此工作完美无瑕。
这是正常现象还是我必须更改服务器端的某些内容或 mediaelement.js 的错误?如果我使用 jPlayer 而不是 mediaelement.js,它也适用于 Firefox(在此处查看:http://jplayer.org/latest/demo-01/?theme=0)
但我更喜欢 mediaelement.js,因为即使禁用了 javascript,它也具有 HTML5 语法。提前致谢!
问候 伯恩哈德
I have the problem, that I can not seek an audio file (mp3) to a specific position if the file is not completely preloaded when using Firefox (10.0.2) (the position I want to jump is already preloaded), in Safari this works flawless.
Is this normal or do I have to change something on the server side or a bug of mediaelement.js? If I use jPlayer instead of mediaelement.js, it also works on Firefox (check it out here: http://jplayer.org/latest/demo-01/?theme=0)
But I’d prefer mediaelement.js because it has HTML5 syntax even if javascript is disabled. Thanks in advance!
Regards
Bernhard
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
快速浏览一下,您发布的 JPlayer 示例似乎提供了 M4A 和 OGG 音频文件,而不是 MP3。提供 OGG 源意味着 Firefox 将使用其原生 HTML5 功能。 HTML5 规范包括媒体文件中的渐进式下载和随机跳转(如果网络服务器有适当的模块,我认为这或多或少是 Apache 和 IIS 中的内置功能)。
但是,您想要使用 MP3,而 Firefox 本身并不支持 MP3,这意味着 MediaElementJS 将回退到 Flash 解决方案。而且他们的插件不允许渐进式下载,除非您使用 RTMP 协议而不是 HTTP。反过来,这意味着您需要 Flash Media Server 或任何提供 RTMP 的替代方案:
http://blog.denivip.ru/index.php/2011/02/flash-media-server-and-its-alternatives/?lang=en
而且,当你拥有它时,你需要不要原谅在 URL 中的文件名前面添加“mp3:”。前段时间在这里查看我自己的问题,以及我最终如何解决它:
根据浏览器功能替换 MediaElementsJS 中的媒体源(http 为 rtmp)
希望这会有所帮助。
In a quick view, it seems that the JPlayer example you've posted provides both M4A and OGG audio files, not MP3. Providing an OGG source means that Firefox will use its native HTML5 capabilities. And the HTML5 specification includes progressive download and random jumping in the media file (if the webserver has the appropiate module, which is more or less a built-in feature in Apache and IIS, I think).
However, you want to use MP3, which is NOT natively supported by Firefox, which means that MediaElementJS will fallback to the Flash solution. And their plugin does not allow progressive download unless you're using RTMP protocol instead of HTTP. This, in turn, implies you need Flash Media Server or any alternative providing RTMP:
http://blog.denivip.ru/index.php/2011/02/flash-media-server-and-its-alternatives/?lang=en
And, when you have that, you need to not forgive to prepend "mp3:" to the filename in the URL. See my own question here some time ago, and how I finally solve it:
Replacing media source (http with rtmp) in MediaElementsJS based on browser capabilities
Hope this helps.