vani-meeting-server 1.4.2 → 1.4.4
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.
|
@@ -106,13 +106,15 @@ class SFUEachRoomHandler extends BaseSFUWebsocket_1.BaseSFUWebsocket {
|
|
|
106
106
|
this.addAudioObserver();
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
-
|
|
109
|
+
const totalNumerOfRecieveRouterCanBeCreated = (workers.length - 1) < 1 ? 1 : (workers.length - 1);
|
|
110
|
+
while (this.recvRouter.length < totalNumerOfRecieveRouterCanBeCreated) { // Dont create on send worker
|
|
110
111
|
const worker = workers[currentWorkerIndexForRouter];
|
|
111
112
|
currentWorkerIndexForRouter = this.getWorkerIndexForCreatingRouter(currentWorkerIndexForRouter, workers.length);
|
|
112
|
-
if (worker.pid === sendWorkerPID) {
|
|
113
|
+
if (worker.pid === sendWorkerPID && totalNumerOfRecieveRouterCanBeCreated > 1) {
|
|
113
114
|
continue;
|
|
114
115
|
}
|
|
115
116
|
this.recvRouter.push(await worker.createRouter({ mediaCodecs: Constant_1.mediaCodecs }));
|
|
117
|
+
console.log("rec router crearted");
|
|
116
118
|
}
|
|
117
119
|
this.workers = undefined;
|
|
118
120
|
this.sendWorkerIndex = -1;
|
package/lib/sfu/SFUHandler.js
CHANGED