Moved audio processing outside of main window
This commit is contained in:
parent
9fcf5e5708
commit
1ad5baef14
4 changed files with 21 additions and 3 deletions
|
@ -12,7 +12,7 @@
|
||||||
"test": "echo \"Error: no test specified\" && exit 1",
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
"lint": "eslint -c node_modules/eslint-config/.eslintrc 'src/'",
|
"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": "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/"
|
"build-fonts": "cp -R node_modules/ionicons/fonts build/ && cp -R node_modules/bootstrap/fonts build/"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
9
src/audio.html
Normal file
9
src/audio.html
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Audio Controller Window</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script src="js/audio.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -11,6 +11,5 @@
|
||||||
|
|
||||||
<script src="js/app.js"></script>
|
<script src="js/app.js"></script>
|
||||||
<script src="lib/bootstrap.js"></script>
|
<script src="lib/bootstrap.js"></script>
|
||||||
<script src="js/audio.js"></script>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
10
src/main.js
10
src/main.js
|
@ -12,6 +12,7 @@ require('crash-reporter').start(); // Start crash reporter
|
||||||
var menu = new Menu();
|
var menu = new Menu();
|
||||||
Menu.setApplicationMenu(menu);
|
Menu.setApplicationMenu(menu);
|
||||||
var mainWindow = null;
|
var mainWindow = null;
|
||||||
|
var audioController = null;
|
||||||
|
|
||||||
// Make sure the application closes
|
// Make sure the application closes
|
||||||
app.on('window-all-closed', function () {
|
app.on('window-all-closed', function () {
|
||||||
|
@ -31,7 +32,16 @@ app.on('ready', function () {
|
||||||
|
|
||||||
mainWindow.on('closed', function() {
|
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 () {
|
ipc.on('hide', function () {
|
||||||
|
|
Reference in a new issue