From 9ad745879eae84e9f809e279e2c91ce494c0f9d9 Mon Sep 17 00:00:00 2001 From: khlam <4841220+khlam@users.noreply.github.com> Date: Mon, 14 Oct 2019 14:14:02 -0700 Subject: [PATCH] whoops --- renderer.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/renderer.js b/renderer.js index ed0d1b2..0d624b7 100644 --- a/renderer.js +++ b/renderer.js @@ -1,11 +1,8 @@ -const unMuteSound = new Audio('./assets/unmute.mp3') -const muteSound = new Audio('./assets/mute.mp3') - const { ipcRenderer } = require('electron') onload = () => { const webview = document.querySelector('webview') - webview.openDevTools() + //webview.openDevTools() webview.addEventListener('console-message', (e) => { if (e.message === "Constructed RTCPeerConnection") { console.log("Connected to server") @@ -20,16 +17,14 @@ onload = () => { ipcRenderer.on('ping', (event, message) => { if (message === 'mic-open'){ - console.log("mic is open") + console.log("talking") webview.sendInputEvent({keyCode: 'Backspace', type: 'keyDown'}); webview.sendInputEvent({keyCode: 'Backspace', type: 'char'}); - //unMuteSound.play() } if (message === 'mic-closed'){ - console.log("mic is closed") + console.log("not talking") webview.sendInputEvent({keyCode: 'Backspace', type: 'keyUp'}); webview.sendInputEvent({keyCode: 'Backspace', type: 'char'}); - //muteSound.play() } }) } \ No newline at end of file