JW Player 图像未显示在 jQuery Cycle 插件中 - 仅限 IE
我使用 JW Player 和 JW Player 将视频嵌入到幻灯片中。 jQuery 循环。由于某种原因,指定给 JW Player 的预览图像不会出现在 IE(7 和 8)中。所有其他浏览器都能很好地显示预览图像,并且我还有其他视频不在 IE 正确显示图像的循环中。
如果我将该幻灯片加载为第一张幻灯片,它会显示,但如果它隐藏然后稍后“循环”,则预览图像不存在。有什么办法可以:
A)让 IE 始终保持预览图像
B)强制 JW Player 重新绘制预览图像(当幻灯片在循环插件中显示时我可以挂钩,但我没有看到在 JW Player 的 JS API 或 Flash API 中设置或重绘图像的选项 jwplayer('myVideo').redraw() 会导致更多问题。
C)还有其他想法吗?
这是一个代码示例,它绑定了 jQuery 循环:
<ol id="slides">
<li>Slide 1</li>
<li>Slide 2</li>
<li>
<script type="text/javascript" src="/lib/jwplayer/swfobject.js"></script>
<script type="text/javascript" src="/lib/jwplayer/jwplayer.js"></script>
<div id="videoSpace">Sorry, your browser does not support this video.</div>
<script type="text/javascript">
jwplayer('videoSpace').setup({
flashplayer: '/lib/jwplayer/player.swf',
file: 'my-video-file.mov',
image: 'my-image-preview.jpg',
height: 348,
width: 620,
events: {
onPlay: function() {
$('#slides').cycle('pause');
},
onComplete: function() {
$('#slides').cycle('resume');
}
}
});
</script>
</li>
</ol>
I've got a video embedded in a slideshow using JW Player & jQuery Cycle. The preview image assigned to JW Player does not appear in IE (both 7 and 8) for some reason. All other browsers show the preview image fine, and I have other videos that aren't in a cycle that IE shows the image correctly.
If I load that slide as the first slide, it shows up, but if its hidden and then "cycles" in later, the preview image is not there. Is there any way I can:
A) Make IE keep the preview image always
B) Force JW Player to re-draw the preview image (I can hook into when the slide is shown in the cycle plugin, but I don't see an option to set or redraw the image in either JW Player's JS API or Flash API) jwplayer('myVideo').redraw() causes lots more issues.
C) Any other ideas?
Here's a code sample, this has jQuery cycle bound to it:
<ol id="slides">
<li>Slide 1</li>
<li>Slide 2</li>
<li>
<script type="text/javascript" src="/lib/jwplayer/swfobject.js"></script>
<script type="text/javascript" src="/lib/jwplayer/jwplayer.js"></script>
<div id="videoSpace">Sorry, your browser does not support this video.</div>
<script type="text/javascript">
jwplayer('videoSpace').setup({
flashplayer: '/lib/jwplayer/player.swf',
file: 'my-video-file.mov',
image: 'my-image-preview.jpg',
height: 348,
width: 620,
events: {
onPlay: function() {
$('#slides').cycle('pause');
},
onComplete: function() {
$('#slides').cycle('resume');
}
}
});
</script>
</li>
</ol>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这为我解决了类似的问题...
http://blog.evansamek.com/2011/06/22/jwplayer-internet-explorer-jquery-bug-fix/
This solved a similar problem for me...
http://blog.evansamek.com/2011/06/22/jwplayer-internet-explorer-jquery-bug-fix/