LoginSignup
3
3

More than 5 years have passed since last update.

windows環境でElectronからflashを使えるようにした

Last updated at Posted at 2017-06-10

Electronでflashが使われているページを開くとプラグインがないと言われてしまう。
pepper flash pluginというものを使えばいいようだが、windowsで行う場合がすぐ見つからなかったのでメモ

windows10でpepper flash pluginは以下にあったので、
使いやすいようにpepflashplayer64XXX.dllをコピーしておいた。
C:\Windows\System32\Macromed\Flash\

とりあえず艦隊これくしょんを開いてみた。

main.ts
///<reference path="./typings/index.d.ts"/>

// In the main process.
const { app, BrowserWindow } = require('electron')
const path = require('path');

const ppapi_flash_path: string = path.join(__dirname, 'pepflashplayer64_25_0_0_171.dll');
app.commandLine.appendSwitch('ppapi-flash-path', ppapi_flash_path);

app.on('window-all-closed', () => {
    app.quit()
})

app.on('ready', () => {
    let win = new BrowserWindow({ width: 800, height: 600, 'webPreferences': { 'plugins': true } })
    // load a page
    win.loadURL('http://www.dmm.com/netgame/social/-/gadgets/=/app_id=854854/')
    console.log(app.getAppPath())
})

ちゃんと開けた
WS000422.JPG

参考
tutorial/using-pepper-flash-plugin
https://github.com/electron/electron/blob/master/docs/tutorial/using-pepper-flash-plugin.md

3
3
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3