diff --git a/index.html b/index.html
index 36708dc..7f0fba4 100644
--- a/index.html
+++ b/index.html
@@ -6,7 +6,7 @@
-
+
diff --git a/main.js b/main.js
index 8fb98b2..160661b 100644
--- a/main.js
+++ b/main.js
@@ -18,7 +18,7 @@ function createWindow () {
webviewTag: true
}
})
- mainWindow.setMenu(null)
+ //mainWindow.setMenu(null)
// and load the index.html of the app.
mainWindow.loadFile('index.html')
@@ -61,10 +61,8 @@ const ioHook = require('iohook')
const win = require('win-audio')
const microphone = win.mic
-
let isTalking = false
-
// Resolves the promise after 2 seconds
function muteDelay() {
return new Promise((resolve) => {
@@ -74,7 +72,7 @@ function muteDelay() {
})
}
-// Mutes the Mic
+// Globally mutes the Mic
function muteMic() {
return new Promise((resolve) => {
if (isTalking === false) {
@@ -91,6 +89,7 @@ function muteMic() {
})
}
+// Globally unmutes the Mic
function unmuteMic() {
return new Promise((resolve, reject) => {
console.log("Talking")
diff --git a/renderer.js b/renderer.js
index f1b1f7e..3c1adc6 100644
--- a/renderer.js
+++ b/renderer.js
@@ -1,5 +1,18 @@
const unMuteSound = new Audio('./assets/unmute.mp3')
const muteSound = new Audio('./assets/mute.mp3')
+const ipc = require('electron').ipcRenderer;
+
+onload = () => {
+ const webview = document.querySelector('webview')
+ webview.openDevTools()
+ webview.addEventListener('console-message', (e) => {
+ console.log('D: ', e.message)
+
+ if (e.message === "Close RTCPeerConnection") {
+ console.log("Disconnected from server")
+ }
+ })
+}
require('electron').ipcRenderer.on('ping', (event, message) => {
if (message === 'mic-open'){
@@ -11,3 +24,5 @@ require('electron').ipcRenderer.on('ping', (event, message) => {
muteSound.play()
}
})
+
+