vani-meeting-server 1.2.6 → 1.2.7
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
|
@@ -10,6 +10,11 @@ export interface PlainTransportPayload {
|
|
|
10
10
|
audioRtcpPort: number;
|
|
11
11
|
videoPort: number;
|
|
12
12
|
videoRtcpPort: number;
|
|
13
|
+
extraData?: any;
|
|
14
|
+
}
|
|
15
|
+
export interface PlainTransportCreatedCallback {
|
|
16
|
+
roomId: string;
|
|
17
|
+
plainTransportPayload: PlainTransportPayload;
|
|
13
18
|
}
|
|
14
19
|
export declare class ServerHandler {
|
|
15
20
|
serverStartRequest: WebSocketServerStartRequest;
|
package/lib/models/Event.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PlainTransportCreatedCallback } from "../ServerHandler";
|
|
1
2
|
import { Participant } from "./Participant";
|
|
2
3
|
export declare enum VaniEvent {
|
|
3
4
|
OnNewMeetingStarted = "onNewMeetingStarted",
|
|
@@ -13,7 +14,7 @@ interface VaniConnectionEvents {
|
|
|
13
14
|
[VaniEvent.OnUserJoined]: (participant: Participant) => any;
|
|
14
15
|
[VaniEvent.OnUserLeft]: (participant: Participant) => any;
|
|
15
16
|
[VaniEvent.OnServerStarted]: () => any;
|
|
16
|
-
[VaniEvent.OnPlainTransportCreated]: () => any;
|
|
17
|
+
[VaniEvent.OnPlainTransportCreated]: (plainTransportCreatedCallback: PlainTransportCreatedCallback) => any;
|
|
17
18
|
}
|
|
18
19
|
export declare interface VaniEventListener {
|
|
19
20
|
on<U extends keyof VaniConnectionEvents>(event: U, listener: VaniConnectionEvents[U]): this;
|
|
@@ -267,7 +267,8 @@ class SFUEachRoomHandler extends BaseSFUWebsocket_1.BaseSFUWebsocket {
|
|
|
267
267
|
}
|
|
268
268
|
});
|
|
269
269
|
}
|
|
270
|
-
|
|
270
|
+
const response = { plainTransportPayload: plainTransportPayload, roomId: this.roomId };
|
|
271
|
+
EventEmitterHandler_1.EventEmitterHandler.getInstance().vaniEventEmitter.emit(Event_1.VaniEvent.OnPlainTransportCreated, response);
|
|
271
272
|
}
|
|
272
273
|
async consumeProducerForPlainTransport(plainTransport, producer) {
|
|
273
274
|
if (producer && producer.closed === false && this.sendRouter && this.sendRouter.rtpCapabilities) {
|
package/lib/sfu/SFUHandler.js
CHANGED
|
@@ -74,7 +74,7 @@ class SFUHandler {
|
|
|
74
74
|
while (this.workers.length < os.cpus().length) {
|
|
75
75
|
mediasoup.logLevel = "info";
|
|
76
76
|
const worker = await mediasoup.createWorker({ rtcMinPort: ServerHandler_1.ServerHandler.getInstance().serverStartRequest.rtcMinPort, rtcMaxPort: ServerHandler_1.ServerHandler.getInstance().serverStartRequest.rtcMaxPort });
|
|
77
|
-
worker.updateSettings({ logLevel: "debug" })
|
|
77
|
+
// worker.updateSettings({ logLevel: "debug" })
|
|
78
78
|
this.workers.push(worker);
|
|
79
79
|
}
|
|
80
80
|
}
|