@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/esm/index.js CHANGED
@@ -8986,12 +8986,10 @@ class StatsManager {
8986
8986
  getStats() {
8987
8987
  return __awaiter(this, void 0, void 0, function* () {
8988
8988
  const statsReport = yield this.statsGetter();
8989
- const statsObject = {};
8990
- statsReport.forEach((value, key) => {
8991
- statsObject[key] = value;
8992
- });
8993
- yield this.statsPreProcessor(statsObject);
8994
- return statsObject;
8989
+ const statsMap = new Map();
8990
+ statsReport.forEach((stats, key) => statsMap.set(key, stats));
8991
+ yield this.statsPreProcessor(statsMap);
8992
+ return statsMap;
8995
8993
  });
8996
8994
  }
8997
8995
  }
@@ -10141,7 +10139,7 @@ class MultistreamConnection extends EventEmitter {
10141
10139
  (yield transceiver.getStats()).forEach((senderStats) => {
10142
10140
  var _a;
10143
10141
  if (senderStats.type === 'outbound-rtp') {
10144
- const statsToModify = stats[senderStats.id];
10142
+ const statsToModify = stats.get(senderStats.id);
10145
10143
  statsToModify.mid = transceiver.mid;
10146
10144
  statsToModify.csi = transceiver.csi;
10147
10145
  statsToModify.mediaType = mediaType;
@@ -10149,6 +10147,7 @@ class MultistreamConnection extends EventEmitter {
10149
10147
  if (trackSettings === null || trackSettings === void 0 ? void 0 : trackSettings.frameRate) {
10150
10148
  statsToModify.targetFrameRate = trackSettings === null || trackSettings === void 0 ? void 0 : trackSettings.frameRate;
10151
10149
  }
10150
+ stats.set(senderStats.id, statsToModify);
10152
10151
  }
10153
10152
  });
10154
10153
  })));
@@ -10157,7 +10156,7 @@ class MultistreamConnection extends EventEmitter {
10157
10156
  (yield transceiver.getStats()).forEach((receiverStats) => {
10158
10157
  var _a;
10159
10158
  if (receiverStats.type === 'inbound-rtp') {
10160
- const statsToModify = stats[receiverStats.id];
10159
+ const statsToModify = stats.get(receiverStats.id);
10161
10160
  statsToModify.mid = (_a = transceiver.receiveSlot.id) === null || _a === void 0 ? void 0 : _a.mid;
10162
10161
  statsToModify.csi = transceiver.receiveSlot.currentRxCsi;
10163
10162
  statsToModify.mediaType = mediaType;
@@ -10165,6 +10164,7 @@ class MultistreamConnection extends EventEmitter {
10165
10164
  if (signaler) {
10166
10165
  Object.assign(statsToModify, signaler.getReceiverId());
10167
10166
  }
10167
+ stats.set(receiverStats.id, statsToModify);
10168
10168
  }
10169
10169
  });
10170
10170
  })));
@@ -10172,7 +10172,7 @@ class MultistreamConnection extends EventEmitter {
10172
10172
  });
10173
10173
  }
10174
10174
  attachMetricsObserver() {
10175
- rtcStats_1(this.pc.getUnderlyingRTCPeerConnection(), (data) => this.metricsCallback(data), 5000, undefined, (stats) => this.preProcessStats(stats));
10175
+ rtcStats_1(this.pc.getUnderlyingRTCPeerConnection(), (data) => this.metricsCallback(data), 5000);
10176
10176
  }
10177
10177
  setMetricsCallback(callback) {
10178
10178
  this.metricsCallback = callback;