translate zh-TW tutorial using-pepper-flash-plugin.md
This commit is contained in:
parent
15ce59be64
commit
8309e38ce9
2 changed files with 17 additions and 22 deletions
|
@ -8,7 +8,7 @@
|
||||||
* [主行程 Debug](tutorial/debugging-main-process.md)
|
* [主行程 Debug](tutorial/debugging-main-process.md)
|
||||||
* [使用 Selenium 和 WebDriver](tutorial/using-selenium-and-webdriver.md)
|
* [使用 Selenium 和 WebDriver](tutorial/using-selenium-and-webdriver.md)
|
||||||
* [DevTools 擴充](tutorial/devtools-extension.md)
|
* [DevTools 擴充](tutorial/devtools-extension.md)
|
||||||
* [使用 Pepper Flash 套件](tutorial/using-pepper-flash-plugin.md)
|
* [使用 Pepper Flash 外掛](tutorial/using-pepper-flash-plugin.md)
|
||||||
|
|
||||||
## 教學
|
## 教學
|
||||||
|
|
||||||
|
|
|
@ -1,31 +1,26 @@
|
||||||
# Using Pepper Flash Plugin
|
# 使用 Pepper Flash 外掛
|
||||||
|
|
||||||
Electron now supports the Pepper Flash plugin. To use the Pepper Flash plugin in
|
Electron 現在支援 Pepper Flash 外掛,要在 Electron 中使用 Pepper Flash 外掛,你應該手動指定 Pepper Flash 外掛的位置,並在你的應用程式中啟用它。
|
||||||
Electron, you should manually specify the location of the Pepper Flash plugin
|
|
||||||
and then enable it in your application.
|
|
||||||
|
|
||||||
## Prepare a Copy of Flash Plugin
|
## 準備一份 Flash 外掛
|
||||||
|
|
||||||
On OS X and Linux, the details of the Pepper Flash plugin can be found by
|
在 OS X 和 Linux 上,Pepper Flash 外掛的細節可以透過查看 Chrome 瀏覽器中的 `chrome://plugins` 來得知,它的位置和版本對於 Electron 的 Pepper Flash 支援都有很大的幫助,你可以把它複製一份到別的位置。
|
||||||
navigating to `chrome://plugins` in the Chrome browser. Its location and version
|
|
||||||
are useful for Electron's Pepper Flash support. You can also copy it to another
|
|
||||||
location.
|
|
||||||
|
|
||||||
## Add Electron Switch
|
## 加入 Electron 開關
|
||||||
|
|
||||||
You can directly add `--ppapi-flash-path` and `ppapi-flash-version` to the
|
你可以直接加入 `--ppapi-flash-path` 和 `ppapi-flash-version` 到
|
||||||
Electron command line or by using the `app.commandLine.appendSwitch` method
|
Electron 命定列或是在應用程式的 ready 事件之前使用 `app.commandLine.appendSwitch` 方法,並且加入 `browser-window` 的 `plugins` 開關。
|
||||||
before the app ready event. Also, add the `plugins` switch of `browser-window`.
|
|
||||||
For example:
|
例如:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
// Specify flash path.
|
// 指定 Flash 路徑
|
||||||
// On Windows, it might be /path/to/pepflashplayer.dll
|
// Windows 中可能是 /path/to/pepflashplayer.dll
|
||||||
// On OS X, /path/to/PepperFlashPlayer.plugin
|
// OS X 中 /path/to/PepperFlashPlayer.plugin
|
||||||
// On Linux, /path/to/libpepflashplayer.so
|
// Linux 中 /path/to/libpepflashplayer.so
|
||||||
app.commandLine.appendSwitch('ppapi-flash-path', '/path/to/libpepflashplayer.so');
|
app.commandLine.appendSwitch('ppapi-flash-path', '/path/to/libpepflashplayer.so');
|
||||||
|
|
||||||
// Specify flash version, for example, v17.0.0.169
|
// 指定 Flash 版本, 例如 v17.0.0.169
|
||||||
app.commandLine.appendSwitch('ppapi-flash-version', '17.0.0.169');
|
app.commandLine.appendSwitch('ppapi-flash-version', '17.0.0.169');
|
||||||
|
|
||||||
app.on('ready', function() {
|
app.on('ready', function() {
|
||||||
|
@ -41,9 +36,9 @@ app.on('ready', function() {
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
## Enable Flash Plugin in a `<webview>` Tag
|
## 在一個 `<webview>` Tag 中啟用 Flash 外掛
|
||||||
|
|
||||||
Add `plugins` attribute to `<webview>` tag.
|
把 `plugins` 屬性加入 `<webview>` tag。
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<webview src="http://www.adobe.com/software/flash/about/" plugins></webview>
|
<webview src="http://www.adobe.com/software/flash/about/" plugins></webview>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue