Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I hide related videos at the end of a YouTube playlist embed code?

I am using this code to embed a playlist:

<iframe width="816" height="459"        src="https://www.youtube.com/embed/videoseries?list=xxx"    frameborder="0" allowfullscreen=""> 

To hide the related videos, normally I add ?rel=0 (that's in the case of a single video embed), but if I try it here:

<iframe width="816" height="459" src="https://www.youtube.com/embed/videoseries?list=PL4Zkb_7gMrOzZlVy7jIeCjwScavYp6ssm?rel=0"   frameborder="0" allowfullscreen="">  </iframe> 

I get the "bad video" fuzzy YouTube screen (sorry, I don't know the technical term for this)!

There is no "hide related" option in the YouTube "SHOW MORE" settings for the playlist.

like image 348
Penanghill Avatar asked Mar 30 '16 23:03

Penanghill


People also ask

How do I stop YouTube from showing suggested videos at the end?

You can do that by clicking on Settings > Autoplay in the video playback interface. Autoplay plays the next video automatically instead. Sometimes, or even all the time, you may prefer not to receive video suggestions.


2 Answers

You have to use the '&' when adding more parameters to the url. Update the src field with following.

"https://www.youtube.com/embed/videoseries?list=PL4Zkb_7gMrOzZlVy7jIeCjwScavYp6ssm&rel=0" 
like image 145
Saumini Navaratnam Avatar answered Sep 17 '22 18:09

Saumini Navaratnam


As of September 25th 2018 there is no way to disable the related videos from displaying.

The effect of the change is that you will not be able to disable related videos. However, you will have the option of specifying that the related videos shown in the player should be from the same channel as the video that was just played.

To be more specific:

  • Prior to the change, if the parameter's value is set to 0, then the player does not show related videos.
  • After the change, if the rel parameter is set to 0, the player will show related videos that are from the same channel as the video that was just played.

added emphasis

like image 24
Turner Bass Avatar answered Sep 19 '22 18:09

Turner Bass