YouTube embed iframe not showing in Safari

依然范特西╮ 提交于 2020-01-04 02:51:07

问题


The link is http://thecodeclub.org/ and there is a YouTube video.

Works fine in Chrome but the iframe remains blank in Safari?

Has anyone else encountered this or have a fix?

<div class="wrapper wrapper-style2">
<article id="work">
  <header>
    <h2>What Most Schools Don't Teach</h2>
    <p>Even rap stars are learning to code...</p>
  </header>
 <div class="video-container">
<iframe width="560" height="315" src="https://www.youtube.com/embed/nKIu9yen5nc?rel=0" frameborder="0" allowfullscreen></iframe>
  </div>
<a href="#courses" class="button button-big">The Courses.</a>

</article>
 </div>

回答1:


In the end it was the https that was causing the issue. Changed it to http as below and it worked fine.

<iframe width="560" height="315" src="http://www.youtube.com/embed/KX5PdVd1-OU" frameborder="0" allowfullscreen></iframe>


来源:https://stackoverflow.com/questions/21890682/youtube-embed-iframe-not-showing-in-safari

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