问题
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