@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/esm/index.js
CHANGED
|
@@ -7562,6 +7562,8 @@ const maxFrameSizeToMaxBitrateMap = new Map([
|
|
|
7562
7562
|
[3600, 2500000],
|
|
7563
7563
|
[8160, 4000000],
|
|
7564
7564
|
]);
|
|
7565
|
+
const defaultVideoMainRtxTime = '300';
|
|
7566
|
+
const defaultVideoSlidesRtxTime = '1000';
|
|
7565
7567
|
function areProfileLevelIdsCompatible(senderProfileLevelId, receiverProfileLevelId, levelAsymmetryAllowed) {
|
|
7566
7568
|
const senderProfile = Number.parseInt(`0x${senderProfileLevelId}`, 16);
|
|
7567
7569
|
const recvProfile = Number.parseInt(`0x${receiverProfileLevelId}`, 16);
|
|
@@ -9800,10 +9802,10 @@ function addVlaExtension(mediaDescription) {
|
|
|
9800
9802
|
mediaDescription.addExtension({ uri: vlaExtensionUri });
|
|
9801
9803
|
}
|
|
9802
9804
|
}
|
|
9803
|
-
function applyFormatParameters(mediaDescription, paramsMap) {
|
|
9805
|
+
function applyFormatParameters(mediaDescription, codecs, paramsMap) {
|
|
9804
9806
|
paramsMap.forEach((value, param) => {
|
|
9805
9807
|
[...mediaDescription.codecs.values()]
|
|
9806
|
-
.filter((ci) => ci.name
|
|
9808
|
+
.filter((ci) => ci.name && codecs.includes(ci.name))
|
|
9807
9809
|
.forEach((ci) => {
|
|
9808
9810
|
if (value === null) {
|
|
9809
9811
|
ci.fmtParams.delete(param);
|
|
@@ -9924,7 +9926,7 @@ class EgressSdpMunger {
|
|
|
9924
9926
|
if (options.simulcastEnabled) {
|
|
9925
9927
|
mediaDescription.addLine(new SsrcGroupLine('SIM', this.streamIds.map((streamId) => streamId.ssrc)));
|
|
9926
9928
|
}
|
|
9927
|
-
applyFormatParameters(mediaDescription, this.customCodecParameters);
|
|
9929
|
+
applyFormatParameters(mediaDescription, ['H264', 'opus'], this.customCodecParameters);
|
|
9928
9930
|
if (options.twccDisabled) {
|
|
9929
9931
|
disableTwcc(mediaDescription);
|
|
9930
9932
|
}
|
|
@@ -10452,6 +10454,7 @@ class EventEmitter$2 extends events$1.exports.EventEmitter {
|
|
|
10452
10454
|
|
|
10453
10455
|
class IngressSdpMunger {
|
|
10454
10456
|
constructor() {
|
|
10457
|
+
this.customRtxCodecParameters = new Map();
|
|
10455
10458
|
this.ssrc = generateSsrc();
|
|
10456
10459
|
}
|
|
10457
10460
|
getReceiverId() {
|
|
@@ -10463,6 +10466,7 @@ class IngressSdpMunger {
|
|
|
10463
10466
|
logErrorAndThrow(WcmeErrorType.SDP_MUNGE_MISSING_CODECS, `No codecs present in m-line with MID ${mediaDescription.mid} after filtering.`);
|
|
10464
10467
|
}
|
|
10465
10468
|
removeMidRidExtensions(mediaDescription);
|
|
10469
|
+
applyFormatParameters(mediaDescription, ['rtx'], this.customRtxCodecParameters);
|
|
10466
10470
|
if (options.twccDisabled) {
|
|
10467
10471
|
disableTwcc(mediaDescription);
|
|
10468
10472
|
}
|
|
@@ -10486,6 +10490,12 @@ class IngressSdpMunger {
|
|
|
10486
10490
|
[...mediaDescription.codecs.values()].forEach((ci) => {
|
|
10487
10491
|
ci.fmtParams.set('x-google-start-bitrate', '60000');
|
|
10488
10492
|
});
|
|
10493
|
+
applyFormatParameters(mediaDescription, ['rtx'], this.customRtxCodecParameters);
|
|
10494
|
+
}
|
|
10495
|
+
setRtxCodecParameters(parameters) {
|
|
10496
|
+
Object.entries(parameters).forEach(([param, value]) => {
|
|
10497
|
+
this.customRtxCodecParameters.set(param, value);
|
|
10498
|
+
});
|
|
10489
10499
|
}
|
|
10490
10500
|
reset() {
|
|
10491
10501
|
this.ssrc = generateSsrc();
|
|
@@ -10704,7 +10714,9 @@ class ReceiveOnlyTransceiver extends Transceiver {
|
|
|
10704
10714
|
});
|
|
10705
10715
|
}
|
|
10706
10716
|
mungeLocalDescription(mediaDescription) {
|
|
10707
|
-
this.munger.mungeLocalDescription(mediaDescription, {
|
|
10717
|
+
this.munger.mungeLocalDescription(mediaDescription, {
|
|
10718
|
+
twccDisabled: this.twccDisabled,
|
|
10719
|
+
});
|
|
10708
10720
|
}
|
|
10709
10721
|
mungeRemoteDescription(mediaDescription) {
|
|
10710
10722
|
this.munger.mungeRemoteDescription(mediaDescription);
|
|
@@ -10741,6 +10753,9 @@ class ReceiveOnlyTransceiver extends Transceiver {
|
|
|
10741
10753
|
this.metadata.lastActiveSpeakerUpdateTimestamp = getCurrentTimestamp();
|
|
10742
10754
|
}
|
|
10743
10755
|
}
|
|
10756
|
+
setRtxCodecParameters(parameters) {
|
|
10757
|
+
this.munger.setRtxCodecParameters(parameters);
|
|
10758
|
+
}
|
|
10744
10759
|
}
|
|
10745
10760
|
ReceiveOnlyTransceiver.rid = '1';
|
|
10746
10761
|
|
|
@@ -15297,6 +15312,11 @@ SCTP Max Message Size: ${maxMessageSize}`);
|
|
|
15297
15312
|
mediaType,
|
|
15298
15313
|
munger,
|
|
15299
15314
|
});
|
|
15315
|
+
if (getMediaFamily(mediaType) === MediaFamily.Video) {
|
|
15316
|
+
recvOnlyTransceiver.setRtxCodecParameters({
|
|
15317
|
+
'rtx-time': mediaType === MediaType.VideoMain ? defaultVideoMainRtxTime : defaultVideoSlidesRtxTime,
|
|
15318
|
+
});
|
|
15319
|
+
}
|
|
15300
15320
|
recvOnlyTransceiver.twccDisabled =
|
|
15301
15321
|
getMediaFamily(mediaType) === MediaFamily.Audio ? this.options.disableAudioTwcc : false;
|
|
15302
15322
|
this.recvTransceivers.set(mediaType, [
|