1
Fork 0
This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
Keyboard-Mechanizer/src/js/audio-controller.js

40 lines
676 B
JavaScript

var BrowserWindow = require('browser-window');
var ipc = require('ipc');
var playerWindow;
function startWindow() {
playerWindow = new BrowserWindow({
width: 0,
height: 0,
show: false,
frame: false,
transparent: true,
'skip-taskbar': true
});
playerWindow.loadUrl('file://' + __dirname + '/audio.html');
buildEvents();
return playerWindow;
}
function buildEvents() {
playerWindow.on('closed', function () { delete playerWindow; });
}
function getWindow() {
return playerWindow;
}
function play() {
console.log("CLICK!");
}
ipc.on('play', function () {
play();
});
module.exports = {
getWindow: getWindow,
startWindow: startWindow,
play: play
};