Autoplay-policy not being respected in Win 10 App

Having problems with building or using the CefSharp .NET binding? Ask your CEF-related questions here. Please ask general usage questions on StackOverflow.

Moderator: amaitland

Autoplay-policy not being respected in Win 10 App

Postby diveecco63 » Thu Jun 10, 2021 12:02 pm

We are experiencing an issue with auto-play on windows 10 machines.

We are initializing Cef as follows:we create a OverrideSettings object of type CefSettingsOverrideCefSettings = new CefSettings();

Then we add accepted langugue list settings and a variety of command line args:

OverrideCefSettings.AcceptLanguageList =$"{CultureInfo.CurrentCulture.Name}, {CultureInfo.CurrentCulture.Name.Substring(0, 2)}";OverrideCefSettings.CefCommandLineArgs["autoplay-policy"] = "no-user-gesture-required";OverrideCefSettings.CefCommandLineArgs.Add("enable-media-stream");OverrideCefSettings.CefCommandLineArgs.Add("disable-gpu");OverrideCefSettings.CefCommandLineArgs.Add("no-proxy-server");OverrideCefSettings.CefCommandLineArgs.Add("enable-experimental-web-platform-features");OverrideCefSettings.CefCommandLineArgs.Add("enable-p2papi");OverrideCefSettings.CefCommandLineArgs.Add("allow-running-insecure-content");OverrideCefSettings.CefCommandLineArgs.Add("enable-usermedia-screen-capturing");OverrideCefSettings.CefCommandLineArgs.Add("enable-speech-input");OverrideCefSettings.CefCommandLineArgs.Add("allow-file-access-from-files");OverrideCefSettings.CefCommandLineArgs.Add("allow-http-screen-capture");OverrideCefSettings.CefCommandLineArgs.Add("auto-select-desktop-capture-source");OverrideCefSettings.CefCommandLineArgs.Add("use-fake-ui-for-media-stream");OverrideCefSettings.CefCommandLineArgs.Add("use-mock-keychain");OverrideCefSettings.CefCommandLineArgs.Add("force-renderer-accessibility");The issue is the first one, the autoplay-policy does not seem to be respected on windows machines. This is a WPF app, and we are initializing cef in app.xaml.cs on Application_startup

Cef.Initialize(OverrideCefSettings);Are we missing something else? This is only an issue on windows - MacOs seems to handle this fine.
diveecco63
Newbie
 
Posts: 7
Joined: Thu Jun 10, 2021 11:47 am

Re: Autoplay-policy not being respected in Win 10 App

Postby amaitland » Thu Jun 10, 2021 2:12 pm

What version are you using?

Try remove all your other command line args and just set autoplay-policy as a test.

Load chrome://version in the browser and confirm the command line arg is listed.
Maintainer of the CefSharp project.
amaitland
Master
 
Posts: 957
Joined: Wed Jan 14, 2015 2:35 am


Return to CefSharp Forum

Who is online

Users browsing this forum: No registered users and 1 guest