x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Enable CEF3 pepper flash plugin

How can you activate the pepper flash plugin for the WebBrowser widget? I'm changing Engine\Source\Runtime\WebBrowser\Private\WebBrowserSingleton.cpp after

 CEFBrowserApp = new FCEFBrowserApp;

i'm adding:

 FCommandLine::Append(TEXT(" --enable-system-flash=1 "));

but i don't see it working, maybe i copied the file pepflashplayer.dll in the wrong place? : Engine\Source\ThirdParty\CEF3

i think the other way to do this is :

 CefRefPtr<CefCommandLine> command_line = CefCommandLine::CreateCommandLine();
 command_line->AppendSwitchWithValue("ppapi-flash-path", "pepflashplayer.dll");
 command_line->AppendSwitchWithValue("ppapi-flash-version", "24.0 r0");
 command_line->AppendSwitchWithValue("plugin-policy", "allow");

do you know how to do it?

Product Version: Not Selected
Tags:
more ▼

asked Jan 04 '17 at 02:04 PM in C++ Programming

avatar image

juanbelon.alea
3 3 4 6

avatar image qdelpeche Oct 08 '18 at 01:52 PM

Does anybody know if this still works in UE 4.20?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

You are accessing the command line correctly but you are using the parameters in a wrong way. If you want to compile the engine with flash support, download the pepper flash dll or use the one in your chrome (or chromium) browser and copy it to a local folder, then ,go to UE4\Engine\Source\Runtime\WebBrowser\Private\CEF\CEFBrowserApp.cpp and in the OnBeforeCommandLineProcessing function ,add this

 CommandLine->AppendSwitchWithValue(
         "ppapi-flash-path",
         "C:\\UE4\\Engine\\Source\\ThirdParty\\CEF3\\pepflashplayer.dll");
 CommandLine->AppendSwitchWithValue("ppapi-flash-version", "24.0.0.186");

use your own path and flash version for your case, compile and run, you will have flash in your project. Ah, in the same function you have the gpu disable option ,that's for webgl.

chers

more ▼

answered Jan 16 '17 at 02:23 PM

avatar image

XIXGAMES
81 6 7 11

avatar image juanbelon.alea Mar 15 '17 at 12:11 PM

Ah, of course you also need to enable things in WebBrowserSingleton.cpp like: CefRefPtr command_line = CefCommandLine::CreateCommandLine();

 command_line->AppendSwitchWithValue("ppapi-flash-path", "pepflashplayer.dll");
 command_line->AppendSwitchWithValue("ppapi-flash-version", "24.0 r0");
 command_line->AppendSwitchWithValue("plugin-policy", "allow");
 command_line->AppendSwitchWithValue("enable-system-flash", "1");
 //...
 FCommandLine::Append(TEXT(" --enable-system-flash=1 --plugin-policy=allow "));
  //...
 Settings.no_sandbox = false;
 Settings.command_line_args_disabled = false;
 //...
 // Enable plugins
 BrowserSettings.plugins = STATE_ENABLED;
 BrowserSettings.webgl = STATE_ENABLED;
          

avatar image alonezhby Oct 24 '17 at 04:15 PM

Hi, juanbelon.alea

I want to display a webgl page, and I added two lines in the createbrowserwindow function:

 BrowserSettings.plugins = STATE_ENABLED;
 BrowserSettings.webgl = STATE_ENABLED;

I still can't display webgl page, it says: your browser not support webgl.

Did I miss something there? Did you test it?

Other issue, I can load a PDF file, but the webbrowser not refresh well, it flashing badly and seems the performance is very low. How to fix it?

Thanks!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

You also need to modify WebBrowserSinleton.cpp ... in the constructor:

 CEFBrowserApp = new FCEFBrowserApp;
     CefRefPtr<CefCommandLine> command_line = CefCommandLine::CreateCommandLine();
     command_line->AppendSwitchWithValue("ppapi-flash-path", "pepflashplayer.dll");
     command_line->AppendSwitchWithValue("ppapi-flash-version", "24.0 r0");
     command_line->AppendSwitchWithValue("plugin-policy", "allow");
     command_line->AppendSwitchWithValue("enable-system-flash", "1");
 
     FCommandLine::Append(TEXT(" --enable-system-flash=1 --plugin-policy=allow "));
     CEFBrowserApp->OnRenderProcessThreadCreated().BindRaw(this, &FWebBrowserSingleton::HandleRenderProcessCreated);
 //....
 Settings.no_sandbox = false;
 Settings.command_line_args_disabled = false;
 //...


in the createbrowserwindow function:

 BrowserSettings.plugins = STATE_ENABLED;
 BrowserSettings.webgl = STATE_ENABLED;


more ▼

answered Mar 15 '17 at 12:11 PM

avatar image

juanbelon.alea
3 3 4 6

avatar image AkioChen Nov 10 '17 at 04:59 AM

Dear XIXGAMES:

Thank you very much. And it works eventually.

:D

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question