Vaughn
Rookie

How to embed playlist youtube with html5?


I was trying to figure out how to embed a youtube playlist on a site. The code that I d be using looks something like www.youtube.com/embed/PLAYLISTID and it works only for flash playlist. Is there any method to make playlist show youtube with html5?
6 months ago
Respond to this discussion
Divya Wadhwa Bhojwani | Dec 12 2011

It is a simple task to embed several You Tube videos on a HTML5 web page. You can also put all these videos into an individual YouTube playlist and then insert the playlist into the web page. This not only helps you to save the space that video content occupies, but also reduces the size of web page. Technically, the YouTube Flash video player is embedded only once on your web page.

Now we will proceed with the procedure to embed playlist You Tube with HTML5. Given below is the default embed code for YouTube video playlist:

<object width=’470’ height=’375’>

<param name=’movie’ value=’http://www.youtube.com/p/Id’></param>

<param name=’allowFullScreen’ value=’true’></param>

<param name=’allowscriptaccess’ value=’always’></param>

<embed src=’http://www.youtube.com/p/Id’ width=’470’ height=’375’

type= ‘application/x-shockwave-flash’ allowscriptaccess=’always’

allowfullscreen=’true’></embed></object>

Do not forget to change the word ‘Id’ with the YouTube playlist Id.

There is even an alternative way to embed playlist You Tube with HTML5. YouTube offers an IFRAME option to embed selected videos and the same code can be further extended to embed video playlists. Here is the code:

<iframe src=’http://www.youtube.com/embed/videoseries?list=Id’

width=’100%’ height=’400’ frameborder=’0’></iframe>

In the above code, you can change the value of height and width attributes as per your web page. With IFRAME, Google makes these playlists HTML5 ready. That is, you can play your existing video playlist on browsers that do not have the Flash plugin thereby saving your time spend on altering the set code.

© 2012, Instamedia. Some rights reserved. Powered by Instapress and Instacheckin.