vani-meeting-server 1.2.4 → 1.2.6
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
|
@@ -21,4 +21,5 @@ export declare class ServerHandler {
|
|
|
21
21
|
constructor();
|
|
22
22
|
initWithServerStartRequest(serverStartRequest: WebSocketServerStartRequest): Promise<void>;
|
|
23
23
|
startPlainTransportForBroadcasting(plainTransportPayload: PlainTransportPayload, forRoomid: string): Promise<void>;
|
|
24
|
+
getAllOnGoingMeetingRoomIds(): Promise<string[] | undefined>;
|
|
24
25
|
}
|
package/lib/ServerHandler.js
CHANGED
|
@@ -30,6 +30,10 @@ class ServerHandler {
|
|
|
30
30
|
this.sfuHandler.init();
|
|
31
31
|
}
|
|
32
32
|
async startPlainTransportForBroadcasting(plainTransportPayload, forRoomid) {
|
|
33
|
+
this.sfuHandler?.startPlainTransportForBroadcasting(plainTransportPayload, forRoomid);
|
|
34
|
+
}
|
|
35
|
+
async getAllOnGoingMeetingRoomIds() {
|
|
36
|
+
return await this.rediHandler?.getAllRoomsId();
|
|
33
37
|
}
|
|
34
38
|
}
|
|
35
39
|
exports.ServerHandler = ServerHandler;
|
|
@@ -24,5 +24,6 @@ export declare class RedisHandler {
|
|
|
24
24
|
addUpdateParticipantForRoom(roomId: string, participant: Participant): Promise<void>;
|
|
25
25
|
getParticipantByUserId(roomId: string, userId: string): Promise<Participant | undefined>;
|
|
26
26
|
getAllParticipants(roomId: string): Promise<Participant[]>;
|
|
27
|
+
getAllRoomsId(): Promise<string[]>;
|
|
27
28
|
private updateRoomCleanupTimeOut;
|
|
28
29
|
}
|
|
@@ -108,6 +108,10 @@ class RedisHandler {
|
|
|
108
108
|
}
|
|
109
109
|
return participants;
|
|
110
110
|
}
|
|
111
|
+
//get all rooms
|
|
112
|
+
async getAllRoomsId() {
|
|
113
|
+
return await this.redisClient.keys("*");
|
|
114
|
+
}
|
|
111
115
|
// private getRediRoomModelForRoomId(roomId: string): RedisRoomModel {
|
|
112
116
|
// if (this.redisRoomModelHash.has(roomId)) {
|
|
113
117
|
// return this.redisRoomModelHash.get(roomId)!
|
|
@@ -267,7 +267,7 @@ class SFUEachRoomHandler extends BaseSFUWebsocket_1.BaseSFUWebsocket {
|
|
|
267
267
|
}
|
|
268
268
|
});
|
|
269
269
|
}
|
|
270
|
-
EventEmitterHandler_1.EventEmitterHandler.getInstance().vaniEventEmitter.emit(Event_1.VaniEvent.OnPlainTransportCreated, {});
|
|
270
|
+
EventEmitterHandler_1.EventEmitterHandler.getInstance().vaniEventEmitter.emit(Event_1.VaniEvent.OnPlainTransportCreated, { plainTransportPayload: plainTransportPayload, roomId: this.roomId });
|
|
271
271
|
}
|
|
272
272
|
async consumeProducerForPlainTransport(plainTransport, producer) {
|
|
273
273
|
if (producer && producer.closed === false && this.sendRouter && this.sendRouter.rtpCapabilities) {
|