Using flash inside my electron app


#1

Hello so I’m developing an app using electron and something inside my app needs flash to work! but i can’t figure out how to add flash to my app!


Pepper-flash-pulgin not working
#2

I don’t see how it would be any different from embedding Flash into a normal website.Views in Electron are usually websites.


#3

Electron probably doesn’t include the Pepper Flash component, which is proprietary software.


#4

It’s in the docs :wink:


#5

i did include pepper but flash is not working,

Hello, i need to run flash but the flash object on my page keeps telling me couldn’t load plugin
here is my main.js

const {app, BrowserWindow} = require(‘electron’)
const path = require(‘path’)

    // Specify flash path, supposing it is placed in the same directory with main.js.
    let pluginName
    switch (process.platform) {
    case 'win32':
    pluginName = 'pepflashplayer32_22_0_0_209.dll'
    break
    case 'darwin':
    pluginName = 'PepperFlashPlayer.plugin'
    break
    case 'linux':
    pluginName = 'libpepflashplayer.so'
    break
    }
    app.commandLine.appendSwitch('ppapi-flash-path', path.join(__dirname, pluginName))
    
    // Optional: Specify flash version, for example, v17.0.0.169
    app.commandLine.appendSwitch('ppapi-flash-version', '22.0.0.209')
    app.getPath('pepperFlashSystemPlugin')
    app.on('ready', () => {
    let win = new BrowserWindow({
    width: 800,
    height: 600,
    webPreferences: {
    plugins: true
    }
    })
    win.loadURL(`file://${__dirname}/index.html`)
    win.toggleDevTools();
    // Something else
    })

here is my package.json

{
“name”: “Flash player”,
“version”: “0.0.1”,
“description”: "description ",
“main”: “main.js”,
“scripts”: {
“start”: “electron .”
},
“keywords”: [
],
“author”: “JoAcademy”,
“license”: “MIT”,
“devDependencies”: {
“electron-prebuilt”: “^1.4.2”
}
}

here is my index.html

title

<webview width="100%" height="100%" src="http://www.adobe.com/software/flash/about/" plugins>
</webview>
and here are the files in my project including the pepper plugin


#6

See my post here where I answered my own question …

https://discuss.atom.io/t/does-flash-really-work-now/21887


#8

Does flash really work now?

Yes

Troubleshooting: > A common error is to use 32bit version of Flash plugin against 64bit version of Electron.

On Windows, the directory is under C:\Windows\SysWOW64\Macromed\Flash(32-bits) and C:\Windows\System32\Macromed\Flash(64-bits).

In my case, Electron paired with Flash(64-bits), finally worked!