]> git.sesse.net Git - nageru/commitdiff
Set CEF autoplay policy to be more lenient. master
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 2 Mar 2024 23:41:59 +0000 (00:41 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 2 Mar 2024 23:41:59 +0000 (00:41 +0100)
Requiring click-to-play for videos doesn't make sense in the
CEF context; we don't even support interactivity, and most pages
are going to be from trusted sources anyway. (Besides, any muted
videos already autoplay just fine, and our CEF source is always
muted.)

nageru/nageru_cef_app.cpp

index b74c04b1988aa728b2c7d50ee7f50db9e84f2479..70b9afe65882ad15e7633b0b8fed49efd7737f42 100644 (file)
@@ -18,6 +18,7 @@ void NageruCefApp::OnBeforeCommandLineProcessing(
        command_line->AppendSwitch("disable-gpu");
        command_line->AppendSwitch("disable-gpu-compositing");
        command_line->AppendSwitch("enable-begin-frame-scheduling");
+       command_line->AppendSwitchWithValue("autoplay-policy", "no-user-gesture-required");
 
        // https://bitbucket.org/chromiumembedded/cef/issues/2717/xmlhttprequest-empty-responsetext
        command_line->AppendSwitch("disable-web-security");