Skip to main content

New style YouTube embed for Flash-free iPhone video

YouTube is experimenting with a new i-frame based embed style that would server up good ole' Flash video for machines that support it and new fangled HTML5 video for Apple's iOS devices, iPhone and iPad:

An enhancement to our video embed capability is now available through a new embed code style. This new style uses [[ i-frame ]] and looks like this:

So, somewhere down the road, you'll be able to play the YouTube video you want, in-line on the website you want, on the device you want, Apple and Adobe be damned.

Example after the break.

[YouTube via 9to5Mac]

Rene Ritchie
Rene Ritchie

Rene Ritchie is one of the most respected Apple analysts in the business, reaching a combined audience of over 40 million readers a month. His YouTube channel, Vector, has over 90 thousand subscribers and 14 million views and his podcasts, including Debug, have been downloaded over 20 million times. He also regularly co-hosts MacBreak Weekly for the TWiT network and co-hosted CES Live! and Talk Mobile. Based in Montreal, Rene is a former director of product marketing, web developer, and graphic designer. He's authored several books and appeared on numerous television and radio segments to discuss Apple and the technology industry. When not working, he likes to cook, grapple, and spend time with his friends and family.

  • Embed not working on my device. Just see a black box or am I missing something here?
  • Same here - no embedded video just a black box...
  • On both regular theme and mobile theme, the video doesn't work. It's just a black box.
  • Same here; what's up with that??!!!
  • According to 9to5mac, you need to enable it on the device first at
    then it should work
  • took apple/youtube long enough to do this!
    damn i hate flash!
  • Worked once I opt'd into the html5 beta
  • Black box here to...hello? Any video there?
  • Embedded YouTube videos have actually worked since day 1 on the iPhone and iPad. The iPad plays embedded videos on the page without even switching to the YouTube player app. I've tried telling 9to5mac that they really need to take their post down or correct it, but they are not listening. If you go to the Google page they are linking to, it doesn't mention the iPhone or iPad, because Google knows that this is not for them, it's for other mobile devices. YouTube embeds have always worked fine on iOS devices, try it out yourself.
  • YouTube embeds have always worked on the iPhone and iPad. You don't have to use this new iframe code, just use the normal one and it will work on iOS devices. go to any website with an embedded YouTube video on your iPhone or iPad and you'll see what I'm talking about.
  • @Jason and Alisha:
    Can you still see the websites on your iPhones and iPads while their videos play within them? Thought not.
  • You have to sign up to the Youtube HTML5 beta ( to see these new embeds ATM, as they are technically in beta still, otherwise you will see a black box.
    However, it is not necessary as iOS devices already show YouTube videos inline anyway, as Safari plugs into the YouTube app on the device.
  • @fastlane On the iPad yes. On the iPhone/iPod touch no, because the screen is too small anyway. You would maximise the video immediately anyway.
  • @fastlane
    Yes you can. It works great on the iPad with the bigger screen. You can start the embedded video within the webpage and if you want to go to full screen you just do a pinch-zoom with your fingers. to go out of full screen just pinch-zoom out and you're back to the video playing within the webpage. it's awesome because the video continues to play and the transition is very smooth. It's one of the cool things I always show people on the iPad. Thats why I was confused why TIPB and 9to5Mac are making this sound like a new thing. I guess this is a cool thing for other mobile devices, but Apple has been ahead of them for a long time and this is nothing new to iOS devices.
  • How about a Jailbreak already for iphone 4.
    Or better yet how about Apple stop acting like North Korea!
  • Yeah, this is nothing new for iOS devices, they have always been able to play embedded YouTube videos. I'm kinda surprised TiPb didn't already know this. I'm guessing the person who posted this doesn't have an iPad, because the way embedded YouTube videos work on the iPad is one of the coolest features. And it's worked this way since the iPad first came out. The information Google posted isn't for iOS devices, it's for other mobile devices that don't already play embedded YouTube videos within the webpage.
    @fastlane, yes, you can still see the websites on the iPhones and iPads while their videos play within them.
  • My iPhone 4 won't load the video and I'm opted for the beta. It just won't buffer I think. Is anyone else having probpems with buffeting on the iPhone 4 with the YouTube app and embedded videos even on wifi? The actual YouTube site with the new mobile version loads videos just fine.
  • I'm not bragging or trying to start a war. I also get a blackbox on my iPhone a, but with nexus one on 2.2 I see a regular flash video there that I can play. Weird.
  • Correction: okay I went to the HTML 5 YouTube page to join beta. Howecer" it doesn't ever really load. It loads instantly with flash. On the html5 version it gets stuck.
    One thing I already noticed though is that the video works better with touch. I can't get mine to play though.
  • Dont worry all you have to do is go to and click enable
  • If the video has ads, it will play with flash.
  • Some of you here are full of it. Now I don't know about iPad but on iPhone, embedded videos DON'T PLAY on the site. The YouTube player comes up and play them for you. So please stop spreading nonsense!
  • My built in YouTube app doesn't want to load videos on 3G or WiFi anybody else having this problem. Oh and my 3GS works great!!!
  • @Helmacc You wouldn't want videos to play inline on an iPhone. The screen is too small. Loading the YT player is better IMO on the iPhone as the controls are a finger friendly size.
    BTW, added benefit on an iPad; play a video (or audio) inline and it continues to play if you exit Safari.
  • I'm having trouble playing the video on the page. It still seems buggy ATM
  • Have already seen this on Used to be flash only, but can now view vids on iphone. Finally!
  • This isn't new. Even 9to5Mac updated their post because they realized that the iPhone and iPad have always been able to play embedded videos. Google's site says this is for mobile devices, they don't mention iOS.
  • @Helmacc
    Some of you here are full of it. Now I don’t know about iPad but on iPhone, embedded videos DON’T PLAY on the site. The YouTube player comes up and play them for you. So please stop spreading nonsense!
    I agree! it simply doesnt work on the iPhone.
  • Thats really great pal:)
    cheers. good work
  • How?
  • How did it work??pls tell me
  • Thanks ! that works perfectly.