IE 中 jQuery UI 选项卡中的 Flowplayer 继续在非活动选项卡中播放视频
我一直在使用 flowplayer 结合 jQuery 选项卡来开发带有播放列表的媒体播放器。但我遇到了 IE 的问题,当我切换选项卡时,它仍然继续在关闭的选项卡中播放视频。这种情况在 Firefox 或 Chrome 中不会发生,仅在 IE 中发生。
您可以在此处查看我的演示
我正在浏览 flowplayer 论坛,有人发布了解决方案,但该人的解决方案没有使用jQuery UI,而不是他使用 jQuery 工具。所以我想弄清楚如何在 jQuery UI 中实现它。我没有从 flowplayer 论坛得到任何帮助,所以我想我应该在这里尝试一下。
这是据称用于解决 jQuery 工具中问题的代码(论坛帖子)我使用 jQuery 工具尝试了这个,但它没有完全工作。
不完整的 jQuery 工具解决方案:
$(function() {
var api = $(".items").tabs(".tabs-cont").data("tabs");
api.onClick(function(index) {
var video = api.getCurrentPane().find("div.video"),
videoCont = video.find("div.video-cont");
videoCont.detach();
video.append(videoCont);
});
});
html:
<div class='video'>
<div class="video-cont"><object>FLASH EMED HERE</object></div>
</div>
I have been working on a mediaplayer with playlist using flowplayer in combination with jQuery tabs. But I run into issues with IE where when I switch tabs it still keeps playing the video in the closed tab. This does not happen in firefox or chrome, only in IE.
You can checkout my demo here
I was browsing the flowplayer forums and someone posted a solution, but the persons solution was not using jQuery UI, instead he was using jQuery Tools. So I am trying to figure out how to implement it in jQuery UI. I did not get any help from the flowplayer forums, so I thought I'd try in here.
This is the code the person used to supposedly solve the issue in jQuery Tools (forum post) I tried this using jQuery Tools and it didn't work completely.
incomplete jQuery Tools solution:
$(function() {
var api = $(".items").tabs(".tabs-cont").data("tabs");
api.onClick(function(index) {
var video = api.getCurrentPane().find("div.video"),
videoCont = video.find("div.video-cont");
videoCont.detach();
video.append(videoCont);
});
});
html:
<div class='video'>
<div class="video-cont"><object>FLASH EMED HERE</object></div>
</div>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我能够自己想出一些办法。不知道是否有更好的方法,但它确实解决了我的问题。
I was able to figure something out on my own. Don't know if there is a better way of doing it, but it did solve my problem.