We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm using react-youtube in a ReactJS + TypeScript-project and I use it like below.
I am adding the following opts to my player, but the autoplay, mute and the loop options won't work.
I managed to get the "autoplay" and the "mute" to work by accessing the "InternalPlayer" (see code below) but the loop doesn't work.
<YouTube ref={youtubePlayerRef} ... onReady={() => { youtubePlayerRef.current?.getInternalPlayer().mute(); youtubePlayerRef.current?.getInternalPlayer().playVideo(); youtubePlayerRef.current?.getInternalPlayer().setLoop(true); }} opts={{ host: 'https://www.youtube-nocookie.com', playerVars: { modestbranding: 1, loop: 1, rel: 0, autoplay: 1, controls: 0, mute: 0, showinfo: 0, }, }} />
The text was updated successfully, but these errors were encountered:
mute: 1
Sorry, something went wrong.
mute works with '1' but loop does not work tho.
Doubt it will get fixed. Repo hasn't been updated in 2 years. Switch to https://github.com/cookpete/react-player
No branches or pull requests
I'm using react-youtube in a ReactJS + TypeScript-project and I use it like below.
I am adding the following opts to my player, but the autoplay, mute and the loop options won't work.
I managed to get the "autoplay" and the "mute" to work by accessing the "InternalPlayer" (see code below) but the loop doesn't work.
The text was updated successfully, but these errors were encountered: