diff --git a/back/src/Model/Websocket/WebRtcSignalMessage.ts b/back/src/Model/Websocket/WebRtcSignalMessage.ts index 4f59f617..865319be 100644 --- a/back/src/Model/Websocket/WebRtcSignalMessage.ts +++ b/back/src/Model/Websocket/WebRtcSignalMessage.ts @@ -9,7 +9,6 @@ export const isWebRtcSignalMessageInterface = new tg.IsInterface().withProperties({ userId: tg.isString, receiverId: tg.isString, - roomId: tg.isString, signal: isSignalData }).get(); export const isWebRtcScreenSharingStartMessageInterface = diff --git a/front/src/Connection.ts b/front/src/Connection.ts index ec1db6b1..4cb95d01 100644 --- a/front/src/Connection.ts +++ b/front/src/Connection.ts @@ -82,7 +82,6 @@ export interface WebRtcDisconnectMessageInterface { export interface WebRtcSignalMessageInterface { userId: string, // TODO: is this needed? receiverId: string, - roomId: string, signal: SignalData } @@ -188,22 +187,20 @@ export class Connection implements Connection { this.socket.on(EventMessage.CONNECT_ERROR, callback) } - public sendWebrtcSignal(signal: unknown, roomId: string, userId? : string|null, receiverId? : string) { + public sendWebrtcSignal(signal: unknown, userId? : string|null, receiverId? : string) { return this.socket.emit(EventMessage.WEBRTC_SIGNAL, { userId: userId ? userId : this.userId, receiverId: receiverId ? receiverId : this.userId, - roomId: roomId, signal: signal - }); + } as WebRtcSignalMessageInterface); } - public sendWebrtcScreenSharingSignal(signal: unknown, roomId: string, userId? : string|null, receiverId? : string) { + public sendWebrtcScreenSharingSignal(signal: unknown, userId? : string|null, receiverId? : string) { return this.socket.emit(EventMessage.WEBRTC_SCREEN_SHARING_SIGNAL, { userId: userId ? userId : this.userId, receiverId: receiverId ? receiverId : this.userId, - roomId: roomId, signal: signal - }); + } as WebRtcSignalMessageInterface); } public receiveWebrtcStart(callback: (message: WebRtcStartMessageInterface) => void) { diff --git a/front/src/WebRtc/SimplePeer.ts b/front/src/WebRtc/SimplePeer.ts index 0d2dd068..17a92b5b 100644 --- a/front/src/WebRtc/SimplePeer.ts +++ b/front/src/WebRtc/SimplePeer.ts @@ -311,7 +311,7 @@ export class SimplePeer { */ private sendWebrtcSignal(data: unknown, userId : string) { try { - this.Connection.sendWebrtcSignal(data, this.WebRtcRoomId, null, userId); + this.Connection.sendWebrtcSignal(data, null, userId); }catch (e) { console.error(`sendWebrtcSignal => ${userId}`, e); } @@ -325,7 +325,7 @@ export class SimplePeer { private sendWebrtcScreenSharingSignal(data: unknown, userId : string) { console.log("sendWebrtcScreenSharingSignal", data); try { - this.Connection.sendWebrtcScreenSharingSignal(data, this.WebRtcRoomId, null, userId); + this.Connection.sendWebrtcScreenSharingSignal(data, null, userId); }catch (e) { console.error(`sendWebrtcScreenSharingSignal => ${userId}`, e); }