# Using Pepper Flash Plugin
-Electron now supports the Pepper Flash plugin. To use the Pepper Flash plugin in
+Electron supports the Pepper Flash plugin. To use the Pepper Flash plugin in
Electron, you should manually specify the location of the Pepper Flash plugin
and then enable it in your application.
are useful for Electron's Pepper Flash support. You can also copy it to another
location.
-_**Attention:** On windows, Pepper Flash plugin is win32 and it won't work with Electron x64 version.
-<br>Get win32 version from [Electron Releases](https://github.com/electron/electron/releases)_
-
## Add Electron Switch
You can directly add `--ppapi-flash-path` and `ppapi-flash-version` to the
Electron command line or by using the `app.commandLine.appendSwitch` method
-before the app ready event. Also, add the `plugins` switch of `browser-window`.
+before the app ready event. Also, turn on `plugins` option of `BrowserWindow`.
For example:
```javascript
app.on('ready', function() {
mainWindow = new BrowserWindow({
- 'width': 800,
- 'height': 600,
- // web-preferences is deprecated. Use webPreferences instead.
- 'webPreferences': {
- 'plugins': true
+ width: 800,
+ height: 600,
+ webPreferences: {
+ plugins: true
}
});
mainWindow.loadURL('file://' + __dirname + '/index.html');
});
```
-_**Attention:** You can check if Flash dll was loaded by running `navigator.plugins` on the Console (although you can't know if the plugin's path is correct)_
-
## Enable Flash Plugin in a `<webview>` Tag
Add `plugins` attribute to `<webview>` tag.
```html
<webview src="http://www.adobe.com/software/flash/about/" plugins></webview>
```
+
+## Troubleshooting
+
+You can check if Pepper Flash plugin was loaded by inspecting
+`navigator.plugins` in the console of devtools (although you can't know if the
+plugin's path is correct).
+
+The architecture of Pepper Flash plugin has to match Electron's one. On Windows,
+a common error is to use 32bit version of Flash plugin against 64bit version of
+Electron.