Fix webrtc
This commit is contained in:
parent
89816a13e4
commit
a5b5072de1
@ -71,7 +71,10 @@ export class IoSocketController{
|
|||||||
this.saveUserInformation((socket as ExSocketInterface), messageUserPosition);
|
this.saveUserInformation((socket as ExSocketInterface), messageUserPosition);
|
||||||
|
|
||||||
//refresh position of all user in all rooms in real time
|
//refresh position of all user in all rooms in real time
|
||||||
let rooms = (this.Io.sockets.adapter.rooms as ExtRoomsInterface)
|
let rooms = (this.Io.sockets.adapter.rooms as ExtRoomsInterface);
|
||||||
|
if(!rooms.refreshUserPosition){
|
||||||
|
rooms.refreshUserPosition = RefreshUserPositionFunction;
|
||||||
|
}
|
||||||
rooms.refreshUserPosition(rooms, this.Io);
|
rooms.refreshUserPosition(rooms, this.Io);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -16,8 +16,9 @@ export class WebRtcEventManager {
|
|||||||
this.eventVideoAnswer();
|
this.eventVideoAnswer();
|
||||||
this.eventIceCandidate();
|
this.eventIceCandidate();
|
||||||
|
|
||||||
//connect on the room to create a meet
|
//start to connect on event
|
||||||
Connexion.socket.emit('webrtc-room', JSON.stringify({roomId: roomId}));
|
//TODO test
|
||||||
|
this.emitWebRtcRoom();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -69,6 +70,11 @@ export class WebRtcEventManager {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
emitWebRtcRoom(){
|
||||||
|
//connect on the room to create a meet
|
||||||
|
this.Connexion.socket.emit('webrtc-room', JSON.stringify({roomId: this.RoomId}));
|
||||||
|
}
|
||||||
|
|
||||||
emitIceCandidate(message : any){
|
emitIceCandidate(message : any){
|
||||||
message.roomId = this.RoomId;
|
message.roomId = this.RoomId;
|
||||||
this.Connexion.socket.emit('ice-candidate', JSON.stringify(message));
|
this.Connexion.socket.emit('ice-candidate', JSON.stringify(message));
|
||||||
|
Loading…
Reference in New Issue
Block a user