@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/cjs/index.js CHANGED
@@ -9534,7 +9534,7 @@ class EgressSdpMunger {
9534
9534
  reset() {
9535
9535
  this.streamIds = [];
9536
9536
  }
9537
- mungeLocalDescription(mediaDescription, simulcastEnabled, rtxEnabled, twccDisabled) {
9537
+ mungeLocalDescription(mediaDescription, options) {
9538
9538
  var _a;
9539
9539
  retainCodecs(mediaDescription, ['h264', 'opus', 'rtx']);
9540
9540
  if (mediaDescription.codecs.size === 0) {
@@ -9544,10 +9544,10 @@ class EgressSdpMunger {
9544
9544
  mediaDescription.rids = [];
9545
9545
  mediaDescription.simulcast = undefined;
9546
9546
  removeMidRidExtensions(mediaDescription);
9547
- if (simulcastEnabled) {
9547
+ if (options.simulcastEnabled) {
9548
9548
  addVlaExtension(mediaDescription);
9549
9549
  }
9550
- const numStreams = simulcastEnabled ? 3 : 1;
9550
+ const numStreams = options.simulcastEnabled ? 3 : 1;
9551
9551
  if (!this.streamIds.length) {
9552
9552
  if (mediaDescription.ssrcs.length) {
9553
9553
  const ssrcs = [
@@ -9588,7 +9588,7 @@ class EgressSdpMunger {
9588
9588
  const newStreamId = {
9589
9589
  ssrc: generateSsrc(),
9590
9590
  };
9591
- if (rtxEnabled) {
9591
+ if (options.rtxEnabled) {
9592
9592
  newStreamId.rtxSsrc = generateSsrc();
9593
9593
  }
9594
9594
  this.streamIds.push(newStreamId);
@@ -9601,18 +9601,18 @@ class EgressSdpMunger {
9601
9601
  const rtpSsrc = streamId.ssrc;
9602
9602
  mediaDescription.addLine(new SsrcLine(rtpSsrc, 'cname', `${rtpSsrc}-cname`));
9603
9603
  mediaDescription.addLine(new SsrcLine(rtpSsrc, 'msid', '-', '1'));
9604
- if (rtxEnabled) {
9604
+ if (options.rtxEnabled) {
9605
9605
  const rtxSsrc = streamId.rtxSsrc;
9606
9606
  mediaDescription.addLine(new SsrcLine(rtxSsrc, 'cname', `${rtpSsrc}-cname`));
9607
9607
  mediaDescription.addLine(new SsrcLine(rtxSsrc, 'msid', '-', '1'));
9608
9608
  mediaDescription.addLine(new SsrcGroupLine('FID', [rtpSsrc, rtxSsrc]));
9609
9609
  }
9610
9610
  });
9611
- if (simulcastEnabled) {
9611
+ if (options.simulcastEnabled) {
9612
9612
  mediaDescription.addLine(new SsrcGroupLine('SIM', this.streamIds.map((streamId) => streamId.ssrc)));
9613
9613
  }
9614
9614
  applyFormatParameters(mediaDescription, this.customCodecParameters);
9615
- if (twccDisabled) {
9615
+ if (options.twccDisabled) {
9616
9616
  disableTwcc(mediaDescription);
9617
9617
  }
9618
9618
  }
@@ -10141,14 +10141,14 @@ class IngressSdpMunger {
10141
10141
  getReceiverId() {
10142
10142
  return Object.assign({ ssrc: this.ssrc }, (this.rtxSsrc ? { rtxSsrc: this.rtxSsrc } : {}));
10143
10143
  }
10144
- mungeLocalDescription(mediaDescription, twccDisabled) {
10144
+ mungeLocalDescription(mediaDescription, options) {
10145
10145
  retainCodecs(mediaDescription, ['h264', 'opus', 'rtx']);
10146
10146
  if (mediaDescription.codecs.size === 0) {
10147
10147
  logErrorAndThrow(exports.WcmeErrorType.SDP_MUNGE_MISSING_CODECS, `No codecs present in m-line with MID ${mediaDescription.mid} after filtering.`);
10148
10148
  }
10149
10149
  mediaDescription.bandwidth = new BandwidthLine('TIAS', 20000000);
10150
10150
  removeMidRidExtensions(mediaDescription);
10151
- if (twccDisabled) {
10151
+ if (options.twccDisabled) {
10152
10152
  disableTwcc(mediaDescription);
10153
10153
  }
10154
10154
  }
@@ -10344,7 +10344,7 @@ class ReceiveOnlyTransceiver extends Transceiver {
10344
10344
  return this.receiver.getStats();
10345
10345
  }
10346
10346
  mungeLocalDescription(mediaDescription) {
10347
- this.munger.mungeLocalDescription(mediaDescription, this.twccDisabled);
10347
+ this.munger.mungeLocalDescription(mediaDescription, { twccDisabled: this.twccDisabled });
10348
10348
  }
10349
10349
  mungeRemoteDescription(mediaDescription) {
10350
10350
  this.munger.mungeRemoteDescription(mediaDescription);
@@ -14207,7 +14207,11 @@ class SendOnlyTransceiver extends Transceiver {
14207
14207
  return params.encodings.length > 1;
14208
14208
  }
14209
14209
  mungeLocalDescription(mediaDescription) {
14210
- this.munger.mungeLocalDescription(mediaDescription, this.isSimulcastEnabled(), this.rtxEnabled, this.twccDisabled);
14210
+ this.munger.mungeLocalDescription(mediaDescription, {
14211
+ simulcastEnabled: this.isSimulcastEnabled(),
14212
+ rtxEnabled: this.rtxEnabled,
14213
+ twccDisabled: this.twccDisabled,
14214
+ });
14211
14215
  }
14212
14216
  mungeLocalDescriptionForRemoteServer(mediaDescription) {
14213
14217
  this.munger.mungeLocalDescriptionForRemoteServer(mediaDescription, getMediaContent(this.mediaType), this.csi);
@@ -14264,6 +14268,9 @@ class SendSlot {
14264
14268
  setNamedMediaGroups(namedMediaGroups) {
14265
14269
  this.sendTransceiver.setNamedMediaGroups(namedMediaGroups);
14266
14270
  }
14271
+ clearNamedMediaGroups() {
14272
+ this.setNamedMediaGroups([]);
14273
+ }
14267
14274
  get active() {
14268
14275
  return this.sendTransceiver.active;
14269
14276
  }