vani-meeting-client 0.7.0 → 0.7.1
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.
|
@@ -228,15 +228,17 @@ var SFUHandler = /** @class */ (function (_super) {
|
|
|
228
228
|
});
|
|
229
229
|
};
|
|
230
230
|
SFUHandler.prototype.onParticipantUpdated = function () {
|
|
231
|
-
if (
|
|
232
|
-
this.
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
231
|
+
if (this.producers) {
|
|
232
|
+
if (!this.communicationHandler || this.communicationHandler.getAllParticipants().length < 2) {
|
|
233
|
+
this.producers.forEach(function (producer) {
|
|
234
|
+
producer.pause();
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
else {
|
|
238
|
+
this.producers.forEach(function (producer) {
|
|
239
|
+
producer.resume();
|
|
240
|
+
});
|
|
241
|
+
}
|
|
240
242
|
}
|
|
241
243
|
};
|
|
242
244
|
SFUHandler.prototype.sendMessageViaDataChannel = function (messagePayload) {
|
|
@@ -530,11 +532,13 @@ var SFUHandler = /** @class */ (function (_super) {
|
|
|
530
532
|
this.consumerTransport.close();
|
|
531
533
|
this.consumerTransport = undefined;
|
|
532
534
|
}
|
|
533
|
-
this.producers
|
|
534
|
-
|
|
535
|
-
producer.
|
|
536
|
-
|
|
537
|
-
|
|
535
|
+
if (this.producers) {
|
|
536
|
+
this.producers.forEach(function (producer) {
|
|
537
|
+
if (producer.closed === false) {
|
|
538
|
+
producer.close();
|
|
539
|
+
}
|
|
540
|
+
});
|
|
541
|
+
}
|
|
538
542
|
this.dataProducers.forEach(function (producer) {
|
|
539
543
|
if (producer.closed === false) {
|
|
540
544
|
producer.close();
|