@webex/web-client-media-engine 3.5.2 → 3.6.0

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
@@ -10422,6 +10422,7 @@ class SendOnlyTransceiver extends Transceiver {
10422
10422
  this.streamMuteStateChange = new TypedEvent();
10423
10423
  this.streamPublishStateChange = new TypedEvent();
10424
10424
  this.negotiationNeeded = new TypedEvent();
10425
+ this.namedMediaGroupsChange = new TypedEvent();
10425
10426
  this.requested = false;
10426
10427
  this.requestedIdEncodingParamsMap = new Map();
10427
10428
  this.csi = csi;
@@ -10496,6 +10497,13 @@ class SendOnlyTransceiver extends Transceiver {
10496
10497
  }
10497
10498
  });
10498
10499
  }
10500
+ setNamedMediaGroups(namedMediaGroups) {
10501
+ if (this.mediaType !== exports.MediaType.AudioMain) {
10502
+ throw new Error(`This interface does not allow media types other than AudioMain: ${this.mediaType}`);
10503
+ }
10504
+ this.namedMediaGroups = namedMediaGroups;
10505
+ this.namedMediaGroupsChange.emit();
10506
+ }
10499
10507
  publishStream(stream) {
10500
10508
  return this.replacePublishedStream(stream);
10501
10509
  }
@@ -10599,6 +10607,9 @@ class SendSlot {
10599
10607
  return this.sendTransceiver.unpublishStream();
10600
10608
  });
10601
10609
  }
10610
+ setNamedMediaGroups(namedMediaGroups) {
10611
+ this.sendTransceiver.setNamedMediaGroups(namedMediaGroups);
10612
+ }
10602
10613
  get active() {
10603
10614
  return this.sendTransceiver.active;
10604
10615
  }
@@ -14038,6 +14049,9 @@ class MultistreamConnection extends EventEmitter$2 {
14038
14049
  this.queueLocalOfferAnswer();
14039
14050
  }
14040
14051
  });
14052
+ transceiver.namedMediaGroupsChange.on(() => {
14053
+ this.sendSourceAdvertisement(mediaType);
14054
+ });
14041
14055
  this.sendTransceivers.set(mediaType, transceiver);
14042
14056
  this.createJmpSession(mediaType);
14043
14057
  }
@@ -14227,7 +14241,11 @@ class MultistreamConnection extends EventEmitter$2 {
14227
14241
  };
14228
14242
  }
14229
14243
  else {
14230
- task = () => { var _a; return (_a = this.jmpSessions.get(mediaType)) === null || _a === void 0 ? void 0 : _a.sendSourceAdvertisement(1, numLiveSources); };
14244
+ task = () => {
14245
+ var _a;
14246
+ return (_a = this.jmpSessions
14247
+ .get(mediaType)) === null || _a === void 0 ? void 0 : _a.sendSourceAdvertisement(1, numLiveSources, mediaType === exports.MediaType.AudioMain ? transceiver.namedMediaGroups : []);
14248
+ };
14231
14249
  }
14232
14250
  if (((_b = this.dataChannel) === null || _b === void 0 ? void 0 : _b.readyState) === 'open') {
14233
14251
  task();