Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove pause menu video suggestions / related videos (class: ytp-pause-overlay) from Youtube embed

Youtube is showing a menu with video suggestions while my embedded video is paused. The element in the iframe has the class 'ytp-pause-overlay'

How can you remove it without removing controls?

like image 355
Sven Avatar asked May 17 '17 14:05

Sven


1 Answers

In case you loading your videos using Javascript YouTube Player iframe API you will need to use Player Parameters and set the value of rel to 0.

Example:

player = new YT.Player( 'player', {
    height: '390',
    width: '100%',
    videoId: 'y9QEQHe8ax4',
    playerVars: { 'rel':0}
    }
);

Update in October 2018

Youtube changed the behavior of rel parameter:

The behavior for the rel parameter is changing on or after September 25, 2018. 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.

Update in October 2019

I found a workaround in case you are the owner of the videos.

  1. Use the provided code example to require Youtube to load the related videos from your channel only.

  2. In order enforcing Youtube to remove the related videos list. Simply I created a new channel and uploaded the needed videos as unlisted. You have to make sure that All the videos in the new channel are not listed which means that when Youtube tries to show the related videos from the same channel the list will be empty so Youtube doesn't show related videos menu at all.

  3. To test this solution try an incognito session or another browser because Youtube will show the related videos menu to you if you are logged in with the same account that owns the channel and has access over the unlisted videos

like image 144
Shady Mohamed Sherif Avatar answered Sep 19 '22 13:09

Shady Mohamed Sherif