discord-sandboxed/renderer.js

22 lines
533 B
JavaScript
Raw Normal View History

2019-10-13 00:21:12 +00:00
const customTitlebar = require('custom-electron-titlebar');
t = new customTitlebar.Titlebar({
backgroundColor: customTitlebar.Color.fromHex('#444')
});
2019-10-12 02:52:09 +00:00
require('electron').ipcRenderer.on('ping', (event, message) => {
if (message === 'mic-open'){
console.log("mic is open")
2019-10-12 23:49:31 +00:00
playSound()
2019-10-12 02:52:09 +00:00
}
if (message === 'mic-closed'){
console.log("mic is closed")
2019-10-12 23:49:31 +00:00
playSound()
2019-10-12 02:52:09 +00:00
}
})
2019-10-12 23:49:31 +00:00
function playSound() {
var sound = document.getElementById("audio");
sound.volume=0.3
sound.play();
}