From: Steinar H. Gunderson Date: Sat, 2 Mar 2024 23:41:59 +0000 (+0100) Subject: Set CEF autoplay policy to be more lenient. X-Git-Url: https://git.sesse.net/?p=nageru;a=commitdiff_plain;h=refs%2Fheads%2Fmaster Set CEF autoplay policy to be more lenient. 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.) --- diff --git a/nageru/nageru_cef_app.cpp b/nageru/nageru_cef_app.cpp index b74c04b..70b9afe 100644 --- a/nageru/nageru_cef_app.cpp +++ b/nageru/nageru_cef_app.cpp @@ -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");