const internals = {
- kSocketUrl: 'http://unlimited.pizza:8000/',
+ kSocketUrl: 'https://junction.unlimited.pizza/',
port: null,
socket: null,
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,
});
});