@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/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
  }
@@ -10102,6 +10100,9 @@ class MultistreamConnection extends EventEmitter {
10102
10100
  ? this.getVideoEncodingOptions()
10103
10101
  : undefined,
10104
10102
  }));
10103
+ if (transceiver.publishedTrack) {
10104
+ transceiver.publishTrack(transceiver.publishedTrack);
10105
+ }
10105
10106
  transceiver.csi = generateCsi(getMediaFamily(mediaType), mainSceneId);
10106
10107
  (_a = this.jmpSessions.get(mediaType)) === null || _a === void 0 ? void 0 : _a.close();
10107
10108
  this.createJmpSession(mediaType);
@@ -10138,7 +10139,7 @@ class MultistreamConnection extends EventEmitter {
10138
10139
  (yield transceiver.getStats()).forEach((senderStats) => {
10139
10140
  var _a;
10140
10141
  if (senderStats.type === 'outbound-rtp') {
10141
- const statsToModify = stats[senderStats.id];
10142
+ const statsToModify = stats.get(senderStats.id);
10142
10143
  statsToModify.mid = transceiver.mid;
10143
10144
  statsToModify.csi = transceiver.csi;
10144
10145
  statsToModify.mediaType = mediaType;
@@ -10146,6 +10147,7 @@ class MultistreamConnection extends EventEmitter {
10146
10147
  if (trackSettings === null || trackSettings === void 0 ? void 0 : trackSettings.frameRate) {
10147
10148
  statsToModify.targetFrameRate = trackSettings === null || trackSettings === void 0 ? void 0 : trackSettings.frameRate;
10148
10149
  }
10150
+ stats.set(senderStats.id, statsToModify);
10149
10151
  }
10150
10152
  });
10151
10153
  })));
@@ -10154,7 +10156,7 @@ class MultistreamConnection extends EventEmitter {
10154
10156
  (yield transceiver.getStats()).forEach((receiverStats) => {
10155
10157
  var _a;
10156
10158
  if (receiverStats.type === 'inbound-rtp') {
10157
- const statsToModify = stats[receiverStats.id];
10159
+ const statsToModify = stats.get(receiverStats.id);
10158
10160
  statsToModify.mid = (_a = transceiver.receiveSlot.id) === null || _a === void 0 ? void 0 : _a.mid;
10159
10161
  statsToModify.csi = transceiver.receiveSlot.currentRxCsi;
10160
10162
  statsToModify.mediaType = mediaType;
@@ -10162,6 +10164,7 @@ class MultistreamConnection extends EventEmitter {
10162
10164
  if (signaler) {
10163
10165
  Object.assign(statsToModify, signaler.getReceiverId());
10164
10166
  }
10167
+ stats.set(receiverStats.id, statsToModify);
10165
10168
  }
10166
10169
  });
10167
10170
  })));
@@ -10169,7 +10172,7 @@ class MultistreamConnection extends EventEmitter {
10169
10172
  });
10170
10173
  }
10171
10174
  attachMetricsObserver() {
10172
- 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);
10173
10176
  }
10174
10177
  setMetricsCallback(callback) {
10175
10178
  this.metricsCallback = callback;