vani-meeting-server 2.3.7 → 2.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -146,7 +146,6 @@ class SFUEachRoomHandler extends BaseSFUWebsocket_1.BaseSFUWebsocket {
|
|
|
146
146
|
const indexForRecRouter = (this.roomPaticipants.size % this.recvRouter.length);
|
|
147
147
|
const roomUser = new SFUEachRoomUserHandler_1.SFUEachRoomUserHandler(participant, this.sendRouter, this.recvRouter[indexForRecRouter], this);
|
|
148
148
|
this.roomPaticipants.set(participant.userId, roomUser);
|
|
149
|
-
console.log("this.roomPaticipants", this.roomPaticipants);
|
|
150
149
|
return roomUser;
|
|
151
150
|
}
|
|
152
151
|
}
|
package/lib/sfu/SFUHandler.js
CHANGED
|
@@ -29,6 +29,7 @@ const SFUEachRoomHandler_1 = require("./SFUEachRoomHandler");
|
|
|
29
29
|
const ServerHandler_1 = require("../ServerHandler");
|
|
30
30
|
const Event_1 = require("../models/Event");
|
|
31
31
|
const EventEmitterHandler_1 = require("../utility/EventEmitterHandler");
|
|
32
|
+
const RedisHandler_1 = require("../lib/redis/RedisHandler");
|
|
32
33
|
const mediasoup = require("mediasoup");
|
|
33
34
|
class SFUHandler {
|
|
34
35
|
static instance = new SFUHandler();
|
|
@@ -54,7 +55,7 @@ class SFUHandler {
|
|
|
54
55
|
async checkIfCanCloseRoom(roomId) {
|
|
55
56
|
const room = this.getRoomSFUHandler(roomId);
|
|
56
57
|
console.log("checkIfCanCloseRoom", room);
|
|
57
|
-
if (room &&
|
|
58
|
+
if (room && (await RedisHandler_1.RedisHandler.getInstance().getAllParticipants(roomId)).length === 0) {
|
|
58
59
|
await room.cleanUp();
|
|
59
60
|
this.sfuRooms.delete(roomId);
|
|
60
61
|
}
|