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 (!this.communicationHandler || this.communicationHandler.getAllParticipants().length < 2) {
232
- this.producers.forEach(function (producer) {
233
- producer.pause();
234
- });
235
- }
236
- else {
237
- this.producers.forEach(function (producer) {
238
- producer.resume();
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.forEach(function (producer) {
534
- if (producer.closed === false) {
535
- producer.close();
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();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vani-meeting-client",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "Vani Meeting Clinet SDK",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",