mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-22 20:19:21 +00:00
Can specify whether the signaling server is secure or not.
This commit is contained in:
parent
faba9b36cb
commit
817ef1069c
@ -75,15 +75,16 @@ class SignalExchangerClient {
|
|||||||
* @param {String} domain The name of the signal server
|
* @param {String} domain The name of the signal server
|
||||||
* @param {Number} port The port of the server to use
|
* @param {Number} port The port of the server to use
|
||||||
* @param {String} clientID The ID of current client
|
* @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
|
//Save information
|
||||||
this.domain = domain,
|
this.domain = domain,
|
||||||
this.port = port;
|
this.port = port;
|
||||||
this.clientID = clientID;
|
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
|
//Add a few events listeners
|
||||||
this.socket.addEventListener("open", () => {
|
this.socket.addEventListener("open", () => {
|
||||||
|
@ -535,7 +535,8 @@ ComunicWeb.components.calls.callWindow = {
|
|||||||
call.signalClient = new SignalExchangerClient(
|
call.signalClient = new SignalExchangerClient(
|
||||||
config.signal_server_name,
|
config.signal_server_name,
|
||||||
config.signal_server_port,
|
config.signal_server_port,
|
||||||
call.localPeerID
|
call.localPeerID,
|
||||||
|
config.is_signal_server_secure
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user