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)
Tags: Alpha Nerd, cc0, copyright, google, IRC, JavaScript, Jon Lajoie, public domain, Set Free, tutorials, YouTube

July 28, 2009 at 3:09 am
Thnks for this great tutorial. I’ve use your tut to place youtube clips on my network and they work great. now i don’t have to take up too much space…thank you so much.
July 28, 2009 at 9:24 am
@pimpyour
Glad it worked out for you!
August 22, 2009 at 10:00 am
For my self it does not work.
but I found the solution from youtube.com by use ‘customer video player’
”
How do I add a playlist to my blog or web page?
To show a selection of videos that is easily editable, embed a playlist. When you update the playlist on YouTube, the playlist on your site will update as well. This is a good way of creating longer stories through a series of videos, or simply giving your readers more pre-selected content to watch.
1. To create a playlist, go to the My Playlists page, click ‘Create a Playlist’ and fill out the information.
2. As you find videos you like on YouTube, click ‘Add to Playlist’ under the player to add them to your list. You can change the order of the videos in your playlist by returning to the ‘My Playlist’ page.
3. The easiest way to embed a playlist is to create a custom player. Go to your YouTube account and click “Custom Video Players”, then “Create Custom Player”. Select a color and format for your player, and then choose what is going to play in it—you can choose a playlist, your own uploaded content, or your favorites—and then click the “Generate Code” button.
4. Copy and paste the code into your blog entry or web page, just as you did with the embedded video above
“
August 28, 2009 at 12:32 pm
Gracias!! Worked like a charm.
Pat
October 22, 2009 at 8:58 am
I made a site that lets you search for youtube vids, play them, link them, and loop them. You can also loop playlists, then add other videos into the mix, and change their order on the fly. Then you can save those loops as new playlists on youtube, given that you have a youtube account..
http://playinurtubez.com
just thought i’d share – it was made more for those who like to use youtube for music playback, but you can use it for any youtube video.
October 22, 2009 at 9:52 am
@Brad
Looks sweet! I’ll be sure to play around with it.