Search code examples
youtubeyoutube-apiyoutube-javascript-apiyoutube-dl

how to play a specific video of a play list in embedded youtube video


I have followed this tutorial http://www.lavacoms.com/2012/01/embedded-youtube-playlist-autoplay/

it is an excellent tutorial. my question is if I have a playlist embedded on my page but I would like the first video to be let say the second or the third video or even the sisth video of the play list what do I have to do?

Thank you


Solution

  • <iframe src="http://www.youtube.com/embed/VIDEO_ID?list=PLAYLISTURL&amp;autoplay=1&amp;modestbranding=1&amp;fs=2" frameborder="0" width="640" height="385"></iframe>
    

    where it said VIDEO_ID put the video Id that you want to play first from your play list. where it said PLAYLISTURL put the ID of the url.

    found on http://911-need-code-help.blogspot.com/2012/07/youtube-iframe-embeds-video-playlist-and-html5.html

    hope it helps someone else