Merge world and webrtc conexion

This commit is contained in:
gparant 2020-04-29 01:40:32 +02:00
parent 3151113db3
commit 2bfa57b0ba
7 changed files with 123 additions and 68 deletions

View file

@ -7,7 +7,6 @@ import {API_URL} from "./Enum/EnvironmentVariable";
enum EventMessage{
WEBRTC_SIGNAL = "webrtc-signal",
WEBRTC_START = "webrtc-start",
WEBRTC_ROOM = "webrtc-room",
JOIN_ROOM = "join-room",
USER_POSITION = "user-position",
MESSAGE_ERROR = "message-error"
@ -127,8 +126,6 @@ export interface ConnexionInterface {
positionOfAllUser(): void;
/*webrtc*/
sendWebrtcRomm(roomId: string): void;
sendWebrtcSignal(signal: any, roomId: string, userId?: string, receiverId?: string): void;
receiveWebrtcSignal(callBack: Function): void;
@ -239,10 +236,6 @@ export class Connexion implements ConnexionInterface {
}));
}
sendWebrtcRomm(roomId: string) {
this.socket.emit(EventMessage.WEBRTC_ROOM, JSON.stringify({roomId: roomId}));
}
receiveWebrtcStart(callback: Function) {
this.socket.on(EventMessage.WEBRTC_START, callback);
}