logo

First impressions on new media, websites and technology.
  • rss
  • @Home
  • Blog
  • About
  • @Contact

HTML5 Embed for YouTube Videos

September 2, 2010

Youtube HTML5If you are looking to get your Youtube videos to work on mobile devices such as iPhone, iPad and Android – YouTube has enabled <iframe> ability to make you videos html5 complaint and not flash based – “In instances where HTML5 isn’t supported (e.g. our HTML5 player can’t play videos with ads), we use Flash”.

<iframe class=”youtube-player” type=”text/html” width=”640″ height=”385″
src=”http://www.youtube.com/embed/VIDEO_ID” frameborder=”0″> </iframe>

To embed any video using IFRAMES just use the following code, replacing VIDEO_ID with the unique identifying code of the video which you can grab from the video URL. Adjust the width and height appropriately.

Here is an example:

I started to convert some of my sites videos and found it worked great (example – http://www.thepolishguy.com homepage video). There are some limitations but over all the code worked as described. One issue I am working through is the ability to have a page of <iframe> videos – 12 in total. The issue is because I am using the <iframe> in the side bar when I add more html5 videos to the content section the code returns all items in the side bar as a <ul> list item. Will update the post when issue is resolved.

 

Categories
HTML5 Video
Tags
Internet TV
Comments rss
Comments rss
Trackback
Trackback

« So You’re Officially a ZillionTV Beta Tester Now What?

One Response to “HTML5 Embed for YouTube Videos”

  1. kyle says:
    January 15, 2011 at 3:01 am

    sign me up

    Reply

Leave a Reply to kyle

Click here to cancel reply.

Navigation

  • HTML5 Video Feed for all posts filed under HTML5 Video
  • Internet TV Feed for all posts filed under Internet TV

Search

rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox