@webex/web-client-media-engine 1.36.1 → 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
  }
@@ -10145,7 +10143,7 @@ class MultistreamConnection extends EventEmitter {
10145
10143
  (yield transceiver.getStats()).forEach((senderStats) => {
10146
10144
  var _a;
10147
10145
  if (senderStats.type === 'outbound-rtp') {
10148
- const statsToModify = stats[senderStats.id];
10146
+ const statsToModify = stats.get(senderStats.id);
10149
10147
  statsToModify.mid = transceiver.mid;
10150
10148
  statsToModify.csi = transceiver.csi;
10151
10149
  statsToModify.mediaType = mediaType;
@@ -10153,6 +10151,7 @@ class MultistreamConnection extends EventEmitter {
10153
10151
  if (trackSettings === null || trackSettings === void 0 ? void 0 : trackSettings.frameRate) {
10154
10152
  statsToModify.targetFrameRate = trackSettings === null || trackSettings === void 0 ? void 0 : trackSettings.frameRate;
10155
10153
  }
10154
+ stats.set(senderStats.id, statsToModify);
10156
10155
  }
10157
10156
  });
10158
10157
  })));
@@ -10161,7 +10160,7 @@ class MultistreamConnection extends EventEmitter {
10161
10160
  (yield transceiver.getStats()).forEach((receiverStats) => {
10162
10161
  var _a;
10163
10162
  if (receiverStats.type === 'inbound-rtp') {
10164
- const statsToModify = stats[receiverStats.id];
10163
+ const statsToModify = stats.get(receiverStats.id);
10165
10164
  statsToModify.mid = (_a = transceiver.receiveSlot.id) === null || _a === void 0 ? void 0 : _a.mid;
10166
10165
  statsToModify.csi = transceiver.receiveSlot.currentRxCsi;
10167
10166
  statsToModify.mediaType = mediaType;
@@ -10169,6 +10168,7 @@ class MultistreamConnection extends EventEmitter {
10169
10168
  if (signaler) {
10170
10169
  Object.assign(statsToModify, signaler.getReceiverId());
10171
10170
  }
10171
+ stats.set(receiverStats.id, statsToModify);
10172
10172
  }
10173
10173
  });
10174
10174
  })));
@@ -10176,7 +10176,7 @@ class MultistreamConnection extends EventEmitter {
10176
10176
  });
10177
10177
  }
10178
10178
  attachMetricsObserver() {
10179
- 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);
10180
10180
  }
10181
10181
  setMetricsCallback(callback) {
10182
10182
  this.metricsCallback = callback;