Allow Flash plugin to execute directly

Think CEF could benefit from a new feature or capability? Discuss CEF feature requests here.

Re: Allow Flash plugin to execute directly

Postby jebi » Thu Sep 19, 2019 7:47 am

I tried that but it still doesn't work.
What's mean "when it is explicitly allowed via content settings" ?
jebi
Newbie
 
Posts: 9
Joined: Mon Jan 15, 2018 6:50 am

Re: Allow Flash plugin to execute directly

Postby jebi » Thu Sep 19, 2019 8:25 am

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 ?
jebi
Newbie
 
Posts: 9
Joined: Mon Jan 15, 2018 6:50 am

Re: Allow Flash plugin to execute directly

Postby BobM » Wed Sep 25, 2019 4:04 am

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.
BobM
Mentor
 
Posts: 72
Joined: Wed May 11, 2016 4:28 pm

Re: Allow Flash plugin to execute directly

Postby jebi » Thu Sep 26, 2019 7:58 am

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
jebi
Newbie
 
Posts: 9
Joined: Mon Jan 15, 2018 6:50 am

Re: Allow Flash plugin to execute directly

Postby Czarek » Thu Sep 26, 2019 9:13 am

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
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: Allow Flash plugin to execute directly

Postby BobM » Tue Oct 01, 2019 1:22 am

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
BobM
Mentor
 
Posts: 72
Joined: Wed May 11, 2016 4:28 pm

Re: Allow Flash plugin to execute directly

Postby edgardog » Wed Nov 27, 2019 12:56 pm

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
edgardog
Expert
 
Posts: 111
Joined: Mon Feb 01, 2016 2:05 pm

Re: Allow Flash plugin to execute directly

Postby edgardog » Fri Nov 29, 2019 1:16 pm

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.
edgardog
Expert
 
Posts: 111
Joined: Mon Feb 01, 2016 2:05 pm

Re: Allow Flash plugin to execute directly

Postby nmgwddj » Thu Dec 05, 2019 4:27 am

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);
nmgwddj
Newbie
 
Posts: 5
Joined: Fri Jan 04, 2019 9:08 am

Re: Allow Flash plugin to execute directly

Postby andylan » Thu Dec 19, 2019 3:38 am

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);
andylan
Newbie
 
Posts: 1
Joined: Thu Dec 19, 2019 3:19 am

PreviousNext

Return to Feature Request Forum

Who is online

Users browsing this forum: Google [Bot] and 11 guests