-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
allow audio to play even when not initiated with a user's gesture #179204
Conversation
@meganrogge Let's make sure this doesn't enable auto playing videos with audio on extension pages. You can use edit one the built-in extension's
I can help test this too if you're running into issues |
The flag will affect all media tags across frames which have an |
Co-authored-by: Robo <hop2deep@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM on the change, but I would leave the decision to @mjbvz on whether to enable this by default for all users.
src/main.js
Outdated
/** | ||
* Allow media to play even if no user gesture is used to fix issues like #176284 | ||
*/ | ||
app.commandLine.appendSwitch('autoplay-policy', 'no-user-gesture-required'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is restricted to just the renderer (not webviews) then it's not a big deal imo, it will not work in web of course though.
Looking a bit more into the history of the autoplay policy in Chromium, it used to be that desktop allowed autoplay by default until the following feature landed in 2017 https://bugs.chromium.org/p/chromium/issues/detail?id=715049 to avoid annoyances to users from Ads on both mobile and desktop. The design doc also highlights the workarounds a website can do to get autoplay, checkout the Based on the above I feel we can just disable the |
Thanks for investigating @deepak1556 and yes that fixes it 👍🏼 |
/** | ||
* Allow media to play even if no user gesture is used to fix issues like #176284 | ||
*/ | ||
app.commandLine.appendSwitch('disable-features', 'CalculateNativeWinOcclusion,UnifiedAutoplay'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I must have misread the diff, can you de-duplicate L253 and this one. We only need single app.commandLine.appendSwitch('disable-features'
Under discussion currently, as this will impact all media with
autoplay
When a user gesture doesn't initiate a sound, it won't play. You can bypass this with a chromium arg.
fix #176284
fix #178642
fyi @rebornix @amunger