Chrome Autoplay Policy - Chrome 76

别等时光非礼了梦想. 提交于 2019-12-04 18:31:45

问题


I'm building a kiosk media which runs on Chrome that plays video with audio. I know that chrome by default only allows autoplay for videos with muted props.

And i know that i WAS able to override this by enabling a flag in chrome via chrome://flags/#autoplay-policy

I have just updated to Chrome 76 and this flag seems to be gone and the autoplaying of video doesn't seem to work anymore!

Any idea how do i overcome this?

[Chrome 76.0.3809.100 (Official Build) (64-bit)] Mac OS Mojave


回答1:


I just spoke to some developers from Google about this issue recently. I submitted a bug. They have been very helpful.

Even though autoplay policy chrome flag was removed in https://chromium-review.googlesource.com/c/chromium/src/+/1593800, you can still run Chrome with a specific autoplay policy from the command line.

Autoplay policy that does not require any user gesture.

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --autoplay-policy=no-user-gesture-required

They say this command will stay, so that's good but even better Chrome allows you to always enable autoplay by explicitly allowing a website to make sound "Site Settings > Sound"

Good luck.




回答2:


You can use command line code to execute chrome in kiosk mode with no-user-gesture-required:

google-chrome-stable --kiosk http://google.com/ --new-window --start-maximized --incognito  --autoplay-policy=no-user-gesture-required --disable-features=PreloadMediaEngagementData,AutoplayIgnoreWebAudio,MediaEngagementBypassAutoplayPolicies &


来源:https://stackoverflow.com/questions/57455849/chrome-autoplay-policy-chrome-76

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!