Flash is unavailable - Electron app (Chromium browser)

Viewed 474

I am trying to play Flash content in my electron app (Chromium browser). For that I have added pepflashplayer.dll in my project parallel to index.js and added below code suggested everywhere -

var app = require('app');
// Added browser-window, path as well...

if (process.platform == 'win32') {
    ppapi_flash_path = path.join(__dirname, 'pepflashplayer.dll');
} else if (process.platform == 'linux') {
    ppapi_flash_path = path.join(__dirname, 'libpepflashplayer.so');
} else if (process.platform == 'darwin') {
    ppapi_flash_path = path.join(__dirname, 'PepperFlashPlayer.plugin');
}

app.commandLine.appendSwitch('ppapi-flash-path', ppapi_flash_path);
app.commandLine.appendSwitch('ppapi-flash-version', '24.0.0.221');


app.on('ready', function() {
    mainWindow = new BrowserWindow({
        // https://github.com/atom/electron/blob/master/docs/api/browser-window.md
        'min-width': 1000,
        'min-height': 400,
        width: 1200,
        height: 600,
        center: true,
        resizable: true,
        webPreferences: {
            plugins: true
        }
    });

    mainWindow.loadUrl(`file://${__dirname}/index.html`);
});

But whenever I am playing flash content, I am getting this error -

Flash is unavailable in your browser

I have tried with 64bit as well as 32bit DLLs. Tried to download DLLs form multiple sources and used the one available with Chrome browser as well but no luck.

Would really appreciate for any help. Thanks!

0 Answers
Related