I'm unable to harness PPAPI Flash in app packaged by electron packager under MAC OS X
OS: MacOS X 10.10 Yosemite
Electron: 0.30.3
Sample app: https://github.com/hokein/electron-sample-apps/tree/master/pepper-flash-plugin
NOTE: Windows and Linux packaged apps work well
I was having issues with Flash not working until I added 'web-preferences': {'plugins': true} to the new BrowserWindow() options. This was with version 0.31.0
Thanks, but I have this flag set already.
https://github.com/hokein/electron-sample-apps/blob/master/pepper-flash-plugin/main.js#L35
atom/electron#2457
I'm hitting this only when using the "--asar" option.
Hi i have the same issue and i actually remove the --asar flag already still flash plugin can't be detected
I had the same issue, but after upgrading electron packager from 4.2.0 to 5.1.0 the "X Helper EH.app" was named with the correct application name and "navigator.plugins" is now populated (even with --asar flag).
@jespermjonsson i'm using:
"electron-packager": "^5.1.0",
Verified it works on electron-package v5.1.0 with https://github.com/hokein/electron-sample-apps/tree/master/pepper-flash-plugin sample:
electron-packager ./ flash --asar --platform=darwin --arch=x64 --version=0.34.0
But it won't work with --asar option.
@hokein My app is working when using npm start, but not when packaging the app. Do I have to copy PepperFlashPlayer.plugin after packaging my app? I tried many folders in Contents... Did you want to say that it is working only without the --asar option?
What should the path be:
app.commandLine.appendSwitch('ppapi-flash-path', 'PepperFlashPlayer.plugin');
or
app.commandLine.appendSwitch('ppapi-flash-path', './PepperFlashPlayer.plugin');
@patricksebastien I've found that binaries can't be run from inside of an asar package. Try moving the plugin to asar-unpacked dir.
@positlabs Yes did that but how to call the plugin, I tried:
app.commandLine.appendSwitch('ppapi-flash-path', __dirname + '/../app.asar.unpacked/PepperFlashPlayer.plugin');
not working...
This is how I determine the path to a bin in app.asar.unpacked: __dirname.replace('app.asar', 'app.asar.unpacked') + '/gifsicle'
Closing this out, the specified path to the flash plugin must in the app.asar.unpacked folder if are using the --asar option to packager. You can use the --asar.unpack options of packager to make that happen.
@kevinsawicki by which you mean --asar.unpack 馃槃
Most helpful comment
@kevinsawicki by which you mean
--asar.unpack馃槃