@webex/web-client-media-engine 3.11.7 → 3.11.8

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
@@ -9530,7 +9530,7 @@ class EgressSdpMunger {
9530
9530
  reset() {
9531
9531
  this.streamIds = [];
9532
9532
  }
9533
- mungeLocalDescription(mediaDescription, simulcastEnabled, rtxEnabled, twccDisabled) {
9533
+ mungeLocalDescription(mediaDescription, options) {
9534
9534
  var _a;
9535
9535
  retainCodecs(mediaDescription, ['h264', 'opus', 'rtx']);
9536
9536
  if (mediaDescription.codecs.size === 0) {
@@ -9540,10 +9540,10 @@ class EgressSdpMunger {
9540
9540
  mediaDescription.rids = [];
9541
9541
  mediaDescription.simulcast = undefined;
9542
9542
  removeMidRidExtensions(mediaDescription);
9543
- if (simulcastEnabled) {
9543
+ if (options.simulcastEnabled) {
9544
9544
  addVlaExtension(mediaDescription);
9545
9545
  }
9546
- const numStreams = simulcastEnabled ? 3 : 1;
9546
+ const numStreams = options.simulcastEnabled ? 3 : 1;
9547
9547
  if (!this.streamIds.length) {
9548
9548
  if (mediaDescription.ssrcs.length) {
9549
9549
  const ssrcs = [
@@ -9584,7 +9584,7 @@ class EgressSdpMunger {
9584
9584
  const newStreamId = {
9585
9585
  ssrc: generateSsrc(),
9586
9586
  };
9587
- if (rtxEnabled) {
9587
+ if (options.rtxEnabled) {
9588
9588
  newStreamId.rtxSsrc = generateSsrc();
9589
9589
  }
9590
9590
  this.streamIds.push(newStreamId);
@@ -9597,18 +9597,18 @@ class EgressSdpMunger {
9597
9597
  const rtpSsrc = streamId.ssrc;
9598
9598
  mediaDescription.addLine(new SsrcLine(rtpSsrc, 'cname', `${rtpSsrc}-cname`));
9599
9599
  mediaDescription.addLine(new SsrcLine(rtpSsrc, 'msid', '-', '1'));
9600
- if (rtxEnabled) {
9600
+ if (options.rtxEnabled) {
9601
9601
  const rtxSsrc = streamId.rtxSsrc;
9602
9602
  mediaDescription.addLine(new SsrcLine(rtxSsrc, 'cname', `${rtpSsrc}-cname`));
9603
9603
  mediaDescription.addLine(new SsrcLine(rtxSsrc, 'msid', '-', '1'));
9604
9604
  mediaDescription.addLine(new SsrcGroupLine('FID', [rtpSsrc, rtxSsrc]));
9605
9605
  }
9606
9606
  });
9607
- if (simulcastEnabled) {
9607
+ if (options.simulcastEnabled) {
9608
9608
  mediaDescription.addLine(new SsrcGroupLine('SIM', this.streamIds.map((streamId) => streamId.ssrc)));
9609
9609
  }
9610
9610
  applyFormatParameters(mediaDescription, this.customCodecParameters);
9611
- if (twccDisabled) {
9611
+ if (options.twccDisabled) {
9612
9612
  disableTwcc(mediaDescription);
9613
9613
  }
9614
9614
  }
@@ -10137,14 +10137,14 @@ class IngressSdpMunger {
10137
10137
  getReceiverId() {
10138
10138
  return Object.assign({ ssrc: this.ssrc }, (this.rtxSsrc ? { rtxSsrc: this.rtxSsrc } : {}));
10139
10139
  }
10140
- mungeLocalDescription(mediaDescription, twccDisabled) {
10140
+ mungeLocalDescription(mediaDescription, options) {
10141
10141
  retainCodecs(mediaDescription, ['h264', 'opus', 'rtx']);
10142
10142
  if (mediaDescription.codecs.size === 0) {
10143
10143
  logErrorAndThrow(WcmeErrorType.SDP_MUNGE_MISSING_CODECS, `No codecs present in m-line with MID ${mediaDescription.mid} after filtering.`);
10144
10144
  }
10145
10145
  mediaDescription.bandwidth = new BandwidthLine('TIAS', 20000000);
10146
10146
  removeMidRidExtensions(mediaDescription);
10147
- if (twccDisabled) {
10147
+ if (options.twccDisabled) {
10148
10148
  disableTwcc(mediaDescription);
10149
10149
  }
10150
10150
  }
@@ -10340,7 +10340,7 @@ class ReceiveOnlyTransceiver extends Transceiver {
10340
10340
  return this.receiver.getStats();
10341
10341
  }
10342
10342
  mungeLocalDescription(mediaDescription) {
10343
- this.munger.mungeLocalDescription(mediaDescription, this.twccDisabled);
10343
+ this.munger.mungeLocalDescription(mediaDescription, { twccDisabled: this.twccDisabled });
10344
10344
  }
10345
10345
  mungeRemoteDescription(mediaDescription) {
10346
10346
  this.munger.mungeRemoteDescription(mediaDescription);
@@ -14203,7 +14203,11 @@ class SendOnlyTransceiver extends Transceiver {
14203
14203
  return params.encodings.length > 1;
14204
14204
  }
14205
14205
  mungeLocalDescription(mediaDescription) {
14206
- this.munger.mungeLocalDescription(mediaDescription, this.isSimulcastEnabled(), this.rtxEnabled, this.twccDisabled);
14206
+ this.munger.mungeLocalDescription(mediaDescription, {
14207
+ simulcastEnabled: this.isSimulcastEnabled(),
14208
+ rtxEnabled: this.rtxEnabled,
14209
+ twccDisabled: this.twccDisabled,
14210
+ });
14207
14211
  }
14208
14212
  mungeLocalDescriptionForRemoteServer(mediaDescription) {
14209
14213
  this.munger.mungeLocalDescriptionForRemoteServer(mediaDescription, getMediaContent(this.mediaType), this.csi);
@@ -14260,6 +14264,9 @@ class SendSlot {
14260
14264
  setNamedMediaGroups(namedMediaGroups) {
14261
14265
  this.sendTransceiver.setNamedMediaGroups(namedMediaGroups);
14262
14266
  }
14267
+ clearNamedMediaGroups() {
14268
+ this.setNamedMediaGroups([]);
14269
+ }
14263
14270
  get active() {
14264
14271
  return this.sendTransceiver.active;
14265
14272
  }