@webex/web-client-media-engine 3.10.1 → 3.11.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 +28 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +28 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/types/index.d.ts +3 -1
- package/package.json +2 -2
package/dist/cjs/index.js
CHANGED
|
@@ -9038,6 +9038,18 @@ function parse(sdp, grammar = DefaultSdpGrammar) {
|
|
|
9038
9038
|
const parsed = parseToModel(lines);
|
|
9039
9039
|
return parsed;
|
|
9040
9040
|
}
|
|
9041
|
+
|
|
9042
|
+
function disableRtcpFbValue(sdpOrAv, rtcpFbValue) {
|
|
9043
|
+
const mediaDescriptions = sdpOrAv instanceof Sdp ? sdpOrAv.avMedia : [sdpOrAv];
|
|
9044
|
+
mediaDescriptions.forEach((media) => {
|
|
9045
|
+
media.codecs.forEach((codec) => {
|
|
9046
|
+
codec.feedback = codec.feedback.filter((fb) => fb !== rtcpFbValue);
|
|
9047
|
+
});
|
|
9048
|
+
});
|
|
9049
|
+
}
|
|
9050
|
+
function disableTwcc(sdpOrAv) {
|
|
9051
|
+
disableRtcpFbValue(sdpOrAv, 'transport-cc');
|
|
9052
|
+
}
|
|
9041
9053
|
function removeCodec(sdpOrAv, codecName) {
|
|
9042
9054
|
const mediaDescriptions = sdpOrAv instanceof Sdp ? sdpOrAv.avMedia : [sdpOrAv];
|
|
9043
9055
|
mediaDescriptions.forEach((media) => {
|
|
@@ -9379,7 +9391,7 @@ class EgressSdpMunger {
|
|
|
9379
9391
|
reset() {
|
|
9380
9392
|
this.streamIds = [];
|
|
9381
9393
|
}
|
|
9382
|
-
mungeLocalDescription(mediaDescription, simulcastEnabled, rtxEnabled) {
|
|
9394
|
+
mungeLocalDescription(mediaDescription, simulcastEnabled, rtxEnabled, twccDisabled) {
|
|
9383
9395
|
var _a;
|
|
9384
9396
|
retainCodecs(mediaDescription, ['h264', 'opus', 'rtx']);
|
|
9385
9397
|
if (mediaDescription.codecs.size === 0) {
|
|
@@ -9457,6 +9469,9 @@ class EgressSdpMunger {
|
|
|
9457
9469
|
mediaDescription.addLine(new SsrcGroupLine('SIM', this.streamIds.map((streamId) => streamId.ssrc)));
|
|
9458
9470
|
}
|
|
9459
9471
|
applyFormatParameters(mediaDescription, this.customCodecParameters);
|
|
9472
|
+
if (twccDisabled) {
|
|
9473
|
+
disableTwcc(mediaDescription);
|
|
9474
|
+
}
|
|
9460
9475
|
}
|
|
9461
9476
|
mungeLocalDescriptionForRemoteServer(mediaDescription, mediaContent, csi) {
|
|
9462
9477
|
injectContentType(mediaDescription, mediaContent);
|
|
@@ -9983,13 +9998,16 @@ class IngressSdpMunger {
|
|
|
9983
9998
|
getReceiverId() {
|
|
9984
9999
|
return Object.assign({ ssrc: this.ssrc }, (this.rtxSsrc ? { rtxSsrc: this.rtxSsrc } : {}));
|
|
9985
10000
|
}
|
|
9986
|
-
mungeLocalDescription(mediaDescription) {
|
|
10001
|
+
mungeLocalDescription(mediaDescription, twccDisabled) {
|
|
9987
10002
|
retainCodecs(mediaDescription, ['h264', 'opus', 'rtx']);
|
|
9988
10003
|
if (mediaDescription.codecs.size === 0) {
|
|
9989
10004
|
logErrorAndThrow(exports.WcmeErrorType.SDP_MUNGE_MISSING_CODECS, `No codecs present in m-line with MID ${mediaDescription.mid} after filtering.`);
|
|
9990
10005
|
}
|
|
9991
10006
|
mediaDescription.bandwidth = new BandwidthLine('TIAS', 20000000);
|
|
9992
10007
|
removeMidRidExtensions(mediaDescription);
|
|
10008
|
+
if (twccDisabled) {
|
|
10009
|
+
disableTwcc(mediaDescription);
|
|
10010
|
+
}
|
|
9993
10011
|
}
|
|
9994
10012
|
mungeRemoteDescription(mediaDescription) {
|
|
9995
10013
|
if (!mediaDescription.ssrcs.length) {
|
|
@@ -10139,6 +10157,7 @@ ReceiveSlot.Events = exports.ReceiveSlotEvents;
|
|
|
10139
10157
|
|
|
10140
10158
|
class Transceiver {
|
|
10141
10159
|
constructor(rtcRtpTransceiver, mid) {
|
|
10160
|
+
this.twccDisabled = false;
|
|
10142
10161
|
this._rtcRtpTransceiver = rtcRtpTransceiver;
|
|
10143
10162
|
this.mid = mid;
|
|
10144
10163
|
}
|
|
@@ -10182,7 +10201,7 @@ class ReceiveOnlyTransceiver extends Transceiver {
|
|
|
10182
10201
|
return this.receiver.getStats();
|
|
10183
10202
|
}
|
|
10184
10203
|
mungeLocalDescription(mediaDescription) {
|
|
10185
|
-
this.munger.mungeLocalDescription(mediaDescription);
|
|
10204
|
+
this.munger.mungeLocalDescription(mediaDescription, this.twccDisabled);
|
|
10186
10205
|
}
|
|
10187
10206
|
mungeRemoteDescription(mediaDescription) {
|
|
10188
10207
|
this.munger.mungeRemoteDescription(mediaDescription);
|
|
@@ -14045,7 +14064,7 @@ class SendOnlyTransceiver extends Transceiver {
|
|
|
14045
14064
|
return params.encodings.length > 1;
|
|
14046
14065
|
}
|
|
14047
14066
|
mungeLocalDescription(mediaDescription) {
|
|
14048
|
-
this.munger.mungeLocalDescription(mediaDescription, this.isSimulcastEnabled(), this.rtxEnabled);
|
|
14067
|
+
this.munger.mungeLocalDescription(mediaDescription, this.isSimulcastEnabled(), this.rtxEnabled, this.twccDisabled);
|
|
14049
14068
|
}
|
|
14050
14069
|
mungeLocalDescriptionForRemoteServer(mediaDescription) {
|
|
14051
14070
|
this.munger.mungeLocalDescriptionForRemoteServer(mediaDescription, getMediaContent(this.mediaType), this.csi);
|
|
@@ -14231,6 +14250,7 @@ const defaultMultistreamConnectionOptions = {
|
|
|
14231
14250
|
bundlePolicy: 'max-compat',
|
|
14232
14251
|
iceServers: undefined,
|
|
14233
14252
|
disableContentSimulcast: true,
|
|
14253
|
+
disableAudioTwcc: true,
|
|
14234
14254
|
};
|
|
14235
14255
|
class MultistreamConnection extends EventEmitter$2 {
|
|
14236
14256
|
constructor(userOptions = {}) {
|
|
@@ -14308,6 +14328,8 @@ class MultistreamConnection extends EventEmitter$2 {
|
|
|
14308
14328
|
'max-fs': `${defaultMaxVideoEncodeFrameSize}`,
|
|
14309
14329
|
});
|
|
14310
14330
|
}
|
|
14331
|
+
transceiver.twccDisabled =
|
|
14332
|
+
getMediaFamily(mediaType) === exports.MediaFamily.Audio ? this.options.disableAudioTwcc : false;
|
|
14311
14333
|
transceiver.active = false;
|
|
14312
14334
|
transceiver.streamMuteStateChange.on(() => {
|
|
14313
14335
|
this.sendSourceAdvertisement(mediaType);
|
|
@@ -14568,6 +14590,8 @@ class MultistreamConnection extends EventEmitter$2 {
|
|
|
14568
14590
|
const transceiverMid = this.midPredictor.getNextMid(mediaType);
|
|
14569
14591
|
const munger = new IngressSdpMunger();
|
|
14570
14592
|
const recvOnlyTransceiver = new ReceiveOnlyTransceiver(rtcRtpTransceiver, transceiverMid, munger);
|
|
14593
|
+
recvOnlyTransceiver.twccDisabled =
|
|
14594
|
+
getMediaFamily(mediaType) === exports.MediaFamily.Audio ? this.options.disableAudioTwcc : false;
|
|
14571
14595
|
this.recvTransceivers.set(mediaType, [
|
|
14572
14596
|
...(this.recvTransceivers.get(mediaType) || []),
|
|
14573
14597
|
recvOnlyTransceiver,
|