-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.js
28 lines (19 loc) · 851 Bytes
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
if (process.platform == 'win32')
process.env['VLC_PLUGIN_PATH'] = require('path').join(__dirname, '../../wcjs-prebuilt/bin/plugins');
const electron=require('electron');
const app = electron.app; // Module to control application life.
const BrowserWindow = electron.BrowserWindow; // Module to create native browser window.
let mainWindow;
// This method will be called when Electron has done everything
// initialization and ready for creating browser windows.
app.on('ready', function() {
// Create the browser window.
mainWindow = new BrowserWindow({width: 960, height: 720});
// and load the index.html of the app.
mainWindow.loadURL(`file://${__dirname}/index.html`);
mainWindow.openDevTools({detach: true});
// Emitted when the window is closed.
mainWindow.on('closed', function() {
mainWindow = null;
});
});