Reputation: 13
i have this code for convert website to exe file using electon js but i have problem inside the website there are .swf files and i search alot about how i can run .swf files but it's not work i was traing by plugin it's name "Pepper Flash Plugin" this is the url for this plugin
https://electron.atom.io/docs/tutorial/using-pepper-flash-plugin/
and i was searsh about "pepflashplayer.dll"
and put it on the root on prject directory and also not work
any help please
file:main.js
'use strict';
const electron = require('electron');
const path = require('path');
const app = electron.app; // Module to control application life.
const BrowserWindow = electron.BrowserWindow; // Module to create native browser window.
// Specify flash path, supposing it is placed in the same directory with main.js.
let pluginName
switch (process.platform) {
case 'win32':
pluginName = 'pepflashplayer.dll'
break
case 'darwin':
pluginName = 'PepperFlashPlayer.plugin'
break
case 'linux':
pluginName = 'libpepflashplayer.so'
break
}
app.commandLine.appendSwitch('ppapi-flash-path', path.join(__dirname, pluginName))
var mainWindow = null;
app.on('ready', function() {
mainWindow = new BrowserWindow({width: 1100, height: 900, webPreferences: {
plugins: true
}});
// and load the index.html of the app.
mainWindow.loadURL('file://' + __dirname + '/cd/cd/START.html');
});
Upvotes: 1
Views: 2126
Reputation: 2179
case 'win32':
pluginName = 'pepflashplayer.dll'
You simply need to put in the directory to where your dll file is located
Currently (June 2017) it is stored at: C:\Users\USER\AppData\Local\Google\Chrome\User Data\PepperFlash\26.0.0.126
case 'win32':
pluginName = 'C:\Users\USER\AppData\Local\Google\Chrome\User Data\PepperFlash\26.0.0.126\pepflashplayer.dll'
OR
copy the dll to your app's directory and point it to there
case 'win32':
pluginName = './pepflashplayer.dll'
Upvotes: 1