From: gparant Date: Sun, 26 Apr 2020 15:43:21 +0000 (+0200) Subject: Fix send message webrtc X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=e17871245720c111cad960102edc0c2db1d41ca0;p=libreadventure.git Fix send message webrtc --- diff --git a/front/src/Connexion.ts b/front/src/Connexion.ts index b6f2db7..35dbd06 100644 --- a/front/src/Connexion.ts +++ b/front/src/Connexion.ts @@ -129,7 +129,7 @@ export interface ConnexionInterface { /*webrtc*/ sendWebrtcRomm(roomId: string): void; - sendWebrtcSignal(signal: any, roomId: string): void; + sendWebrtcSignal(signal: any, roomId: string, userId?: string): void; receiveWebrtcSignal(callBack: Function): void; @@ -230,9 +230,9 @@ export class Connexion implements ConnexionInterface { }); } - sendWebrtcSignal(signal: any, roomId: string) { + sendWebrtcSignal(signal: any, roomId: string, userId? : string ) { this.socket.emit(EventMessage.WEBRTC_SIGNAL, JSON.stringify({ - userId: this.userId, + userId: userId ? userId : this.userId, roomId: roomId, signal: signal }));