discord-sandboxed/renderer.js
2019-10-12 16:49:31 -07:00

16 lines
374 B
JavaScript

require('electron').ipcRenderer.on('ping', (event, message) => {
if (message === 'mic-open'){
console.log("mic is open")
playSound()
}
if (message === 'mic-closed'){
console.log("mic is closed")
playSound()
}
})
function playSound() {
var sound = document.getElementById("audio");
sound.volume=0.3
sound.play();
}