Vimeo iframe 内容在 ie7 中不显示

发布于 2024-12-29 22:43:03 字数 337 浏览 4 评论 0原文

这几天来一直让我抓狂。 我为 Rapidweaver 平台开发了一个插件,使用户可以轻松地将 Vimeo 视频放入灯箱中。 我在 IE7 中测试时遇到问题。视频内容不显示。 您可以在此处查看测试页面: http://www.garysimpson.co.uk/sandpit /sandpit.html

该插件已从 Vimeo 生成缩略图,单击它会在灯箱中打开视频。 我正在运行 ie7 的 Windows XP 机器上进行测试。我测试过的所有其他浏览器都工作正常。 非常感谢任何指点。

This has been driving me nuts for days.
I have developed a plugin for the Rapidweaver platform, that makes it easy for a user to have Vimeo videos in a light-box.
I have a problem in testing in IE7. The video content does not get displayed.
You can see a test page here : http://www.garysimpson.co.uk/sandpit/sandpit.html

The plugin has generated the thumbnail from Vimeo and clicking it opens the video in a light-box.
I am testing on a windows xp machine running ie7. All other browsers i have tested in work fine.
Any pointers much appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

掌心的温暖 2025-01-05 22:43:03

啊 IE7...我感受到你的痛苦加里!我最近在一个项目中遇到了类似的问题。以 display:none 或类似内容开始隐藏的嵌入内容似乎存在问题。我解决这个问题的方法是仅在激活灯箱时删除并重新添加 IE 的视频内容。例如:

// Check if browser is IE7
if ($.browser.msie && parseInt($.browser.version) == 7){
    // Clone the div containing the video content
    var clone = $("#video-div").clone(true);
    // Remove the div
    $("#video-div").remove();
    // Re-add the div to the lightbox
    $("#lightbox-div").append(clone);
}

编辑:您可以尝试将此技术与旧版嵌入代码一起使用,而不是使用 iframe。

<object width="320" height="180">
    <param name="allowfullscreen" value="true" />
    <param name="allowscriptaccess" value="always" />
    <param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=7421222&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=00adef&fullscreen=1&autoplay=0&loop=0" />
    <embed src="http://vimeo.com/moogaloop.swf?clip_id=7421222&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=00adef&fullscreen=1&autoplay=0&loop=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="320" height="180"></embed>
</object>

进一步编辑:在 Browserstack 中进行一些测试时,它看起来可以在 IE7 中工作。它可能是特定于您的测试环境的。 ! IE7 窗口的屏幕截图。

Ah IE7...I feel your pain Gary! I had a similar issue on a project recently. There seems to been a problem with embedded content that starts of hidden with display:none or similar. The way I got round it was to remove and re-add the video content for IE only when the lightbox was activated. For example:

// Check if browser is IE7
if ($.browser.msie && parseInt($.browser.version) == 7){
    // Clone the div containing the video content
    var clone = $("#video-div").clone(true);
    // Remove the div
    $("#video-div").remove();
    // Re-add the div to the lightbox
    $("#lightbox-div").append(clone);
}

EDIT: You could try using this technique with the legacy embed code, instead of the iframe.

<object width="320" height="180">
    <param name="allowfullscreen" value="true" />
    <param name="allowscriptaccess" value="always" />
    <param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=7421222&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=00adef&fullscreen=1&autoplay=0&loop=0" />
    <embed src="http://vimeo.com/moogaloop.swf?clip_id=7421222&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=00adef&fullscreen=1&autoplay=0&loop=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="320" height="180"></embed>
</object>

FURTHER EDIT: On doing some testing in Browserstack it looks to be working in IE7 for me. It may be something specific to your test environment. ! Screen shot of IE7 window.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文