Merge pull request #106 from thecodingmachine/up_to_4

Removing limitation to allow up to 4 players in a group
This commit is contained in:
David Négrier 2020-05-13 09:52:25 +02:00 committed by GitHub
commit bb7061aa29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -282,8 +282,8 @@ export class IoSocketController {
}
socket.join(roomId);
socket.webRtcRoomId = roomId;
//if two persone in room share
if (this.Io.sockets.adapter.rooms[roomId].length < 2 || this.Io.sockets.adapter.rooms[roomId].length >= 4) {
//if two persons in room share
if (this.Io.sockets.adapter.rooms[roomId].length < 2 /*|| this.Io.sockets.adapter.rooms[roomId].length >= 4*/) {
return;
}
let clients: Array<ExSocketInterface> = (Object.values(this.Io.sockets.sockets) as Array<ExSocketInterface>)