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

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