@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/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 {
|
|
@@ -14936,6 +14945,7 @@ class MultistreamConnection extends EventEmitter$2 {
|
|
|
14936
14945
|
this.offerAnswerQueue = new AsyncQueue();
|
|
14937
14946
|
this.currentCreateOfferId = 0;
|
|
14938
14947
|
this.iceCandidates = [];
|
|
14948
|
+
this.metadata = { isMediaBypassEdge: false };
|
|
14939
14949
|
this.options = Object.assign(Object.assign({}, defaultMultistreamConnectionOptions), userOptions);
|
|
14940
14950
|
logger.info(`Creating multistream connection with options ${JSON.stringify(this.options)}`);
|
|
14941
14951
|
this.metricsCallback = this.options.metricsCallback;
|
|
@@ -15054,6 +15064,7 @@ class MultistreamConnection extends EventEmitter$2 {
|
|
|
15054
15064
|
}
|
|
15055
15065
|
transceiver.twccDisabled =
|
|
15056
15066
|
getMediaFamily(mediaType) === MediaFamily.Audio ? this.options.disableAudioTwcc : false;
|
|
15067
|
+
transceiver.dtxDisabled = mediaType !== MediaType.AudioMain || this.options.disableAudioMainDtx;
|
|
15057
15068
|
transceiver.active = false;
|
|
15058
15069
|
transceiver.streamMuteStateChange.on(() => {
|
|
15059
15070
|
this.sendSourceAdvertisement(mediaType);
|
|
@@ -15619,7 +15630,7 @@ SCTP Max Message Size: ${maxMessageSize}`);
|
|
|
15619
15630
|
return parsedOffer.toString();
|
|
15620
15631
|
}
|
|
15621
15632
|
preProcessRemoteAnswer(answer) {
|
|
15622
|
-
var _a;
|
|
15633
|
+
var _a, _b;
|
|
15623
15634
|
const parsedAnswer = parse(answer);
|
|
15624
15635
|
const parsedOffer = parse((_a = this.pc.getLocalDescription()) === null || _a === void 0 ? void 0 : _a.sdp);
|
|
15625
15636
|
matchMediaDescriptionsInAnswer(parsedOffer, parsedAnswer);
|
|
@@ -15645,6 +15656,9 @@ SCTP Max Message Size: ${maxMessageSize}`);
|
|
|
15645
15656
|
if (BrowserInfo.isFirefox()) {
|
|
15646
15657
|
setupBundle(parsedAnswer, this.options.bundlePolicy, this.midPredictor.getMidMap());
|
|
15647
15658
|
}
|
|
15659
|
+
if ((_b = parsedAnswer.session.information) === null || _b === void 0 ? void 0 : _b.info) {
|
|
15660
|
+
this.metadata.isMediaBypassEdge = !parsedAnswer.session.information.info.includes('linus');
|
|
15661
|
+
}
|
|
15648
15662
|
return parsedAnswer.toString();
|
|
15649
15663
|
}
|
|
15650
15664
|
getSendTransceiverOrThrow(mediaType) {
|
|
@@ -15769,6 +15783,11 @@ SCTP Max Message Size: ${maxMessageSize}`);
|
|
|
15769
15783
|
}
|
|
15770
15784
|
preProcessStats(stats) {
|
|
15771
15785
|
return __awaiter$1(this, void 0, void 0, function* () {
|
|
15786
|
+
stats.forEach((stat) => {
|
|
15787
|
+
if (stat.type === 'peer-connection') {
|
|
15788
|
+
stat.isMediaBypassEdge = this.metadata.isMediaBypassEdge;
|
|
15789
|
+
}
|
|
15790
|
+
});
|
|
15772
15791
|
yield Promise.all([...this.sendTransceivers.values()].map((transceiver) => __awaiter$1(this, void 0, void 0, function* () {
|
|
15773
15792
|
(yield transceiver.getStats()).forEach((senderStats) => {
|
|
15774
15793
|
if (senderStats.type === 'outbound-rtp' || senderStats.type === 'media-source') {
|