3 Answers
3

Since a proper answer was not provided here for playlists using the Playlist ID (i.e. not hardcoding the list of videos), this is the way to use it if you still wish to use the Javascript Youtube IFrame API. You can omit the videoID if the playlist ID is specified in the playerVars as follows:

I changed my mind some time ago and stopped to use this IFrame API above. I changed to JavaScript API I load the playlist directly from youtube player url: ` swfobject.embedSWF("youtube.com/v/… ... &playlist=yourPlayList ...` and let the player manage the videos.
–
MorenoMar 15 '12 at 19:50

@Moreno: switch back to IFrame, especially if you want your videos to work on mobile.
–
Salman AMar 20 '13 at 18:30

Note that there is no video id... instead, the listType and list parameters instruct the player to load a playlist. For your particular requirement, add autoplay=1 to ensure that the videos play automatically without requiring JavaScript code.