YouTube iframe embed code not working in IE7, or in IE Compatability Mode

Deadly 提交于 2019-11-30 18:10:40

问题


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."

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.

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


回答1:


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

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>



回答2:


This issue appears to have been fixed on YouTube's side -- mine had the same problem and has since then corrected itself.

I was also following this thread for guidance: http://productforums.google.com/forum/#!topic/youtube/vP-kqllg53o



来源:https://stackoverflow.com/questions/17199683/youtube-iframe-embed-code-not-working-in-ie7-or-in-ie-compatability-mode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!