Page 2 of 3

Re: Allow Flash plugin to execute directly

PostPosted: Thu Sep 19, 2019 7:47 am
by jebi
I tried that but it still doesn't work.
What's mean "when it is explicitly allowed via content settings" ?

Re: Allow Flash plugin to execute directly

PostPosted: Thu Sep 19, 2019 8:25 am
by jebi
Is there is a way to allow flash content to automatically play like it is possible with Chrome using:
DefaultPluginsSetting
and
PluginsAllowedForUrls

https://cloud.google.com/docs/chrome-en ... insSetting

As you can see RunAllFlashInAllowMode is related to those 2 policies. How to set that in CEF ?

Re: Allow Flash plugin to execute directly

PostPosted: Wed Sep 25, 2019 4:04 am
by BobM
I have the same problem. None of the settings appear to allow flash to play without user action. OnBeforePluginLoad appears not to be called.

https://www.chromium.org/flash-roadmap#TOC-Flash-Disabled-by-Default-Target:-Chrome-76---July-2019-

Using cef_binary_76.1.13+gf19c584+chromium-76.0.3809.132_windows32.

Re: Allow Flash plugin to execute directly

PostPosted: Thu Sep 26, 2019 7:58 am
by jebi
https://bitbucket.org/chromiumembedded/ ... thout-user

I find out that setting profile.default_content_setting_values.plugins to 1 in request context preferences (SetPreference) allow Flash plugin to run without user interaction

Re: Allow Flash plugin to execute directly

PostPosted: Thu Sep 26, 2019 9:13 am
by Czarek
Just for the future, all of the preferences that can affect Flash:
Code: Select all
plugins.run_all_flash_in_allow_mode = true
plugins.allow_outdated = true
profile.default_content_setting_values.plugins = 1
profile.managed_default_content_settings.plugins = 1
profile.content_settings.exceptions.plugins = {}
profile.managed_plugins_allowed_for_urls = ["https://*", "http://*"]
profile.managed_plugins_blocked_for_urls = []
webkit.webprefs.plugins_enabled = true
plugins.plugins_enabled = []
plugins.plugins_disabled = []
plugins.plugins_disabled_exceptions = []

And switches:
Code: Select all
--plugin-policy=(allow|detect|block)
--allow-outdated-plugins
--disable-plugins

Re: Allow Flash plugin to execute directly

PostPosted: Tue Oct 01, 2019 1:22 am
by BobM
jebi wrote:https://bitbucket.org/chromiumembedded/cef/issues/2768/allow-flash-to-play-without-user

I find out that setting profile.default_content_setting_values.plugins to 1 in request context preferences (SetPreference) allow Flash plugin to run without user interaction


Thanks for that - did the trick.
Bob

Re: Allow Flash plugin to execute directly

PostPosted: Wed Nov 27, 2019 12:56 pm
by edgardog
Czarek wrote:Just for the future, all of the preferences that can affect Flash:
Code: Select all
plugins.run_all_flash_in_allow_mode = true
plugins.allow_outdated = true
profile.default_content_setting_values.plugins = 1
profile.managed_default_content_settings.plugins = 1
profile.content_settings.exceptions.plugins = {}
profile.managed_plugins_allowed_for_urls = ["https://*", "http://*"]
profile.managed_plugins_blocked_for_urls = []
webkit.webprefs.plugins_enabled = true
plugins.plugins_enabled = []
plugins.plugins_disabled = []
plugins.plugins_disabled_exceptions = []

And switches:
Code: Select all
--plugin-policy=(allow|detect|block)
--allow-outdated-plugins
--disable-plugins


Can someone point me in the right direction on how to change the preferences?
I'm able to change the switches like --allow-outdated-plugins .. I'm just not sure how to set profile.default_content_setting_values.plugins = 1
What should I edit on cefclient to get this working?
Thanks

Re: Allow Flash plugin to execute directly

PostPosted: Fri Nov 29, 2019 1:16 pm
by edgardog
edgardog wrote:
Czarek wrote:Just for the future, all of the preferences that can affect Flash:
Code: Select all
plugins.run_all_flash_in_allow_mode = true
plugins.allow_outdated = true
profile.default_content_setting_values.plugins = 1
profile.managed_default_content_settings.plugins = 1
profile.content_settings.exceptions.plugins = {}
profile.managed_plugins_allowed_for_urls = ["https://*", "http://*"]
profile.managed_plugins_blocked_for_urls = []
webkit.webprefs.plugins_enabled = true
plugins.plugins_enabled = []
plugins.plugins_disabled = []
plugins.plugins_disabled_exceptions = []

And switches:
Code: Select all
--plugin-policy=(allow|detect|block)
--allow-outdated-plugins
--disable-plugins


Can someone point me in the right direction on how to change the preferences?
I'm able to change the switches like --allow-outdated-plugins .. I'm just not sure how to set profile.default_content_setting_values.plugins = 1
What should I edit on cefclient to get this working?
Thanks


Figured it out... on CreateBrowserSync you can pass a CefREquestContext pointer with Preferences set.

Re: Allow Flash plugin to execute directly

PostPosted: Thu Dec 05, 2019 4:27 am
by nmgwddj
You can set the `profile.default_content_setting_values.plugins` value before call CreateBrowser like this:

Code: Select all
CefRequestContextSettings rcsettings;
auto request_content = CefRequestContext::CreateContext(rcsettings, new ClientRequestContextHandler);
CefString error;
CefRefPtr<CefValue> value = CefValue::Create();
value->SetInt(1);
request_content->SetPreference("profile.default_content_setting_values.plugins", value, error);
CefBrowserHost::CreateBrowser(window_info,
   handler,
   url,
   browser_settings,
   nullptr,
   request_content);

Re: Allow Flash plugin to execute directly

PostPosted: Thu Dec 19, 2019 3:38 am
by andylan
For java-cef(https://bitbucket.org/chromiumembedded/java-cef/src/master/), with java/tests/detailed/MainFrame.java, how to change Above C code with Java to set profile.default_content_setting_values.plugins = 1

Current, I use below code to enable flash player
Code: Select all
args = new String[]{
                "--enable-system-flash=true",
                "--plugin-policy=allow",
                "--ppapi-flash-path=\"C:\\Users\\ylan1\\AppData\\Local\\Google\\Chrome\\User Data\\PepperFlash\\32.0.0.303\\pepflashplayer.dll\"",
                "--ppapi-flash-version=32.0.0.303"
        };

but with test flash page(https://www.ultrasounds.com/US.html) like below:



but how to change below code to create requestContext with profile.default_content_setting_values.plugins = 1,
Code: Select all
        CefRequestContext requestContext = null;
//        CefRequestContext requestContext = CefRequestContext.getGlobalContext();
       
        CefBrowser browser = client_.createBrowser(
                "http://www.google.com", osrEnabled, transparentPaintingEnabled, requestContext);



Code: Select all
CefRequestContextSettings rcsettings;
auto request_content = CefRequestContext::CreateContext(rcsettings, new ClientRequestContextHandler);
CefString error;
CefRefPtr<CefValue> value = CefValue::Create();
value->SetInt(1);
request_content->SetPreference("profile.default_content_setting_values.plugins", value, error);
CefBrowserHost::CreateBrowser(window_info,
   handler,
   url,
   browser_settings,
   nullptr,
   request_content);