Note that there are some explanatory texts on larger screens.

plurals
  1. POYouTube Embed player in Iframe doesn't work in iOS6
    text
    copied!<p>I really need your help. Working on an iOS app. I want to play youtube. I understood from reading many many blogs and posts, that we need to use an iframe in order to play a youtube video.</p> <p>However, on some videos I get: "<strong>This video contains content from XYZ. It is restricted from playback on certain sites. Watch on YouTube</strong>"</p> <p>I read this question: <a href="https://stackoverflow.com/questions/12761100/youtube-in-ios5-done-button-tapped/12860616#12860616">Youtube in iOS5 - done button Tapped</a> which gives the link to youtube api: <a href="https://developers.google.com/youtube/player_parameters" rel="nofollow noreferrer">https://developers.google.com/youtube/player_parameters</a> They recommend to use the iframe. <br/>the example for youtube site is: </p> <pre><code>&lt;iframe id="ytplayer" type="text/html" width="640" height="390" src="http://www.youtube.com/embed/M7lc1UVf-VE?autoplay=1&amp;origin=http://example.com" frameborder="0"/&gt; </code></pre> <p>The code I used:</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;style&gt; * { border:0; margin:0; } &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;iframe webkit-playsinline id="player" type="text/html" width="320" height="180" src="http://www.youtube.com/embed/rEevIL1Wpcg?enablejsapi=1&amp;playsinline=1&amp;autoplay=1" frameborder="0"&gt; &lt;/iframe&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>Can someone help me understand it? I check the embedded flag to be true, they are all clips that are allowed to play on mobile devices.</p> <p>Example for videos that works on the device:</p> <ul> <li><a href="http://www.youtube.com/watch?v=rEevIL1Wpcg&amp;feature=youtube_gdata" rel="nofollow noreferrer">http://www.youtube.com/watch?v=rEevIL1Wpcg&amp;feature=youtube_gdata</a></li> <li><a href="http://www.youtube.com/watch?v=KzGe7pbGUiM" rel="nofollow noreferrer">http://www.youtube.com/watch?v=KzGe7pbGUiM</a></li> </ul> <p>Example for videos that <strong>don't work</strong> on the device and bring up the error msg:</p> <ul> <li><a href="http://www.youtube.com/watch?v=1vhFnTjia_I&amp;feature=youtube_gdata" rel="nofollow noreferrer">http://www.youtube.com/watch?v=1vhFnTjia_I&amp;feature=youtube_gdata</a></li> <li><a href="http://www.youtube.com/watch?v=sxkiA0IjBZ0&amp;feature=youtube_gdata" rel="nofollow noreferrer">http://www.youtube.com/watch?v=sxkiA0IjBZ0&amp;feature=youtube_gdata</a></li> </ul>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload