1
Fork 0

Moved audio processing outside of main window

This commit is contained in:
Jake Howard 2015-11-04 13:29:30 +00:00
parent 9fcf5e5708
commit 1ad5baef14
4 changed files with 21 additions and 3 deletions

View File

@ -12,7 +12,7 @@
"test": "echo \"Error: no test specified\" && exit 1",
"lint": "eslint -c node_modules/eslint-config/.eslintrc 'src/'",
"build": "npm run create-build-dirs && npm run build-fonts && npm run build-html && npm run build-js && npm run build-less",
"build-html": "cp src/index.html build/index.html",
"build-html": "cp src/index.html build/index.html && cp src/audio.html build/audio.html",
"build-fonts": "cp -R node_modules/ionicons/fonts build/ && cp -R node_modules/bootstrap/fonts build/"
},
"repository": {

9
src/audio.html Normal file
View File

@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<title>Audio Controller Window</title>
</head>
<body>
<script src="js/audio.js"></script>
</body>
</html>

View File

@ -11,6 +11,5 @@
<script src="js/app.js"></script>
<script src="lib/bootstrap.js"></script>
<script src="js/audio.js"></script>
</body>
</html>

View File

@ -12,6 +12,7 @@ require('crash-reporter').start(); // Start crash reporter
var menu = new Menu();
Menu.setApplicationMenu(menu);
var mainWindow = null;
var audioController = null;
// Make sure the application closes
app.on('window-all-closed', function () {
@ -30,8 +31,17 @@ app.on('ready', function () {
mainWindow.toggleDevTools();
mainWindow.on('closed', function() {
mainWindow = undefined;
mainWindow = undefined;
audioController.close();
});
audioController = new BrowserWindow({
width: 1,
height: 1,
hide: true,
frame: false
});
audioController.loadUrl('file://' + __dirname + '/audio.html');
});
ipc.on('hide', function () {