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

Autoplay not working for youtube videos #2537

Open
Johannes5 opened this issue Oct 5, 2022 · 0 comments
Open

Autoplay not working for youtube videos #2537

Johannes5 opened this issue Oct 5, 2022 · 0 comments

Comments

@Johannes5
Copy link

Johannes5 commented Oct 5, 2022

Expected behaviour

Video auto-plays when the component mounts.

The specific flow I have in mind:
user clicks on thumbnail -> a route like /video/youtube/38j9hF378hf opens -> video is playing (in fullscreen, if possible) automatically

Actual behaviour

No auto-play for youtube videos.
Autoplay for vimeo (only when enabled by browser)

Environment

  • Browser: tried it on safari, firefox, or chromium browsers
  • Version: I'm using "plyr-react": "^5.1.0",
  • Operating System: MacOS (using M1 chip)
  • Version: 12.3.1

I'm using plyr-react and I was advised to forward the issue here:
chintan9/plyr-react#968

Basically, I'm calling the play method on the "canplay" event.
And autoplay doesn't trigger for youtube videos (when the route is loaded) but the video can sometimes start playingin the background, at a (seemingly) random time.

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

1 participant