Warning: Constant MULTISITE already defined in /home/pbmalartu/public_html/wp-config.php on line 107

Warning: Constant SUBDOMAIN_INSTALL already defined in /home/pbmalartu/public_html/wp-config.php on line 108

Warning: Constant DOMAIN_CURRENT_SITE already defined in /home/pbmalartu/public_html/wp-config.php on line 109

Warning: Constant PATH_CURRENT_SITE already defined in /home/pbmalartu/public_html/wp-config.php on line 110

Warning: Constant SITE_ID_CURRENT_SITE already defined in /home/pbmalartu/public_html/wp-config.php on line 111

Warning: Constant BLOG_ID_CURRENT_SITE already defined in /home/pbmalartu/public_html/wp-config.php on line 112

Warning: The magic method Pressbooks\Book::__wakeup() must have public visibility in /home/pbmalartu/public_html/wp-content/plugins/pressbooks/inc/class-book.php on line 62
Preventing Video Rollover – BC Open Textbook Authoring Guide ="http://www.w3.org/2000/svg" viewBox="0 0 512 512">

Adding Videos

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:

License

Icon for the Creative Commons Attribution 4.0 International License

BC Open Textbook Authoring Guide by BCcampus is licensed under a Creative Commons Attribution 4.0 International License, except where otherwise noted.

Share This Book

css.php