standardize all javascript blocks in English docs
This commit is contained in:
parent
dd9935a9d7
commit
06a354a2eb
37 changed files with 567 additions and 445 deletions
|
@ -51,23 +51,26 @@ enabled.
|
|||
Example code:
|
||||
|
||||
```javascript
|
||||
const {app, BrowserWindow} = require('electron')
|
||||
|
||||
// You have to pass the filename of `widevinecdmadapter` here, it is
|
||||
// * `widevinecdmadapter.plugin` on macOS,
|
||||
// * `libwidevinecdmadapter.so` on Linux,
|
||||
// * `widevinecdmadapter.dll` on Windows.
|
||||
app.commandLine.appendSwitch('widevine-cdm-path', '/path/to/widevinecdmadapter.plugin');
|
||||
app.commandLine.appendSwitch('widevine-cdm-path', '/path/to/widevinecdmadapter.plugin')
|
||||
// The version of plugin can be got from `chrome://plugins` page in Chrome.
|
||||
app.commandLine.appendSwitch('widevine-cdm-version', '1.4.8.866');
|
||||
app.commandLine.appendSwitch('widevine-cdm-version', '1.4.8.866')
|
||||
|
||||
let win = null;
|
||||
let win = null
|
||||
app.on('ready', () => {
|
||||
win = new BrowserWindow({
|
||||
webPreferences: {
|
||||
// The `plugins` have to be enabled.
|
||||
plugins: true
|
||||
}
|
||||
});
|
||||
});
|
||||
})
|
||||
win.show()
|
||||
})
|
||||
```
|
||||
|
||||
## Verifying the plugin
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue