@webex/web-client-media-engine 3.30.4 → 3.31.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/esm/index.js CHANGED
@@ -9932,7 +9932,7 @@ class EgressSdpMunger {
9932
9932
  }
9933
9933
  }
9934
9934
  }
9935
- mungeRemoteDescription(mediaDescription) {
9935
+ mungeRemoteDescription(mediaDescription, mungeOptions = { dtxDisabled: true }) {
9936
9936
  if (retainCandidatesByTransportType(mediaDescription, ['udp', 'tcp'])) {
9937
9937
  logger.log(`Some unsupported remote candidates have been removed from mid ${mediaDescription.mid}`);
9938
9938
  }
@@ -9940,6 +9940,11 @@ class EgressSdpMunger {
9940
9940
  [...mediaDescription.codecs.values()].forEach((ci) => {
9941
9941
  ci.fmtParams.set('x-google-start-bitrate', '60000');
9942
9942
  });
9943
+ if (mediaDescription.type === 'audio') {
9944
+ [...mediaDescription.codecs.values()].forEach((ci) => {
9945
+ ci.fmtParams.set('usedtx', mungeOptions.dtxDisabled ? '0' : '1');
9946
+ });
9947
+ }
9943
9948
  }
9944
9949
  getSenderIds() {
9945
9950
  return this.streamIds;
@@ -14502,6 +14507,7 @@ class SendOnlyTransceiver extends Transceiver {
14502
14507
  constructor(config) {
14503
14508
  super(config);
14504
14509
  this.rtxEnabled = false;
14510
+ this.dtxDisabled = true;
14505
14511
  this.streamMuteStateChange = new TypedEvent();
14506
14512
  this.streamPublishStateChange = new TypedEvent();
14507
14513
  this.negotiationNeeded = new TypedEvent();
@@ -14722,7 +14728,9 @@ class SendOnlyTransceiver extends Transceiver {
14722
14728
  this.munger.mungeLocalDescriptionForRemoteServer(mediaDescription, getMediaContent(this.mediaType), this.csi, mungeOptions);
14723
14729
  }
14724
14730
  mungeRemoteDescription(mediaDescription) {
14725
- this.munger.mungeRemoteDescription(mediaDescription);
14731
+ this.munger.mungeRemoteDescription(mediaDescription, {
14732
+ dtxDisabled: this.dtxDisabled,
14733
+ });
14726
14734
  }
14727
14735
  get senderIds() {
14728
14736
  return this.munger.getSenderIds();
@@ -14922,6 +14930,7 @@ const defaultMultistreamConnectionOptions = {
14922
14930
  disableAudioTwcc: true,
14923
14931
  doFullIce: BrowserInfo.isFirefox(),
14924
14932
  stopIceGatheringAfterFirstRelayCandidate: false,
14933
+ disableAudioMainDtx: true,
14925
14934
  metricsCallback: () => { },
14926
14935
  };
14927
14936
  class MultistreamConnection extends EventEmitter$2 {
@@ -15055,6 +15064,7 @@ class MultistreamConnection extends EventEmitter$2 {
15055
15064
  }
15056
15065
  transceiver.twccDisabled =
15057
15066
  getMediaFamily(mediaType) === MediaFamily.Audio ? this.options.disableAudioTwcc : false;
15067
+ transceiver.dtxDisabled = mediaType !== MediaType.AudioMain || this.options.disableAudioMainDtx;
15058
15068
  transceiver.active = false;
15059
15069
  transceiver.streamMuteStateChange.on(() => {
15060
15070
  this.sendSourceAdvertisement(mediaType);