diff --git a/pepper-flash-plugin/main.js b/pepper-flash-plugin/main.js index ce79fc9..e6b0e11 100644 --- a/pepper-flash-plugin/main.js +++ b/pepper-flash-plugin/main.js @@ -1,15 +1,14 @@ -var app = require('app'); -var path = require('path'); -var BrowserWindow = require('browser-window'); +const {app, BrowserWindow} = require('electron'); +const path = require('path'); -var mainWindow = null; +let mainWindow; app.on('window-all-closed', function() { if (process.platform != 'darwin') app.quit(); }); -var ppapi_flash_path = null; +let ppapi_flash_path; // Specify flash path. // On Windows, it might be /path/to/pepflashplayer.dll @@ -34,5 +33,5 @@ app.on('ready', function() { 'height': 600, 'web-preferences': {'plugins': true} }); - mainWindow.loadUrl('http://www.adobe.com/software/flash/about/'); + mainWindow.loadURL('http://www.adobe.com/software/flash/about/'); }); diff --git a/pepper-flash-plugin/package.json b/pepper-flash-plugin/package.json index 54276c4..70a6d4b 100644 --- a/pepper-flash-plugin/package.json +++ b/pepper-flash-plugin/package.json @@ -1,5 +1,5 @@ -{ - "name" : "pepper-flash-plugin-sample", - "version" : "0.1.0", - "main" : "main.js" -} +{ + "name" : "pepper-flash-plugin-sample", + "version" : "1.1.0", + "main" : "main.js" +} diff --git a/pepper-flash-plugin/readme.md b/pepper-flash-plugin/readme.md index 37c91b9..6fb13c6 100644 --- a/pepper-flash-plugin/readme.md +++ b/pepper-flash-plugin/readme.md @@ -1,7 +1,7 @@ # Pepper-Flash-Plugin Sample A sample shows Pepper Flash Plugin usage in Electron. More details can be found -at https://github.com/atom/electron/blob/master/docs/tutorial/using-pepper-flash-plugin.md. +at https://github.com/electron/electron/blob/master/docs/tutorial/using-pepper-flash-plugin.md. ## Run steps @@ -15,7 +15,7 @@ If it succees, you can view `You have version X.X.X.X installed` in the sample p ## Ways to find pepper flash plugin 1. Copy from Chrome Browser: you can find the plugin(`Adobe Flash Player`) location -by navigating `chrome:://plugins` in Chrome Browser. +by navigating `chrome://plugins` in Chrome Browser. 2. Manually install Adobe Flash Player from https://get.adobe.com/flashplayer/otherversions/. Then you can find plugin in the installed directory, ie. On Windows, the directory @@ -29,7 +29,6 @@ This means you mixing up the architectures. You need to make the architecture of flash plugin consitent with Electron you run, e.g., load 32-bit flash plugin in 32-bit Electron. - ## Screenshot ![screenshot](/pepper-flash-plugin/screenshot/screenshot.png)