1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| let pluginName = null let pluginPath = null switch (process.platform) { case 'win32': pluginName = 'pepflashplayer.dll' break case 'darwin': pluginName = 'PepperFlashPlayer.plugin' break case 'linux': pluginName = 'libpepflashplayer.so' break }
if (__dirname.includes(".asar")) { pluginPath = path.join(process.resourcesPath + '/lib/' + pluginName) } else { pluginPath = path.resolve(__dirname + '/lib/' + pluginName) }
app.commandLine.appendSwitch('ppapi-flash-path', pluginPath)
app.commandLine.appendSwitch('ppapi-flash-version', '32.0.0.363')
|
三个平台flash下载地址:https://wong-1251253615.cos.ap-shanghai.myqcloud.com/blog/images/2020-05-14/flash.7z