Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove related Videos Overlay on Pause of Youtube videos #410

Open
waqarmujeeb-react opened this issue Jan 18, 2024 · 1 comment
Open

Remove related Videos Overlay on Pause of Youtube videos #410

waqarmujeeb-react opened this issue Jan 18, 2024 · 1 comment

Comments

@waqarmujeeb-react
Copy link

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
ublock-ytPNG
Or if one's using Ublock than we can do it by updating URL like this. But none of this worked.
yt-reljpg

Is there any way we can achieve this via using the react-youtube library?

@ThanMatt
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants