Merge branch 'michal1106-patch-1'
This commit is contained in:
commit
db91adc2e8
1 changed files with 18 additions and 8 deletions
|
@ -1,6 +1,6 @@
|
|||
# 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.
|
||||
|
||||
|
@ -15,25 +15,25 @@ location.
|
|||
|
||||
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
|
||||
// Specify flash path.
|
||||
// On Windows, it might be /path/to/pepflashplayer.dll
|
||||
// On Windows, it might be /path/to/pepflashplayer.dll or just pepflashplayer.dll if it resides main.js
|
||||
// On OS X, /path/to/PepperFlashPlayer.plugin
|
||||
// On Linux, /path/to/libpepflashplayer.so
|
||||
app.commandLine.appendSwitch('ppapi-flash-path', '/path/to/libpepflashplayer.so');
|
||||
|
||||
// Specify flash version, for example, v17.0.0.169
|
||||
// Optional: Specify flash version, for example, v17.0.0.169
|
||||
app.commandLine.appendSwitch('ppapi-flash-version', '17.0.0.169');
|
||||
|
||||
app.on('ready', function() {
|
||||
mainWindow = new BrowserWindow({
|
||||
'width': 800,
|
||||
'height': 600,
|
||||
'web-preferences': {
|
||||
'plugins': true
|
||||
width: 800,
|
||||
height: 600,
|
||||
webPreferences: {
|
||||
plugins: true
|
||||
}
|
||||
});
|
||||
mainWindow.loadURL('file://' + __dirname + '/index.html');
|
||||
|
@ -48,3 +48,13 @@ 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.
|
||||
|
|
Loading…
Reference in a new issue