X-Git-Url: https://git.r.bdr.sh/rbdr/junction/blobdiff_plain/d4fb48eb3793a93a8726652692b68592333dd778..e2da0c51692b64318a0f1b8d888536ee632c53d6:/extension/content_script.js diff --git a/extension/content_script.js b/extension/content_script.js index a9d713d..84a2fd3 100644 --- a/extension/content_script.js +++ b/extension/content_script.js @@ -4,7 +4,7 @@ const internals = { - kSocketUrl: 'http://unlimited.pizza:8000/', + kSocketUrl: 'https://junction.unlimited.pizza/', port: null, socket: null, @@ -19,13 +19,25 @@ try { const mediaStream = await navigator.mediaDevices.getUserMedia({ audio: true }); - internals.socket = io(socketUrl); + internals.socket = io(internals.kSocketUrl, { + transports: ['websocket'] + }); + + internals.socket.on('error', function(error) { + + console.error('GENERAL ERROR', error); + }); + + internals.socket.on('connect_error', function(error) { + + console.error('CONNNECT ERROR', error); + }); internals.socket.on('connect', function() { - console.log("Connected to signaling server"); + console.log("Connected to signaling server, group: ", data.currentUrl); internals.socket.emit('join', { - 'url': currentUrl, + 'url': data.currentUrl, }); });