vani-meeting-client 0.0.3 → 0.0.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.
@@ -423,10 +423,11 @@ var MeetingHandler = /** @class */ (function () {
423
423
  ]
424
424
  });
425
425
  analytics.page();
426
- analytics.track('playedVideo', {
426
+ analytics.track('event', {
427
427
  category: 'AppId',
428
428
  label: this.meetingStartRequest.appId,
429
- value: this.meetingStartRequest.roomId
429
+ action: this.meetingStartRequest.roomId,
430
+ value: 0
430
431
  });
431
432
  }
432
433
  return [2 /*return*/];
@@ -167,12 +167,15 @@ var SFUHandler = /** @class */ (function (_super) {
167
167
  return __generator(this, function (_c) {
168
168
  switch (_c.label) {
169
169
  case 0:
170
- if (!(track && track.track)) return [3 /*break*/, 3];
170
+ if (!(track && track.track)) return [3 /*break*/, 4];
171
171
  producer = this.producers.find(function (producer) { return producer.appData.trackId === track.trackId; });
172
- if (!producer) return [3 /*break*/, 1];
173
- this.resumeTrack(track);
174
- return [3 /*break*/, 3];
172
+ if (!producer) return [3 /*break*/, 2];
173
+ return [4 /*yield*/, producer.replaceTrack({ track: track.track })];
175
174
  case 1:
175
+ _c.sent();
176
+ this.resumeTrack(track);
177
+ return [3 /*break*/, 4];
178
+ case 2:
176
179
  appData = __assign({}, (_a = this.sendTransport) === null || _a === void 0 ? void 0 : _a.appData);
177
180
  appData.trackKind = track.trackKind;
178
181
  appData.trackId = track.trackId;
@@ -181,15 +184,15 @@ var SFUHandler = /** @class */ (function (_super) {
181
184
  producerData.encodings = this.meetingStartRequest.simulcastEncodings;
182
185
  }
183
186
  return [4 /*yield*/, ((_b = this.sendTransport) === null || _b === void 0 ? void 0 : _b.produce(producerData))];
184
- case 2:
187
+ case 3:
185
188
  webcamProducer = _c.sent();
186
189
  if (webcamProducer) {
187
190
  this.producers.push(webcamProducer);
188
191
  this.onParticipantUpdated();
189
192
  // this.sendMessageReadyToConsume();
190
193
  }
191
- _c.label = 3;
192
- case 3: return [2 /*return*/];
194
+ _c.label = 4;
195
+ case 4: return [2 /*return*/];
193
196
  }
194
197
  });
195
198
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vani-meeting-client",
3
- "version": "0.0.3",
3
+ "version": "0.0.7",
4
4
  "description": "Vani Meeting Clinet SDK",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",