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())
})
参考
tutorial/using-pepper-flash-plugin
https://github.com/electron/electron/blob/master/docs/tutorial/using-pepper-flash-plugin.md