I am using chromium command line switch --launch-and-load-app
to start a chromium instance that shows only the app that I am developing. This is working well.
Also, I am using --register-pepper-plugins
to specify a shared library containing a PPAPI plugin. This too works well, so long as --launch-and-load-app
is not specified.
Unfortunately, when the two are combined, instead of the plugin being loaded, only a box appears saying "right-click to play my-plugin.so
". Right-clicking does not bring up an option to load the plugin.
How can I cause the plugin to play when using --launch-and-load-app
?
Create a temporary directory to act as chromium's user data directory.
Launch chromium
specifying --user-data-dir=<the temp directory>
, as well as the appropriate --register-pepper-plugins
switch.
Visit a page containing an <embed>
that loads your plugin.
Visit chrome://plugins
. Find your plugin, and select 'Always allowed to run
"
Save a snapshot of the temporary user data directory; it can be used as the data directory to start an instance of chromium
in which your plugin will run.