@webex/web-client-media-engine 3.28.0 → 3.28.1
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 +24 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +24 -4
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -7566,6 +7566,8 @@ const maxFrameSizeToMaxBitrateMap = new Map([
|
|
|
7566
7566
|
[3600, 2500000],
|
|
7567
7567
|
[8160, 4000000],
|
|
7568
7568
|
]);
|
|
7569
|
+
const defaultVideoMainRtxTime = '300';
|
|
7570
|
+
const defaultVideoSlidesRtxTime = '1000';
|
|
7569
7571
|
function areProfileLevelIdsCompatible(senderProfileLevelId, receiverProfileLevelId, levelAsymmetryAllowed) {
|
|
7570
7572
|
const senderProfile = Number.parseInt(`0x${senderProfileLevelId}`, 16);
|
|
7571
7573
|
const recvProfile = Number.parseInt(`0x${receiverProfileLevelId}`, 16);
|
|
@@ -9804,10 +9806,10 @@ function addVlaExtension(mediaDescription) {
|
|
|
9804
9806
|
mediaDescription.addExtension({ uri: vlaExtensionUri });
|
|
9805
9807
|
}
|
|
9806
9808
|
}
|
|
9807
|
-
function applyFormatParameters(mediaDescription, paramsMap) {
|
|
9809
|
+
function applyFormatParameters(mediaDescription, codecs, paramsMap) {
|
|
9808
9810
|
paramsMap.forEach((value, param) => {
|
|
9809
9811
|
[...mediaDescription.codecs.values()]
|
|
9810
|
-
.filter((ci) => ci.name
|
|
9812
|
+
.filter((ci) => ci.name && codecs.includes(ci.name))
|
|
9811
9813
|
.forEach((ci) => {
|
|
9812
9814
|
if (value === null) {
|
|
9813
9815
|
ci.fmtParams.delete(param);
|
|
@@ -9928,7 +9930,7 @@ class EgressSdpMunger {
|
|
|
9928
9930
|
if (options.simulcastEnabled) {
|
|
9929
9931
|
mediaDescription.addLine(new SsrcGroupLine('SIM', this.streamIds.map((streamId) => streamId.ssrc)));
|
|
9930
9932
|
}
|
|
9931
|
-
applyFormatParameters(mediaDescription, this.customCodecParameters);
|
|
9933
|
+
applyFormatParameters(mediaDescription, ['H264', 'opus'], this.customCodecParameters);
|
|
9932
9934
|
if (options.twccDisabled) {
|
|
9933
9935
|
disableTwcc(mediaDescription);
|
|
9934
9936
|
}
|
|
@@ -10456,6 +10458,7 @@ class EventEmitter$2 extends events$1.exports.EventEmitter {
|
|
|
10456
10458
|
|
|
10457
10459
|
class IngressSdpMunger {
|
|
10458
10460
|
constructor() {
|
|
10461
|
+
this.customRtxCodecParameters = new Map();
|
|
10459
10462
|
this.ssrc = generateSsrc();
|
|
10460
10463
|
}
|
|
10461
10464
|
getReceiverId() {
|
|
@@ -10467,6 +10470,7 @@ class IngressSdpMunger {
|
|
|
10467
10470
|
logErrorAndThrow(exports.WcmeErrorType.SDP_MUNGE_MISSING_CODECS, `No codecs present in m-line with MID ${mediaDescription.mid} after filtering.`);
|
|
10468
10471
|
}
|
|
10469
10472
|
removeMidRidExtensions(mediaDescription);
|
|
10473
|
+
applyFormatParameters(mediaDescription, ['rtx'], this.customRtxCodecParameters);
|
|
10470
10474
|
if (options.twccDisabled) {
|
|
10471
10475
|
disableTwcc(mediaDescription);
|
|
10472
10476
|
}
|
|
@@ -10490,6 +10494,12 @@ class IngressSdpMunger {
|
|
|
10490
10494
|
[...mediaDescription.codecs.values()].forEach((ci) => {
|
|
10491
10495
|
ci.fmtParams.set('x-google-start-bitrate', '60000');
|
|
10492
10496
|
});
|
|
10497
|
+
applyFormatParameters(mediaDescription, ['rtx'], this.customRtxCodecParameters);
|
|
10498
|
+
}
|
|
10499
|
+
setRtxCodecParameters(parameters) {
|
|
10500
|
+
Object.entries(parameters).forEach(([param, value]) => {
|
|
10501
|
+
this.customRtxCodecParameters.set(param, value);
|
|
10502
|
+
});
|
|
10493
10503
|
}
|
|
10494
10504
|
reset() {
|
|
10495
10505
|
this.ssrc = generateSsrc();
|
|
@@ -10708,7 +10718,9 @@ class ReceiveOnlyTransceiver extends Transceiver {
|
|
|
10708
10718
|
});
|
|
10709
10719
|
}
|
|
10710
10720
|
mungeLocalDescription(mediaDescription) {
|
|
10711
|
-
this.munger.mungeLocalDescription(mediaDescription, {
|
|
10721
|
+
this.munger.mungeLocalDescription(mediaDescription, {
|
|
10722
|
+
twccDisabled: this.twccDisabled,
|
|
10723
|
+
});
|
|
10712
10724
|
}
|
|
10713
10725
|
mungeRemoteDescription(mediaDescription) {
|
|
10714
10726
|
this.munger.mungeRemoteDescription(mediaDescription);
|
|
@@ -10745,6 +10757,9 @@ class ReceiveOnlyTransceiver extends Transceiver {
|
|
|
10745
10757
|
this.metadata.lastActiveSpeakerUpdateTimestamp = getCurrentTimestamp();
|
|
10746
10758
|
}
|
|
10747
10759
|
}
|
|
10760
|
+
setRtxCodecParameters(parameters) {
|
|
10761
|
+
this.munger.setRtxCodecParameters(parameters);
|
|
10762
|
+
}
|
|
10748
10763
|
}
|
|
10749
10764
|
ReceiveOnlyTransceiver.rid = '1';
|
|
10750
10765
|
|
|
@@ -15301,6 +15316,11 @@ SCTP Max Message Size: ${maxMessageSize}`);
|
|
|
15301
15316
|
mediaType,
|
|
15302
15317
|
munger,
|
|
15303
15318
|
});
|
|
15319
|
+
if (getMediaFamily(mediaType) === exports.MediaFamily.Video) {
|
|
15320
|
+
recvOnlyTransceiver.setRtxCodecParameters({
|
|
15321
|
+
'rtx-time': mediaType === exports.MediaType.VideoMain ? defaultVideoMainRtxTime : defaultVideoSlidesRtxTime,
|
|
15322
|
+
});
|
|
15323
|
+
}
|
|
15304
15324
|
recvOnlyTransceiver.twccDisabled =
|
|
15305
15325
|
getMediaFamily(mediaType) === exports.MediaFamily.Audio ? this.options.disableAudioTwcc : false;
|
|
15306
15326
|
this.recvTransceivers.set(mediaType, [
|