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

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

How can I remove it without removing the controls?

+9


source to share


6 answers


Yes it is possible. You must use showinfo=0?ecver=2

in your code iframe

.

Example:



<iframe src="https://www.youtube.com/embed/pV1jC37ELmQ?rel=0&amp;showinfo=0?ecver=2" width="640" height="360"></iframe>

      

+2


source


If you are uploading your videos using the YouTube Player iframe Javascript API , you need to use the Player Options and set the value rel

to 0.

Example:

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

      

October 2018 update

Youtube changed the behavior of the rel parameter :



The rel parameter's behavior changes on or after September 25, 2018. As a result of this change, you will not be able to disable related videos. However, you will have the option to specify that the corresponding videos displayed in the player must be from the same channel as the video you just played.

To be more specific: before changing, if the parameter value is set to 0, then the player does not show related videos. After change, if the rel parameter is set to 0, the player will show the associated video from the same channel as the video that was just played.

October 2019 update

I found a workaround if you own the video.

  1. Use the example code provided to make YouTube download relevant videos only from your channel.

  2. To force Youtube to remove the list of related videos. I just created a new channel and uploaded the required videos as a list. You have to make sure that all videos on the new channel are not listed, which means that when Youtube tries to show related videos from the same channel, the list will be empty, so Youtube does not show the related videos menu at all.

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

+1


source


The solution for me was to add the "rel" parameter with the value "0" to the end of the url.

According to the developer guide here , the description for the "rel" parameter is:

This parameter specifies whether the player should show related videos when the opening video ends. Supported values: 0 and 1. Default value: 1.

When I set the value to "0", this parameter allows to display suggested videos when the video is paused.

Example url: https://www.youtube.com/embed/ABCDEFG?rel=0

0


source


None of the suggested solutions worked for me, so I added this to the page:

<style>
.ytp-pause-overlay{
display:none;
}
</style>

      

0


source


After trying all these tricks (and some of the other posts), I still haven't been able to get rid of the ytp-pause-overlay. The only thing DID actually worked was limiting the size of the iframe itself (using percentages), and also setting the desired dimensions (using px) in the outer div.

Example: <div style="height: 300px; width: 350px"><iframe style="width:90%" src...></iframe></div>

(Please excuse the inline style)

0


source


I fiddled with it a bit and found that this solution works for me:

my browser is chrome version 73.0.3683.86
my adblock plus is version 3.5
using adblock plus, go to its settings, click on advanced on the left, scroll down to the area "My filter list ", add the following line:

.ytp-pause-overlay

click save, reload the webpage with video.

I have added the following as well, but I don’t think this is necessary to solve your specific problem, but I am including the information just to be thorough. I believe this just blocks the suggested / related content grid at the very end of the video.

/yts/swfbin/player-*/endscreen.swf
youtube.com ## div.videowall-endscreen
youtube.com ## watch related

0


source







All Articles