mirror of
				https://github.com/pierre42100/ComunicWeb
				synced 2025-10-31 02:04:53 +00:00 
			
		
		
		
	Can specify whether the signaling server is secure or not.
This commit is contained in:
		| @@ -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", () => { | ||||
|   | ||||
| @@ -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 | ||||
| 		); | ||||
|  | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user