@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/esm/index.js CHANGED
@@ -5873,7 +5873,7 @@ function isValidSourceAdvertisementAckMsg(msg) {
5873
5873
  return Boolean(maybeSourceAdvertisementAckMsg.sourceAdvertisementSeqNum);
5874
5874
  }
5875
5875
 
5876
- class StreamRequest {
5876
+ class StreamRequest$1 {
5877
5877
  constructor(policy, policySpecificInfo, ids, maxPayloadBitsPerSecond, codecInfos = []) {
5878
5878
  this.policy = policy;
5879
5879
  this.policySpecificInfo = policySpecificInfo;
@@ -13806,13 +13806,22 @@ class MultistreamConnection extends EventEmitter {
13806
13806
  logger.error(`Unable to find jmp session for ${mediaType}`);
13807
13807
  return;
13808
13808
  }
13809
- const requestedReceiveSlotIds = streamRequests.flatMap((sr) => sr.ids);
13809
+ const requestedReceiveSlotIds = [];
13810
+ streamRequests.forEach((sr) => {
13811
+ sr.receiveSlots.forEach((rs) => {
13812
+ if (!rs.id) {
13813
+ logger.error(`Running stream request task, but ReceiveSlot ID is missing!`);
13814
+ return;
13815
+ }
13816
+ requestedReceiveSlotIds.push(rs.id);
13817
+ });
13818
+ });
13810
13819
  (_a = this.recvTransceivers.get(mediaType)) === null || _a === void 0 ? void 0 : _a.forEach((transceiver) => {
13811
13820
  if (!requestedReceiveSlotIds.some((id) => compareStreamIds(id, transceiver.receiveSlot.id))) {
13812
13821
  transceiver.receiveSlot._updateSource('no source', undefined);
13813
13822
  }
13814
13823
  });
13815
- jmpSession.sendRequests(streamRequests);
13824
+ jmpSession.sendRequests(streamRequests.map((sr) => sr._toJmpStreamRequest()));
13816
13825
  };
13817
13826
  if (((_a = this.dataChannel) === null || _a === void 0 ? void 0 : _a.readyState) === 'open') {
13818
13827
  task();
@@ -13931,5 +13940,18 @@ class MultistreamConnection extends EventEmitter {
13931
13940
  }
13932
13941
  }
13933
13942
 
13943
+ class StreamRequest {
13944
+ constructor(policy, policySpecificInfo, receiveSlots, maxPayloadBitsPerSecond, codecInfos = []) {
13945
+ this.policy = policy;
13946
+ this.policySpecificInfo = policySpecificInfo;
13947
+ this.receiveSlots = receiveSlots;
13948
+ this.maxPayloadBitsPerSecond = maxPayloadBitsPerSecond;
13949
+ this.codecInfos = codecInfos;
13950
+ }
13951
+ _toJmpStreamRequest() {
13952
+ return new StreamRequest$1(this.policy, this.policySpecificInfo, this.receiveSlots.map((rs) => rs.id), this.maxPayloadBitsPerSecond, this.codecInfos);
13953
+ }
13954
+ }
13955
+
13934
13956
  export { ConnectionState, Logger$1 as JMPLogger, LocalCameraTrack, LocalDisplayTrack, LocalMicrophoneTrack, LocalTrack, LocalTrackEvents, Logger, MediaCodecMimeType, MediaStreamTrackKind, MultistreamConnection, MultistreamConnectionEventNames, PeerConnection, ReceiveSlot, ReceiveSlotEvents, RecommendedOpusBitrates, SendOnlyTransceiver, StreamRequest, WcmeError, compareReceiveSlotIds, createCameraTrack, createDisplayTrack, createMicrophoneTrack, getAudioInputDevices, getAudioOutputDevices, getDevices, getLogLevel, getRecommendedMaxBitrateForFrameSize, getVideoInputDevices, logger, setLogHandler, setLogLevel, setOnDeviceChangeHandler };
13935
13957
  //# sourceMappingURL=index.js.map