1、在electron的主程序中输出
console.log(111111111111,app.getPath('pepperFlashSystemPlugin'));
获取pepflashplayer.dll的版本和文件路径
2、
let plugins = path.join(__dirname,`./libs/flash/pepflashplayer64_32_0_0_255.dll`)
app.commandLine.appendSwitch('ppapi-flash-path',plugins);
app.commandLine.appendSwitch('ppapi-flash-version',`32.0.0.255`);
允许插件运行
mainWindow = new BrowserWindow({
width: 980,
minWidth:980,
height: 600,
minHeight:600,
frame: false,// 设置为 false 时可以创建一个Frameless Window. 默认值为 true
resizable: true,// 窗口是否可以改变尺寸. 默认值为true.
maximizable: true,// 窗口是否可以最大化动. 在 Linux 中无效. 默认值为 true.
transparent: true,// 使窗口 透明. 默认值为 false.
show: false,// 窗口创建的时候是否显示. 默认值为true.
alwaysOnTop: false,// 窗口是否永远在别的窗口的上面. 默认值为false.
webPreferences: {
nodeIntegration: true,
allowRunningInsecureContent:true,
plugins:true
}
})