Adding Videos

28 Preventing Video Rollover

Sometimes the YouTube videos being embedded come from a playlist. If a playlist video is embedded, then after the video plays, it will roll over into the next video, which may or may not be related. Since we don’t want unrelated videos to play in the textbook, we need to prevent video rollover. We’ll use the automatic embed method to be clear.

You can tell that this video comes from a playlist due to the playlist interface on the right-hand side of the screen.

You can tell that this video comes from a playlist due to the playlist interface on the right-hand side of the screen.

If your video comes from a playlist (see image above) the video’s URL will be a bit longer, and look something like the following:

https://www.youtube.com/watch?v=UBvD3TVdAqs&list=PLoyeLDwSM5B4rC6LARKwQ0w4D3JkIc78c

And it will display like this:

If you watch this video until the end, you’ll notice that it rolls over into the next video in the playlist – which might not be appropriate given the content of the video and the subject matter of the textbook.

In order to prevent this video from rolling over, we need to adjust the URL by removing the second part of the link that begins with &list=…

So if the original URL looks like this:

https://www.youtube.com/watch?v=UBvD3TVdAqs&list=PLoyeLDwSM5B4rC6LARKwQ0w4D3JkIc78c

We truncate the URL to now look like this:

https://www.youtube.com/watch?v=UBvD3TVdAqs

And the video should display correctly, like so: