YouTube iframe 嵌入代码在 IE7 或 IE 兼容模式下不起作用 [英] YouTube iframe embed code not working in IE7, or in IE Compatability Mode

查看:15
本文介绍了YouTube iframe 嵌入代码在 IE7 或 IE 兼容模式下不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,自从 YouTube 切换到 iframe 嵌入方法以来,我们的公司网站一直在使用 iframe 嵌入方法,并且一切似乎都运行良好.从上周开始,我们开始在 IE7 和 IE9(兼容模式下)中用黑框代替视频.我没有在这里或网上找到任何似乎专门解决这个问题的东西,除了一些帖子说关闭兼容性视图".

So, our corporate web site has been using the iframe embed method since YouTube switched to this, and everything seemed to be working fine. As of last week, we started getting black boxes in place of the video in IE7 and IE9 (in compatibility mode). I haven't found anything here or online that seems to specifically address this problem, other then a couple of posts saying "Turn off compatibility view."

我们可以对单个视频使用已弃用的对象嵌入方法(这当然不是最佳选择),但对于播放列表,除了 iframe 方法之外,我们似乎别无选择.

We can use the deprecated object embed method for single videos (which isn't optimal, of course), but for playlists, it looks like we have no other option except for the iframe method.

有没有其他人遇到过这个问题?YouTube iframe 代码最近有什么变化吗?任何帮助都将不胜感激.

Has anyone else run across this issue? Has something recently changed in the YouTube iframe code? Any help at all would be appreciated.

推荐答案

我们遇到了同样的问题,使用 YouTube 建议的 iframe 编码.它看起来像一个安全设置.

We have run into the same problem, using the iframe coding suggested by YouTube. It looks like a security setting.

但是 YouTube 上提供了一个解决方案.如果您选中启用隐私增强模式"复选框,您会得到一个略有不同的 YouTube 主机,它似乎支持兼容模式:

But there is a solution given on YouTube. If you select the "Enable Privacy-enhanced mode" check-box, you get a slightly different YouTube host, which seems to support compatibility mode:

<iframe width="420" height="315" src="http://www.youtube-nocookie.com/embed/VFNFDPpkTJs" frameborder="0" allowfullscreen></iframe>

这篇关于YouTube iframe 嵌入代码在 IE7 或 IE 兼容模式下不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆