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

missing mute playerVar for autoplay #619

Open
giveap opened this issue Mar 8, 2024 · 2 comments
Open

missing mute playerVar for autoplay #619

giveap opened this issue Mar 8, 2024 · 2 comments

Comments

@giveap
Copy link

giveap commented Mar 8, 2024

YT autoplay requires the mute option, but this does not seem to be supported.

playerVars: {mute: 1}

The following codepen has a working combination of attributes to enable autoplay even on iOS safari.

https://codepen.io/iounini/pen/mdWVJLB

@mister-ben
Copy link

You can use the standard muted attribute or player option, or {customVars: {muted: 1}} to set directly , https://github.com/videojs/videojs-youtube?tab=readme-ov-file#custom-player-options

@giveap
Copy link
Author

giveap commented Mar 8, 2024

Thanks! yes, having both set was the solution.
"youtube": { "customVars": { "mute": 1 ,"playsinline": 1, }}

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