Remove related Videos Overlay on Pause of Youtube videos
Opened this issue · 1 comments
waqarmujeeb-react commented
Hello, I've been trying to remove the Youtube related video overlay when video is paused. it is so annoying if someone pause the video to take some notes and then might accidentally click some other video from overlay. It really affects the user experience. Is there any workaround to remove this overlay?
I did some research and found out that it can be done by adding &rel=0 at the end of video URL
Or if one's using Ublock than we can do it by updating URL like this. But none of this worked.
Is there any way we can achieve this via using the react-youtube library?
ThanMatt commented
I'm having the same problem, and fixed it by adding this property. Maybe, it will also work for you:
// :: ... the rest of your component
const opts: YouTubeProps['opts'] = {
height: '480',
width: '854',
playerVars: {
// ... rest of the properties
rel: 0, // :: -> Add this property
},
};
// :: ... the rest of your component