@webex/web-client-media-engine 1.36.0 → 1.36.2

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/dist/cjs/index.js CHANGED
@@ -8990,12 +8990,10 @@ class StatsManager {
8990
8990
  getStats() {
8991
8991
  return __awaiter(this, void 0, void 0, function* () {
8992
8992
  const statsReport = yield this.statsGetter();
8993
- const statsObject = {};
8994
- statsReport.forEach((value, key) => {
8995
- statsObject[key] = value;
8996
- });
8997
- yield this.statsPreProcessor(statsObject);
8998
- return statsObject;
8993
+ const statsMap = new Map();
8994
+ statsReport.forEach((stats, key) => statsMap.set(key, stats));
8995
+ yield this.statsPreProcessor(statsMap);
8996
+ return statsMap;
8999
8997
  });
9000
8998
  }
9001
8999
  }
@@ -10106,6 +10104,9 @@ class MultistreamConnection extends EventEmitter {
10106
10104
  ? this.getVideoEncodingOptions()
10107
10105
  : undefined,
10108
10106
  }));
10107
+ if (transceiver.publishedTrack) {
10108
+ transceiver.publishTrack(transceiver.publishedTrack);
10109
+ }
10109
10110
  transceiver.csi = generateCsi(getMediaFamily(mediaType), mainSceneId);
10110
10111
  (_a = this.jmpSessions.get(mediaType)) === null || _a === void 0 ? void 0 : _a.close();
10111
10112
  this.createJmpSession(mediaType);
@@ -10142,7 +10143,7 @@ class MultistreamConnection extends EventEmitter {
10142
10143
  (yield transceiver.getStats()).forEach((senderStats) => {
10143
10144
  var _a;
10144
10145
  if (senderStats.type === 'outbound-rtp') {
10145
- const statsToModify = stats[senderStats.id];
10146
+ const statsToModify = stats.get(senderStats.id);
10146
10147
  statsToModify.mid = transceiver.mid;
10147
10148
  statsToModify.csi = transceiver.csi;
10148
10149
  statsToModify.mediaType = mediaType;
@@ -10150,6 +10151,7 @@ class MultistreamConnection extends EventEmitter {
10150
10151
  if (trackSettings === null || trackSettings === void 0 ? void 0 : trackSettings.frameRate) {
10151
10152
  statsToModify.targetFrameRate = trackSettings === null || trackSettings === void 0 ? void 0 : trackSettings.frameRate;
10152
10153
  }
10154
+ stats.set(senderStats.id, statsToModify);
10153
10155
  }
10154
10156
  });
10155
10157
  })));
@@ -10158,7 +10160,7 @@ class MultistreamConnection extends EventEmitter {
10158
10160
  (yield transceiver.getStats()).forEach((receiverStats) => {
10159
10161
  var _a;
10160
10162
  if (receiverStats.type === 'inbound-rtp') {
10161
- const statsToModify = stats[receiverStats.id];
10163
+ const statsToModify = stats.get(receiverStats.id);
10162
10164
  statsToModify.mid = (_a = transceiver.receiveSlot.id) === null || _a === void 0 ? void 0 : _a.mid;
10163
10165
  statsToModify.csi = transceiver.receiveSlot.currentRxCsi;
10164
10166
  statsToModify.mediaType = mediaType;
@@ -10166,6 +10168,7 @@ class MultistreamConnection extends EventEmitter {
10166
10168
  if (signaler) {
10167
10169
  Object.assign(statsToModify, signaler.getReceiverId());
10168
10170
  }
10171
+ stats.set(receiverStats.id, statsToModify);
10169
10172
  }
10170
10173
  });
10171
10174
  })));
@@ -10173,7 +10176,7 @@ class MultistreamConnection extends EventEmitter {
10173
10176
  });
10174
10177
  }
10175
10178
  attachMetricsObserver() {
10176
- rtcStats_1(this.pc.getUnderlyingRTCPeerConnection(), (data) => this.metricsCallback(data), 5000, undefined, (stats) => this.preProcessStats(stats));
10179
+ rtcStats_1(this.pc.getUnderlyingRTCPeerConnection(), (data) => this.metricsCallback(data), 5000);
10177
10180
  }
10178
10181
  setMetricsCallback(callback) {
10179
10182
  this.metricsCallback = callback;