diff --git a/main.js b/main.js new file mode 100644 index 0000000..30f98d4 --- /dev/null +++ b/main.js @@ -0,0 +1,23 @@ +const { app, BrowserWindow } = require('electron') +const createWindow = () => { + const win = new BrowserWindow({ + width: 800, + height: 600, + autoHideMenuBar: true, + }) + + win.loadFile('index.html') + } + app.whenReady().then(() => { + createWindow() + }) + app.on('window-all-closed', () => { + if (process.platform !== 'darwin') app.quit() + }) + app.whenReady().then(() => { + createWindow() + + app.on('activate', () => { + if (BrowserWindow.getAllWindows().length === 0) createWindow() + }) + }) \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..06dea26 --- /dev/null +++ b/package.json @@ -0,0 +1,13 @@ +{ + "name": "PsychometricStudyVideoPlayer", + "version": "1.0.0", + "description": "customized video player for special video analysis", + "main": "main.js", + "repository": "https://github.com/Largo/PsychometricStudyVideoPlayer.git", + "author": "Andi ", + "license": "MIT", + "private": true, + "scripts": { + "start": "electron ." + } +}