Android – Does the youTube iFrame embed code work on mobile devices? (iPhone, Android)

androidiphonemobilevideoyoutube

I made a sample page using the HTML5 iFrame embed code from youTube. When browsing on my iPhone I get a play button but yet the video never plays if I press on it. When I embed the video with the HTML5 video tag everything plays just fine.

Does anyone know if youTube officially supports mobile devices with the embed code? Are there extra parameters I need? I tried the following code:

<iframe width="420" height="345" src="http://www.youtube.com/embed/OZOX5sad2FE" frameborder="0" allowfullscreen></iframe>

Best Answer

Mobile Safari on the iPhone does support the iFrame. There's an example here: http://apiblog.youtube.com/2010/07/new-way-to-embed-youtube-videos.html

Have you tried including the class and type? class="youtube-player" type="text/html"

Related Topic