From 44efd2eb014f80ad50533164882bcc37a5592c11 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sun, 3 Mar 2024 00:41:59 +0100 Subject: [PATCH] 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.) --- nageru/nageru_cef_app.cpp | 1 + 1 file changed, 1 insertion(+) 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"); -- 2.39.2