Firefox、Safari 的 MediaElement 问题
我在尝试在同时使用 dojo(主要 JS 框架)和 jquery(专门添加以启用 MediaElement)的网站上使用 MediaElement 时遇到问题。
以下代码行:
$('audio').mediaelementplayer({plugins:['flash'],pluginPath:'/app/public/js/mediaelement/'});
... 导致 Firefox 中出现某种脚本循环。该警报特别指向 jquery.js 中的第 3895 行。当上面的行被注释掉时,问题就消失了。
I am running into an issue trying to use MediaElement on a site that uses both dojo (primary JS framework) and jquery (added specifically to enable MediaElement).
The following line of code:
$('audio').mediaelementplayer({plugins:['flash'],pluginPath:'/app/public/js/mediaelement/'});
... is causing some sort of script loop in Firefox. The alert specifically points to line 3895 in jquery.js. The problem goes away when the above line is commented out.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您使用 CSS 隐藏播放器的任何元素,例如
display:none;
,那么您将在 Firefox 中收到无响应脚本错误。确保您没有隐藏任何播放器元素,并使用features
选项设置您需要的控件。示例代码:
If you hide any element of the player with CSS, e.g.
display:none;
then you will get an unresponsive script error in Firefox. Make sure you are not hiding any player elements, and use thefeatures
option to set the controls you need.Example code: