Chrome Autoplay Policy - Chrome 76

后端 未结 3 1065
-上瘾入骨i
-上瘾入骨i 2020-12-28 17:13

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 k

相关标签:
3条回答
  • 2020-12-28 17:56

    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 &
    
    0 讨论(0)
  • 2020-12-28 18:02

    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.

    0 讨论(0)
  • 2020-12-28 18:07

    I just add a div in my page and call click trigger on load page! it works correctly!

    <div id="test"></div>
    <script>
        $(function(){
            $("#test").trigger("click");
        })
    </script>
    
    0 讨论(0)
提交回复
热议问题