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

How to use autoplay? #393

Open
9uifranco opened this issue Mar 3, 2023 · 5 comments
Open

How to use autoplay? #393

9uifranco opened this issue Mar 3, 2023 · 5 comments

Comments

@9uifranco
Copy link

9uifranco commented Mar 3, 2023

I'm trying to use your example but I can't enable autoplay. I don't know if it's not working or I'm missing something...

Check this codesandbox. I'm using React + TypeScript

It's weird because it looks like the autoplay param has been passed correctly to the IFrame Player API:

autoplay-issue

@azohc
Copy link

azohc commented Mar 3, 2023

I don't know why, but removing event.target.playVideo(); from the onReady handler should be enough to get it to autoplay

@9uifranco
Copy link
Author

Sill not working here... I even tried what they said on issue #327 but no success

@EzequielBurg
Copy link

EzequielBurg commented Oct 3, 2023

I don't know why, but removing event.target.playVideo(); from the onReady handler should be enough to get it to autoplay

I my case I added this function call and worked like a charm

@bprashanth
Copy link

Try adding mute: 1 to player vars

@hwiVeloper
Copy link

@bprashanth I have solved problem related to this issue, by your comment. Thanks!
It also can be played automatically in mobile webview like android os and ios.

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

5 participants