@webex/web-client-media-engine 3.30.3 → 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/cjs/index.js +22 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +22 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/types/index.d.ts +8 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -9936,7 +9936,7 @@ class EgressSdpMunger {
|
|
|
9936
9936
|
}
|
|
9937
9937
|
}
|
|
9938
9938
|
}
|
|
9939
|
-
mungeRemoteDescription(mediaDescription) {
|
|
9939
|
+
mungeRemoteDescription(mediaDescription, mungeOptions = { dtxDisabled: true }) {
|
|
9940
9940
|
if (retainCandidatesByTransportType(mediaDescription, ['udp', 'tcp'])) {
|
|
9941
9941
|
logger.log(`Some unsupported remote candidates have been removed from mid ${mediaDescription.mid}`);
|
|
9942
9942
|
}
|
|
@@ -9944,6 +9944,11 @@ class EgressSdpMunger {
|
|
|
9944
9944
|
[...mediaDescription.codecs.values()].forEach((ci) => {
|
|
9945
9945
|
ci.fmtParams.set('x-google-start-bitrate', '60000');
|
|
9946
9946
|
});
|
|
9947
|
+
if (mediaDescription.type === 'audio') {
|
|
9948
|
+
[...mediaDescription.codecs.values()].forEach((ci) => {
|
|
9949
|
+
ci.fmtParams.set('usedtx', mungeOptions.dtxDisabled ? '0' : '1');
|
|
9950
|
+
});
|
|
9951
|
+
}
|
|
9947
9952
|
}
|
|
9948
9953
|
getSenderIds() {
|
|
9949
9954
|
return this.streamIds;
|
|
@@ -14506,6 +14511,7 @@ class SendOnlyTransceiver extends Transceiver {
|
|
|
14506
14511
|
constructor(config) {
|
|
14507
14512
|
super(config);
|
|
14508
14513
|
this.rtxEnabled = false;
|
|
14514
|
+
this.dtxDisabled = true;
|
|
14509
14515
|
this.streamMuteStateChange = new TypedEvent();
|
|
14510
14516
|
this.streamPublishStateChange = new TypedEvent();
|
|
14511
14517
|
this.negotiationNeeded = new TypedEvent();
|
|
@@ -14726,7 +14732,9 @@ class SendOnlyTransceiver extends Transceiver {
|
|
|
14726
14732
|
this.munger.mungeLocalDescriptionForRemoteServer(mediaDescription, getMediaContent(this.mediaType), this.csi, mungeOptions);
|
|
14727
14733
|
}
|
|
14728
14734
|
mungeRemoteDescription(mediaDescription) {
|
|
14729
|
-
this.munger.mungeRemoteDescription(mediaDescription
|
|
14735
|
+
this.munger.mungeRemoteDescription(mediaDescription, {
|
|
14736
|
+
dtxDisabled: this.dtxDisabled,
|
|
14737
|
+
});
|
|
14730
14738
|
}
|
|
14731
14739
|
get senderIds() {
|
|
14732
14740
|
return this.munger.getSenderIds();
|
|
@@ -14926,6 +14934,7 @@ const defaultMultistreamConnectionOptions = {
|
|
|
14926
14934
|
disableAudioTwcc: true,
|
|
14927
14935
|
doFullIce: BrowserInfo.isFirefox(),
|
|
14928
14936
|
stopIceGatheringAfterFirstRelayCandidate: false,
|
|
14937
|
+
disableAudioMainDtx: true,
|
|
14929
14938
|
metricsCallback: () => { },
|
|
14930
14939
|
};
|
|
14931
14940
|
class MultistreamConnection extends EventEmitter$2 {
|
|
@@ -14940,6 +14949,7 @@ class MultistreamConnection extends EventEmitter$2 {
|
|
|
14940
14949
|
this.offerAnswerQueue = new AsyncQueue();
|
|
14941
14950
|
this.currentCreateOfferId = 0;
|
|
14942
14951
|
this.iceCandidates = [];
|
|
14952
|
+
this.metadata = { isMediaBypassEdge: false };
|
|
14943
14953
|
this.options = Object.assign(Object.assign({}, defaultMultistreamConnectionOptions), userOptions);
|
|
14944
14954
|
logger.info(`Creating multistream connection with options ${JSON.stringify(this.options)}`);
|
|
14945
14955
|
this.metricsCallback = this.options.metricsCallback;
|
|
@@ -15058,6 +15068,7 @@ class MultistreamConnection extends EventEmitter$2 {
|
|
|
15058
15068
|
}
|
|
15059
15069
|
transceiver.twccDisabled =
|
|
15060
15070
|
getMediaFamily(mediaType) === exports.MediaFamily.Audio ? this.options.disableAudioTwcc : false;
|
|
15071
|
+
transceiver.dtxDisabled = mediaType !== exports.MediaType.AudioMain || this.options.disableAudioMainDtx;
|
|
15061
15072
|
transceiver.active = false;
|
|
15062
15073
|
transceiver.streamMuteStateChange.on(() => {
|
|
15063
15074
|
this.sendSourceAdvertisement(mediaType);
|
|
@@ -15623,7 +15634,7 @@ SCTP Max Message Size: ${maxMessageSize}`);
|
|
|
15623
15634
|
return parsedOffer.toString();
|
|
15624
15635
|
}
|
|
15625
15636
|
preProcessRemoteAnswer(answer) {
|
|
15626
|
-
var _a;
|
|
15637
|
+
var _a, _b;
|
|
15627
15638
|
const parsedAnswer = parse(answer);
|
|
15628
15639
|
const parsedOffer = parse((_a = this.pc.getLocalDescription()) === null || _a === void 0 ? void 0 : _a.sdp);
|
|
15629
15640
|
matchMediaDescriptionsInAnswer(parsedOffer, parsedAnswer);
|
|
@@ -15649,6 +15660,9 @@ SCTP Max Message Size: ${maxMessageSize}`);
|
|
|
15649
15660
|
if (BrowserInfo.isFirefox()) {
|
|
15650
15661
|
setupBundle(parsedAnswer, this.options.bundlePolicy, this.midPredictor.getMidMap());
|
|
15651
15662
|
}
|
|
15663
|
+
if ((_b = parsedAnswer.session.information) === null || _b === void 0 ? void 0 : _b.info) {
|
|
15664
|
+
this.metadata.isMediaBypassEdge = !parsedAnswer.session.information.info.includes('linus');
|
|
15665
|
+
}
|
|
15652
15666
|
return parsedAnswer.toString();
|
|
15653
15667
|
}
|
|
15654
15668
|
getSendTransceiverOrThrow(mediaType) {
|
|
@@ -15773,6 +15787,11 @@ SCTP Max Message Size: ${maxMessageSize}`);
|
|
|
15773
15787
|
}
|
|
15774
15788
|
preProcessStats(stats) {
|
|
15775
15789
|
return __awaiter$1(this, void 0, void 0, function* () {
|
|
15790
|
+
stats.forEach((stat) => {
|
|
15791
|
+
if (stat.type === 'peer-connection') {
|
|
15792
|
+
stat.isMediaBypassEdge = this.metadata.isMediaBypassEdge;
|
|
15793
|
+
}
|
|
15794
|
+
});
|
|
15776
15795
|
yield Promise.all([...this.sendTransceivers.values()].map((transceiver) => __awaiter$1(this, void 0, void 0, function* () {
|
|
15777
15796
|
(yield transceiver.getStats()).forEach((senderStats) => {
|
|
15778
15797
|
if (senderStats.type === 'outbound-rtp' || senderStats.type === 'media-source') {
|