Removing useless roomID parameter in WebRtcSignal message

This commit is contained in:
David Négrier
2020-08-20 15:21:07 +02:00
parent 0119534283
commit 894f7c8009
3 changed files with 6 additions and 10 deletions
+4 -7
View File
@@ -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) {