The video above is an example of a YouTube playlist that loops forever. It consists of 3 Jon Lajoie music videos that I never get tired of hearing. Here’s how you can have your very own looping YouTube playlist.
- Login to YouTube. If you don’t have an account, get one here…
http://www.youtube.com/signup - Go to a YouTube video that you like.
- Click “Playlists” near the bottom of the video.
- Make sure “[ New Playlist ]” is selected, then click “Add”.
- Enter whatever you want for “Playlist Name” and “Description”, then click “Save Playlist Info”.
- Go to another video that you want to add to the playlist you created and click “Playlists” again near the bottom of the video.
- This time, make sure the name of your playlist you created earlier is selected, then click “Add”. Do this for anymore videos you want in the playlist.
- When you’re done adding videos to the playlist, click your username at the top of the screen.
- Click “Playlists” which is also near the top of the screen.
- Find the name of the playlist you want to loop and click it.
- Copy and paste the contents of “Playlist/URL (Permalink):” into the YouTube Playlist Looper at following link…
http://ia331413.us.archive.org/3/items/YoutubePlaylistLooper/youtube_playlist_looper.html - After pasting the permalink into the YouTube Playlist Looper, click “submit”.
- Your YouTube playlist should automatically start playing and start over when it reaches the end.
- You also have the option to copy and paste the resulting code to loop your playlist on your own website.
Ta da! That’s it. Enjoy your infinite playlist.
If you are interested in how I created the YouTube Playlist Looper, read on.
First, I googled “loop youtube playlist”. The first page of results didn’t have any solutions I liked, but it did have a link to a blog post that gave me a clue on how I might be able to loop a YouTube playlist.
Here’s the blog post that mentions the 2 parameters “&loop=1″ and “&autoplay=1″ that I needed to add to a playlist’s embed code…
http://googlesystem.blogspot.com/2008/06/play-youtube-videos-in-loop.html
To get a playlist’s embed code, I had to hover over my username in YouTube, then click “Playlists”. Then, I had to click the playlist name that I wanted to loop. Where it says “Embed:”, is the code I had to add the two parameters to.
The rest is pretty self explanatory if you understand JavaScript and view the source code of the YouTube Playlist Looper. I just had to get a user to input the ID of the playlist they wanted looped. Then, I returned the code with the 2 parameters automatically appended to the embed code that YouTube provided.
I did have some trouble with the display after hitting “submit”, but a quick trip to the javascript IRC channel helped me find my answer (see below).
As with everything I create, the YouTube Playlist Looper has been set free from any copyrights using the CC0 waiver.
—
Correspondence with temp01
#javascript@irc.freenode.net (4/11/09)
[10:42pm] jorel314: hello…
[10:44pm] jorel314: anyone care to help a javascript noob?
[10:44pm] temp01: maybe.. if the noob asks a question
[10:45pm] jorel314: I created this form that lets you loop a youtube playlist.. i was wondering how to get the results on the same page as the form..
[10:45pm] jorel314: http://dl.getdropbox.com/u/154234/youtube_playlist_looper.html
[10:46pm] jorel314: right now.. when I click submit.. the form disappears when the results show…
[10:46pm] temp01: firstChild.nodeValue = document.write .. lol
[10:47pm] jorel314: i’d like the results to appear on the same page…
[10:47pm] jorel314: be gentle.. it’s my first javascript program…
[10:47pm] temp01: sorry couldnt resist
[10:47pm] jorel314: i tried innerhtml..
[10:48pm] jorel314: but i don’t think that is part of DOM…
[10:49pm] temp01: jorel314: getElementById(‘results’).innerHTML = “<h1>PREVI….”
[10:50pm] jorel314: ok.. let me try that out..
[10:50pm] temp01: 99% of what you are using.. is not part of DOM
[10:51pm] temp01: i.e. standards-compliant
[10:51pm] jorel314: i was trying to get functionality first.. then fix it up to standards..
[10:54pm] jorel314: thanks temp01, it worked! http://dl.getdropbox.com/u/154234/youtube_playlist_looper_0.2.html
~~~~
- More of my tutorials (feed)
- Alpha Nerd (feed)
- Set Free (feed)



