diff --git a/assets/3rdparty/SignalExchangerClient/SignalExchangerClient.js b/assets/3rdparty/SignalExchangerClient/SignalExchangerClient.js index 8a4b413b..73e43601 100644 --- a/assets/3rdparty/SignalExchangerClient/SignalExchangerClient.js +++ b/assets/3rdparty/SignalExchangerClient/SignalExchangerClient.js @@ -75,15 +75,16 @@ class SignalExchangerClient { * @param {String} domain The name of the signal server * @param {Number} port The port of the server to use * @param {String} clientID The ID of current client + * @param {Boolean} secure Specify whether connection to the socket should be secure or not */ - constructor(domain, port, clientID) { + constructor(domain, port, clientID, secure) { //Save information this.domain = domain, this.port = port; this.clientID = clientID; - this.socket = new WebSocket("ws://" + this.domain + ":" + this.port + "/socket"); + this.socket = new WebSocket((secure ? "wss" : "ws") + "://" + this.domain + ":" + this.port + "/socket"); //Add a few events listeners this.socket.addEventListener("open", () => { diff --git a/assets/js/components/calls/callWindow.js b/assets/js/components/calls/callWindow.js index 4b40ea66..7f6fcb21 100644 --- a/assets/js/components/calls/callWindow.js +++ b/assets/js/components/calls/callWindow.js @@ -535,7 +535,8 @@ ComunicWeb.components.calls.callWindow = { call.signalClient = new SignalExchangerClient( config.signal_server_name, config.signal_server_port, - call.localPeerID + call.localPeerID, + config.is_signal_server_secure );