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

user2502654 picture user2502654 · Jun 19, 2013 · Viewed 10.8k times · Source

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.

Answer

Chris Simmons picture Chris Simmons · Jun 21, 2013

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>