vani-meeting-server 1.3.3 → 1.3.5
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.
package/lib/ServerHandler.d.ts
CHANGED
|
@@ -26,5 +26,6 @@ export declare class ServerHandler {
|
|
|
26
26
|
constructor();
|
|
27
27
|
initWithServerStartRequest(serverStartRequest: WebSocketServerStartRequest): Promise<void>;
|
|
28
28
|
startPlainTransportForBroadcasting(plainTransportPayload: PlainTransportPayload, forRoomid: string): Promise<void>;
|
|
29
|
+
resumePlainTransportForBroadcasting(forRoomid: string): Promise<void>;
|
|
29
30
|
getAllOnGoingMeetingRoomIds(): Promise<string[] | undefined>;
|
|
30
31
|
}
|
package/lib/ServerHandler.js
CHANGED
|
@@ -32,6 +32,9 @@ class ServerHandler {
|
|
|
32
32
|
async startPlainTransportForBroadcasting(plainTransportPayload, forRoomid) {
|
|
33
33
|
this.sfuHandler?.startPlainTransportForBroadcasting(plainTransportPayload, forRoomid);
|
|
34
34
|
}
|
|
35
|
+
async resumePlainTransportForBroadcasting(forRoomid) {
|
|
36
|
+
this.sfuHandler?.resumeAllBroadcastingConsumers(forRoomid);
|
|
37
|
+
}
|
|
35
38
|
async getAllOnGoingMeetingRoomIds() {
|
|
36
39
|
return await this.rediHandler?.getAllRoomsId();
|
|
37
40
|
}
|
|
@@ -81,17 +81,17 @@ class RedisHandler {
|
|
|
81
81
|
async removeParticipantForRoom(roomId, participant) {
|
|
82
82
|
const participantKey = RedisKeyType.Participants + ":" + participant.userId;
|
|
83
83
|
await this.redisClient.hDel(roomId, participantKey);
|
|
84
|
-
console.log("removeParticipantForRoom =====", participantKey)
|
|
85
|
-
console.log(await this.getAllParticipants(roomId))
|
|
86
|
-
console.log("removeParticipantForRoom +++++")
|
|
84
|
+
// console.log("removeParticipantForRoom =====" , participantKey)
|
|
85
|
+
// console.log(await this.getAllParticipants(roomId))
|
|
86
|
+
// console.log("removeParticipantForRoom +++++")
|
|
87
87
|
this.updateRoomCleanupTimeOut(roomId);
|
|
88
88
|
}
|
|
89
89
|
async addUpdateParticipantForRoom(roomId, participant) {
|
|
90
90
|
const participantKey = RedisKeyType.Participants + ":" + participant.userId;
|
|
91
91
|
await this.redisClient.hSet(roomId, participantKey, JSON.stringify(participant));
|
|
92
|
-
console.log("addUpdateParticipantForRoom =====", participantKey)
|
|
93
|
-
console.log(await this.getAllParticipants(roomId))
|
|
94
|
-
console.log("addUpdateParticipantForRoom +++++")
|
|
92
|
+
// console.log("addUpdateParticipantForRoom =====" , participantKey)
|
|
93
|
+
// console.log(await this.getAllParticipants(roomId))
|
|
94
|
+
// console.log("addUpdateParticipantForRoom +++++")
|
|
95
95
|
this.updateRoomCleanupTimeOut(roomId);
|
|
96
96
|
}
|
|
97
97
|
async getParticipantByUserId(roomId, userId) {
|
|
@@ -49,6 +49,7 @@ class SFUEachRoomHandler extends BaseSFUWebsocket_1.BaseSFUWebsocket {
|
|
|
49
49
|
this.sendWorkerIndex = sendWorkerIndex;
|
|
50
50
|
this.cleanUp = this.cleanUp.bind(this);
|
|
51
51
|
this.startBroadcasting = this.startBroadcasting.bind(this);
|
|
52
|
+
this.resumeAllBroadcastingConsumers = this.resumeAllBroadcastingConsumers.bind(this);
|
|
52
53
|
}
|
|
53
54
|
onNewMessage(payload, participant) {
|
|
54
55
|
// console.log(payload)
|
package/lib/sfu/SFUHandler.d.ts
CHANGED
|
@@ -11,5 +11,6 @@ export declare class SFUHandler {
|
|
|
11
11
|
checkIfCanCloseRoom(roomId: string): void;
|
|
12
12
|
getRoomSFUHandler(roomId: string): SFUEachRoomHandler | undefined;
|
|
13
13
|
startPlainTransportForBroadcasting(plainTransportPayload: PlainTransportPayload, forRoomid: string): Promise<void>;
|
|
14
|
+
resumeAllBroadcastingConsumers(forRoomid: string): Promise<void>;
|
|
14
15
|
private createWorkers;
|
|
15
16
|
}
|
package/lib/sfu/SFUHandler.js
CHANGED
|
@@ -76,6 +76,12 @@ class SFUHandler {
|
|
|
76
76
|
EventEmitterHandler_1.EventEmitterHandler.getInstance().vaniEventEmitter.emit(Event_1.VaniEvent.OnPlainTransportCreateError, response);
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
+
async resumeAllBroadcastingConsumers(forRoomid) {
|
|
80
|
+
const sfuEachRoomHandler = this.getRoomSFUHandler(forRoomid);
|
|
81
|
+
if (sfuEachRoomHandler) {
|
|
82
|
+
sfuEachRoomHandler.resumeAllBroadcastingConsumers();
|
|
83
|
+
}
|
|
84
|
+
}
|
|
79
85
|
async createWorkers() {
|
|
80
86
|
while (this.workers.length < os.cpus().length) {
|
|
81
87
|
mediasoup.logLevel = "info";
|