-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.js
More file actions
24 lines (20 loc) · 765 Bytes
/
Copy pathmain.js
File metadata and controls
24 lines (20 loc) · 765 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
require('dotenv').config();
const electron = require('electron');
const path = require('path');
const url = require('url');
const MainWindow = require('./app/MainWindow');
const CaptureTray = require('./app/CaptureTray');
const { app, BrowserWIndow, Tray, Menu, ipcMain, desktopCapturer } = electron;
const startUrl = require('./config/keys').startUrl;
let mainWindow;
let tray;
app.on('ready', () => {
const iconPath = path.join(__dirname, './src/assets/capture_tray_icon.png');
const contextMenu = Menu.buildFromTemplate([
{ label: 'Record', type: 'radio' },
{ label: 'Stop', type: 'radio' }
]);
console.log('Main window loading from: ', startUrl);
mainWindow = new MainWindow(startUrl);
tray = new CaptureTray(iconPath, contextMenu);
});