@webex/web-client-media-engine 2.0.1 → 2.0.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
@@ -5877,7 +5877,7 @@ function isValidSourceAdvertisementAckMsg(msg) {
5877
5877
  return Boolean(maybeSourceAdvertisementAckMsg.sourceAdvertisementSeqNum);
5878
5878
  }
5879
5879
 
5880
- class StreamRequest {
5880
+ class StreamRequest$1 {
5881
5881
  constructor(policy, policySpecificInfo, ids, maxPayloadBitsPerSecond, codecInfos = []) {
5882
5882
  this.policy = policy;
5883
5883
  this.policySpecificInfo = policySpecificInfo;
@@ -13810,13 +13810,22 @@ class MultistreamConnection extends EventEmitter {
13810
13810
  logger.error(`Unable to find jmp session for ${mediaType}`);
13811
13811
  return;
13812
13812
  }
13813
- const requestedReceiveSlotIds = streamRequests.flatMap((sr) => sr.ids);
13813
+ const requestedReceiveSlotIds = [];
13814
+ streamRequests.forEach((sr) => {
13815
+ sr.receiveSlots.forEach((rs) => {
13816
+ if (!rs.id) {
13817
+ logger.error(`Running stream request task, but ReceiveSlot ID is missing!`);
13818
+ return;
13819
+ }
13820
+ requestedReceiveSlotIds.push(rs.id);
13821
+ });
13822
+ });
13814
13823
  (_a = this.recvTransceivers.get(mediaType)) === null || _a === void 0 ? void 0 : _a.forEach((transceiver) => {
13815
13824
  if (!requestedReceiveSlotIds.some((id) => compareStreamIds(id, transceiver.receiveSlot.id))) {
13816
13825
  transceiver.receiveSlot._updateSource('no source', undefined);
13817
13826
  }
13818
13827
  });
13819
- jmpSession.sendRequests(streamRequests);
13828
+ jmpSession.sendRequests(streamRequests.map((sr) => sr._toJmpStreamRequest()));
13820
13829
  };
13821
13830
  if (((_a = this.dataChannel) === null || _a === void 0 ? void 0 : _a.readyState) === 'open') {
13822
13831
  task();
@@ -13935,6 +13944,19 @@ class MultistreamConnection extends EventEmitter {
13935
13944
  }
13936
13945
  }
13937
13946
 
13947
+ class StreamRequest {
13948
+ constructor(policy, policySpecificInfo, receiveSlots, maxPayloadBitsPerSecond, codecInfos = []) {
13949
+ this.policy = policy;
13950
+ this.policySpecificInfo = policySpecificInfo;
13951
+ this.receiveSlots = receiveSlots;
13952
+ this.maxPayloadBitsPerSecond = maxPayloadBitsPerSecond;
13953
+ this.codecInfos = codecInfos;
13954
+ }
13955
+ _toJmpStreamRequest() {
13956
+ return new StreamRequest$1(this.policy, this.policySpecificInfo, this.receiveSlots.map((rs) => rs.id), this.maxPayloadBitsPerSecond, this.codecInfos);
13957
+ }
13958
+ }
13959
+
13938
13960
  exports.JMPLogger = Logger$1;
13939
13961
  exports.LocalCameraTrack = LocalCameraTrack;
13940
13962
  exports.LocalDisplayTrack = LocalDisplayTrack;