@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/cjs/index.js CHANGED
@@ -4765,11 +4765,11 @@ function createRTCPeerConnection(configuration) {
4765
4765
  /**
4766
4766
  * A type-safe form of the DOMString used in the MediaStreamTrack.kind field.
4767
4767
  */
4768
- var MediaStreamTrackKind;
4768
+ exports.MediaStreamTrackKind = void 0;
4769
4769
  (function (MediaStreamTrackKind) {
4770
4770
  MediaStreamTrackKind["Audio"] = "audio";
4771
4771
  MediaStreamTrackKind["Video"] = "video";
4772
- })(MediaStreamTrackKind || (MediaStreamTrackKind = {}));
4772
+ })(exports.MediaStreamTrackKind || (exports.MediaStreamTrackKind = {}));
4773
4773
  var PeerConnectionEvents;
4774
4774
  (function (PeerConnectionEvents) {
4775
4775
  PeerConnectionEvents["IceGatheringStateChange"] = "icegatheringstatechange";
@@ -9576,11 +9576,11 @@ function setLogHandler(logHandler) {
9576
9576
 
9577
9577
  function toMediaStreamTrackKind(mediaType) {
9578
9578
  return [MediaType.VideoMain, MediaType.VideoSlides].includes(mediaType)
9579
- ? MediaStreamTrackKind.Video
9580
- : MediaStreamTrackKind.Audio;
9579
+ ? exports.MediaStreamTrackKind.Video
9580
+ : exports.MediaStreamTrackKind.Audio;
9581
9581
  }
9582
9582
  function toMediaFamily(kind) {
9583
- if (kind === MediaStreamTrackKind.Video) {
9583
+ if (kind === exports.MediaStreamTrackKind.Video) {
9584
9584
  return MediaFamily.Video;
9585
9585
  }
9586
9586
  return MediaFamily.Audio;
@@ -10161,15 +10161,25 @@ class MultistreamConnection extends EventEmitter {
10161
10161
  requestMedia(mediaType, mediaRequests) {
10162
10162
  var _a;
10163
10163
  const task = () => {
10164
+ var _a;
10164
10165
  const jmpSession = this.jmpSessions.get(mediaType);
10165
10166
  if (!jmpSession) {
10166
10167
  logger.error(`Unable to find jmp session for ${mediaType}`);
10167
10168
  return;
10168
10169
  }
10169
- if (!mediaRequests.every((mr) => mr.receiveSlots.every((rs) => rs.id))) {
10170
- logger.error(`Running subscribe task, but ReceiveSlot ID is missing!`);
10171
- return;
10172
- }
10170
+ const requestedReceiveSlotIds = [];
10171
+ mediaRequests.forEach((mr) => mr.receiveSlots.forEach((rs) => {
10172
+ if (!rs.id) {
10173
+ logger.error(`Running subscribe task, but ReceiveSlot ID is missing!`);
10174
+ return;
10175
+ }
10176
+ requestedReceiveSlotIds.push(rs.id);
10177
+ }));
10178
+ (_a = this.recvTransceivers.get(mediaType)) === null || _a === void 0 ? void 0 : _a.forEach((transceiver) => {
10179
+ if (!requestedReceiveSlotIds.some((id) => compareStreamIds(id, transceiver.receiveSlot.id))) {
10180
+ transceiver.receiveSlot._updateSource('no source', undefined);
10181
+ }
10182
+ });
10173
10183
  jmpSession.sendRequests(mediaRequests.map((mr) => mr._toJmpScrRequest()));
10174
10184
  };
10175
10185
  if (((_a = this.dataChannel) === null || _a === void 0 ? void 0 : _a.readyState) === 'open') {
@@ -10297,6 +10307,7 @@ exports.LocalTrack = LocalTrack;
10297
10307
  exports.Logger = Logger;
10298
10308
  exports.MediaRequest = MediaRequest;
10299
10309
  exports.MultistreamConnection = MultistreamConnection;
10310
+ exports.PeerConnection = PeerConnection;
10300
10311
  exports.ReceiveSlot = ReceiveSlot;
10301
10312
  exports.SendOnlyTransceiver = SendOnlyTransceiver;
10302
10313
  exports.WcmeError = WcmeError;