diff --git a/js/comm.js b/js/comm.js index 6396cf5..20a86a5 100644 --- a/js/comm.js +++ b/js/comm.js @@ -18,9 +18,17 @@ var myPC; var awaitingResponse; var streamConstraints; var myMediaStream; +let wsChat; const room = getRoom(); -const wsChat = new WebSocket("ws://localhost:8080/comm"); + +if(location.protocol === 'http:'){ + wsChat = new WebSocket("ws://1410inc.xyz:8080/comm"); +} + +else{ + wsChat = new WebSocket("wss://1410inc.xyz:8080/wss2/comm"); +} window.addEventListener('load', function(){ startCounter();//shows the time spent in room