Testing Pepper (PPAPI) plugin support

Do not post support requests, bug reports or feature requests. Discuss CEF here. Non-CEF related discussion goes in General Discussion!

Testing Pepper (PPAPI) plugin support

Postby magreenblatt » Wed Mar 06, 2013 3:10 pm

CEF3 supports the loading of Pepper (PPAPI) plugins. Below is a quick-start guide for testing this functionality. Full details are documented at http://www.chromium.org/developers/desi ... ementation.

All instances of "C:\chromium" should be replaced with the appropriate path on your system.

1. Build CEF3/Chromium from source code as described at https://code.google.com/p/chromiumembed ... ndBuilding.
2. Edit C:\chromium\src\build\some.gyp, add '../ppapi/ppapi_internal.gyp:ppapi_example_paint_manager' in the 'dependencies' section.
3. Run `gclient runhooks` from the chromium src directory to update the build files.
4. Open C:\chromium\src\build\some.sln (on equivalent on other platforms) and build the ppapi_example_paint_manager target to create ppapi_example_paint_manager.dll.
5. Run cefclient with the following command-line flags:
Code: Select all
--ppapi-out-of-process --register-pepper-plugins="C:\chromium\src\build\Debug\ppapi_example_paint_manager.dll;application/x-ppapi-example-2d" --url=file:///C:/chromium/src/ppapi/examples/2d/2d.html

When cefclient loads you should see a purple plugin area where clicking the left mouse button draws white rectangles between the points clicked.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Testing Pepper (PPAPI) plugin support

Postby fddima » Wed Mar 06, 2013 3:30 pm

Hi!
Good news. You are have plans to enable PPAPI plugins by default later, right?
fddima
Master
 
Posts: 788
Joined: Tue Dec 07, 2010 6:10 am

Re: Testing Pepper (PPAPI) plugin support

Postby magreenblatt » Wed Mar 06, 2013 4:20 pm

fddima wrote:Hi!
Good news. You are have plans to enable PPAPI plugins by default later, right?

PPAPI support is enabled, it's just a matter of configuring it to find your plugins as described in the design document.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Testing Pepper (PPAPI) plugin support

Postby fddima » Wed Mar 06, 2013 4:59 pm

magreenblatt wrote:
fddima wrote:Hi!
Good news. You are have plans to enable PPAPI plugins by default later, right?

PPAPI support is enabled, it's just a matter of configuring it to find your plugins as described in the design document.

Thanks, clear. It is my bad. And it is working.

PS: I'm also trying to run chrome's pdf plugin (27.0.1430.0, so versions mismatch) - it is crashed. Probably it is normal. :)
fddima
Master
 
Posts: 788
Joined: Tue Dec 07, 2010 6:10 am

Re: Testing Pepper (PPAPI) plugin support

Postby magreenblatt » Wed Mar 06, 2013 5:20 pm

fddima wrote:
magreenblatt wrote:
fddima wrote:Hi!
Good news. You are have plans to enable PPAPI plugins by default later, right?

PPAPI support is enabled, it's just a matter of configuring it to find your plugins as described in the design document.

Thanks, clear. It is my bad. And it is working.

PS: I'm also trying to run chrome's pdf plugin (27.0.1430.0, so versions mismatch) - it is crashed. Probably it is normal. :)

The bundled PDF plugin uses undisclosed/unstable APIs so I'm not surprised a version mismatch would cause crashes. If you had exactly the same version it would probably work, but there are still the potential licensing issues with distributing it.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Testing Pepper (PPAPI) plugin support

Postby jholt » Tue May 13, 2014 10:31 am

A couple questions:

1. Is PNaCl/Pepper support available in the binary downloads from cefbuilds.com, or is it required to build from source to enable it? (I'm suspecting the latter from my tests so far)

I'm attempting to get the PNaCl demo to work using the cefclient sample application (from cef_binary_3.1916.1701_windows32, #define CEF_ENABLE_SANDBOX 0) from this site using the following command line:

cefclient --ppapi-out-of-process --url=http://trypepperjs.appspot.com/examples.html

I do get some console debug info, but I'm not sure if it's related to why PNaCl isn't enabled:
Code: Select all
Message: 'CanvasRenderingContext2D.webkitPutImageDataHD' is deprecated. Please use putImageData instead.
Source:
Line: 0
-----------------------
Message: Create instance: 870 ms
Source: http://gonacl.commondatastorage.googleapis.com/pepper.js/common.js
Line: 203
-----------------------


The PNaCl option is enabled (and the demos work) for this site when using Chrome, but not with CEF3. When I go to the "help" page, I get the interesting warning that:

Code: Select all
The PNaCl examples will not work in your browser. PNaCl requires Chrome 31 or newer. You are running Chrome 35.

Note: The PNaCl translator is currently downloaded asynchronously from the main Chrome distribution, and in theory translation may fail if the newest version has not yet been downloaded. If the PNaCl examples are not working you may need to wait a bit and restart the browser. You can also go to chrome://components and click "Check for update" to push it along.


2. If I need to enable PPAPI/PNaCl - what flag controls this? For my final use case, I can use the "trusted plugin" mode, however I assume the web page I'm trying to test against currently would qualify as "untrusted".
jholt
Techie
 
Posts: 27
Joined: Fri May 02, 2014 4:29 pm

Re: Testing Pepper (PPAPI) plugin support

Postby magreenblatt » Tue May 13, 2014 10:34 am

jholt wrote: If I need to enable PPAPI/PNaCl - what flag controls this?

As described in the original post you need to have the plugin available locally and use the --register-pepper-plugins flag.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Testing Pepper (PPAPI) plugin support

Postby jholt » Tue May 13, 2014 10:49 am

I will pursue testing the locally available plugin, and presume this means the PPAPI is not enabled in the cefbuilds.com binaries.

I'm still not sure what to expect when I don't have a local plugin, however.

Chrome works, but CEF (from binary distro) fails to work with the PNaCl demos on the http://trypepperjs.appspot.com/examples.html page.

After building with the '../ppapi/ppapi_internal.gyp' dependency added, should CEF work with those demos, or does CEF only work for PNaCl locally available plugins?
jholt
Techie
 
Posts: 27
Joined: Fri May 02, 2014 4:29 pm

Re: Testing Pepper (PPAPI) plugin support

Postby magreenblatt » Tue May 13, 2014 10:51 am

jholt wrote:I will pursue testing the locally available plugin, and presume this means the PPAPI is not enabled in the cefbuilds.com binaries.

What do you mean by "not enabled"? It should work if you pass the correct command-line flags. It won't download and run arbitrary plugins from the internet, and it doesn't auto-detect plugins installed by Google Chrome.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Testing Pepper (PPAPI) plugin support

Postby jholt » Tue May 13, 2014 11:34 am

Chrome 34 works with the PNaCl demos @ http://trypepperjs.appspot.com/examples.html and (by default) the CEF3-based cefclient demo does not. From my (limited) knowledge of what Chrome enhances over the binary builds of CEF, this was unexpected, and I'm trying to determine why (missing command line flags, or not built into cefbuilds.com binaries, etc.)

I may be failing to pass the correct command-line flags to make those PNaCl samples work. I've compared my Chrome plugins (chrome://plugins/) with those shown in cefclient/Tests/Plugin, and the only difference I see that Chrome shows the Native Client plugin present (it isn't present in CEFs).

I've tried both the "--enable-nacl" and specifying the plugin directly, but cefclient still doesn't show the PNaCl demos as runnable on this page (and Native Client isn't showing up on the Installed plugins list)

Code: Select all
--enable-nacl --ppapi-out-of-process --plugin-path=C:\Program Files (x86)\Google\Chrome\Application\34.0.1847.131\ppGoogleNaClPluginChrome.dll --url=http://trypepperjs.appspot.com/examples.html


As I mentioned, my final use case is to have a local plugin, so I'll pursue your original instructions and try out the example_paint_manager sample first. I'm just curious as to why that demo page would work in Chrome and not in CEF.
jholt
Techie
 
Posts: 27
Joined: Fri May 02, 2014 4:29 pm

Next

Return to CEF Discussion

Who is online

Users browsing this forum: No registered users and 26 guests