@webex/web-client-media-engine 1.38.2 → 1.38.4

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
@@ -10157,15 +10157,25 @@ class MultistreamConnection extends EventEmitter {
10157
10157
  requestMedia(mediaType, mediaRequests) {
10158
10158
  var _a;
10159
10159
  const task = () => {
10160
+ var _a;
10160
10161
  const jmpSession = this.jmpSessions.get(mediaType);
10161
10162
  if (!jmpSession) {
10162
10163
  logger.error(`Unable to find jmp session for ${mediaType}`);
10163
10164
  return;
10164
10165
  }
10165
- if (!mediaRequests.every((mr) => mr.receiveSlots.every((rs) => rs.id))) {
10166
- logger.error(`Running subscribe task, but ReceiveSlot ID is missing!`);
10167
- return;
10168
- }
10166
+ const requestedReceiveSlotIds = [];
10167
+ mediaRequests.forEach((mr) => mr.receiveSlots.forEach((rs) => {
10168
+ if (!rs.id) {
10169
+ logger.error(`Running subscribe task, but ReceiveSlot ID is missing!`);
10170
+ return;
10171
+ }
10172
+ requestedReceiveSlotIds.push(rs.id);
10173
+ }));
10174
+ (_a = this.recvTransceivers.get(mediaType)) === null || _a === void 0 ? void 0 : _a.forEach((transceiver) => {
10175
+ if (!requestedReceiveSlotIds.some((id) => compareStreamIds(id, transceiver.receiveSlot.id))) {
10176
+ transceiver.receiveSlot._updateSource('no source', undefined);
10177
+ }
10178
+ });
10169
10179
  jmpSession.sendRequests(mediaRequests.map((mr) => mr._toJmpScrRequest()));
10170
10180
  };
10171
10181
  if (((_a = this.dataChannel) === null || _a === void 0 ? void 0 : _a.readyState) === 'open') {
@@ -10285,5 +10295,5 @@ class MultistreamConnection extends EventEmitter {
10285
10295
  }
10286
10296
  }
10287
10297
 
10288
- export { ConnectionState, Logger$1 as JMPLogger, LocalCameraTrack, LocalDisplayTrack, LocalMicrophoneTrack, LocalTrack, LocalTrackEvents, Logger, MediaCodecMimeType, MediaRequest, MultistreamConnection, MultistreamConnectionEventNames, ReceiveSlot, ReceiveSlotEvents, RecommendedOpusBitrates, SendOnlyTransceiver, WcmeError, compareReceiveSlotIds, createCameraTrack, createDisplayTrack, createMicrophoneTrack, getAudioInputDevices, getAudioOutputDevices, getDevices, getLogLevel, getRecommendedMaxBitrateForFrameSize, getVideoInputDevices, logger, setLogHandler, setLogLevel, setOnDeviceChangeHandler };
10298
+ export { ConnectionState, Logger$1 as JMPLogger, LocalCameraTrack, LocalDisplayTrack, LocalMicrophoneTrack, LocalTrack, LocalTrackEvents, Logger, MediaCodecMimeType, MediaRequest, MediaStreamTrackKind, MultistreamConnection, MultistreamConnectionEventNames, PeerConnection, ReceiveSlot, ReceiveSlotEvents, RecommendedOpusBitrates, SendOnlyTransceiver, WcmeError, compareReceiveSlotIds, createCameraTrack, createDisplayTrack, createMicrophoneTrack, getAudioInputDevices, getAudioOutputDevices, getDevices, getLogLevel, getRecommendedMaxBitrateForFrameSize, getVideoInputDevices, logger, setLogHandler, setLogLevel, setOnDeviceChangeHandler };
10289
10299
  //# sourceMappingURL=index.js.map