I wanted to know how to embed multiple YouTube videos on my blog without having to create a unique playlist. The idea was to use the YouTube embed code to include multiple videos in a single player using a list of URLs or Video IDs.
It turned out to be really easy (after an hour of searching):
Step 1: Choose the first video you want and grab the embed code from YouTube.
<iframe width="560" height="315" src="http://www.youtube.com/embed/hcdQnK84Pl4" frameborder="0" allowfullscreen></iframe>
Step 2: Add the
playlist parameter after the first Video ID.
<iframe width="560" height="315" src="http://www.youtube.com/embed/hcdQnK84Pl4?playlist=" frameborder="0" allowfullscreen></iframe>
Step 3: To add to this embeded custom playlist, simply include the ID for each additional video separated by a comma.
<iframe width="560" height="315" src="http://www.youtube.com/embed/hcdQnK84Pl4?playlist=WnVbH7osG5U,7iw30sK2UCo,sYV5MTy0v1I" frameborder="0" allowfullscreen></iframe>
Step 4: Feel free to include the usual
&rel=0 (this makes it so YouTube doesn't recommend other videos once yours are done playing). And if you want to show all the videos in the playlist on the start screen, include
&showinfo=1 (play with this one to see what it does).
http://www.youtube.com/embed/hcdQnK84Pl4?rel=0&showinfo=1&playlist=-h6_49kfz-M,joUDSqGU2f4,qzr4wNeb-Xc,BF6DsE13w_Y,WnVbH7osG5U,nb7tGYRL-Zw,7iw30sK2UCo,sYV5MTy0v1I
Here's how my first attempt turned out:
I created it to show off some of the Assignment 1 samples from my free
Filmmaking 101 course.
~Luke Holzmann
Your Media Production Mentor
P.S. If you are totally new to YouTube embedding, keep in mind:
1. The Video ID is (currently) a string of 11 letters, numbers, or other characters, like: 7XUdN1Q_v-0. If you're watching a video, it's typically the last string of random stuff in your browser's URL bar: http://www.youtube.com/watch?v=7XUdN1Q_v-0
2. When adding extra parameters to your YouTube embed, remember that the first one begins with a ? and all the rest start with an &. Basically, you're telling YouTube: Play this video, oh, I don't want you to show related videos and build me a playlist and start playing the video automatically, etc.
3. Anything else not making sense? Just ask!
*This tutorial will also be useful if you want to know:
- How to make a sharable non-public playlist containing unlisted YouTube videos
- Step-by-step instructions for creating unlisted playlists for YouTube
- How to add videos to a playlist without creating one in your YouTube profile
- ...and more!
Please leave a comment explaining what you were looking for if you found this tutorial helpful. I want to make sure everyone can quickly find this walk-through for how to embed multiple YouTube videos into a player for their blog or website.