JW Player 图像未显示在 jQuery Cycle 插件中 - 仅限 IE

发布于 2024-10-28 05:40:53 字数 1689 浏览 1 评论 0原文

我使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文