@webex/web-client-media-engine 3.0.0 → 3.0.2
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 +26 -19
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +26 -19
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -9125,6 +9125,12 @@ function filterCodecs(parsedSdp, allowedCodecs) {
|
|
|
9125
9125
|
.filter((codecName) => !allowedLowerCase.includes(codecName.toLowerCase()))
|
|
9126
9126
|
.forEach((c) => removeCodec(parsedSdp, c));
|
|
9127
9127
|
}
|
|
9128
|
+
function filterCandidates(parsedSdp) {
|
|
9129
|
+
const supportedTransportTypes = ['udp', 'tcp'];
|
|
9130
|
+
parsedSdp.media.forEach((mline) => {
|
|
9131
|
+
mline.iceInfo.candidates = mline.iceInfo.candidates.filter((candidate) => supportedTransportTypes.includes(candidate.transport.toLowerCase()));
|
|
9132
|
+
});
|
|
9133
|
+
}
|
|
9128
9134
|
function setMaxBandwidth(parsedSdp, maxBandwidth) {
|
|
9129
9135
|
parsedSdp.avMedia.forEach((mline) => {
|
|
9130
9136
|
mline.bandwidth = new BandwidthLine('TIAS', maxBandwidth);
|
|
@@ -9938,26 +9944,26 @@ class SendOnlyTransceiver extends Transceiver {
|
|
|
9938
9944
|
}
|
|
9939
9945
|
updateSendParameters(requestedIdEncodingParamsMap) {
|
|
9940
9946
|
return __awaiter(this, void 0, void 0, function* () {
|
|
9941
|
-
if (
|
|
9942
|
-
|
|
9943
|
-
|
|
9944
|
-
|
|
9945
|
-
|
|
9946
|
-
|
|
9947
|
-
|
|
9948
|
-
|
|
9949
|
-
|
|
9950
|
-
|
|
9951
|
-
|
|
9952
|
-
|
|
9953
|
-
|
|
9954
|
-
|
|
9955
|
-
|
|
9956
|
-
|
|
9947
|
+
if (this.publishedStream) {
|
|
9948
|
+
this.setStreamRequested(requestedIdEncodingParamsMap.size > 0);
|
|
9949
|
+
const sendParameters = this.sender.getParameters();
|
|
9950
|
+
sendParameters.encodings.forEach((encoding, index) => {
|
|
9951
|
+
var _a, _b;
|
|
9952
|
+
const encodingParams = requestedIdEncodingParamsMap.get(index);
|
|
9953
|
+
encoding.active = !!encodingParams;
|
|
9954
|
+
if (encodingParams) {
|
|
9955
|
+
const { maxPayloadBitsPerSecond, maxFs, maxWidth, maxHeight } = encodingParams;
|
|
9956
|
+
const scaleDownRatio = getScaleDownRatio((_a = this.publishedStream) === null || _a === void 0 ? void 0 : _a.getSettings().width, (_b = this.publishedStream) === null || _b === void 0 ? void 0 : _b.getSettings().height, maxFs, maxWidth, maxHeight);
|
|
9957
|
+
if (maxPayloadBitsPerSecond !== undefined && maxPayloadBitsPerSecond >= 0) {
|
|
9958
|
+
encoding.maxBitrate = maxPayloadBitsPerSecond;
|
|
9959
|
+
}
|
|
9960
|
+
if (scaleDownRatio !== undefined && scaleDownRatio >= 1.0) {
|
|
9961
|
+
encoding.scaleResolutionDownBy = scaleDownRatio;
|
|
9962
|
+
}
|
|
9957
9963
|
}
|
|
9958
|
-
}
|
|
9959
|
-
|
|
9960
|
-
|
|
9964
|
+
});
|
|
9965
|
+
yield this.sender.setParameters(sendParameters);
|
|
9966
|
+
}
|
|
9961
9967
|
this.requestedIdEncodingParamsMap = requestedIdEncodingParamsMap;
|
|
9962
9968
|
});
|
|
9963
9969
|
}
|
|
@@ -14288,6 +14294,7 @@ class MultistreamConnection extends EventEmitter$2 {
|
|
|
14288
14294
|
const parsedOffer = parse((_a = this.pc.getLocalDescription()) === null || _a === void 0 ? void 0 : _a.sdp);
|
|
14289
14295
|
const recvTransceiversByMid = new Map([...this.recvTransceivers.values()].flat().map((t) => [t.mid, t]));
|
|
14290
14296
|
matchMlinesInAnswer(parsedOffer, parsedAnswer, recvTransceiversByMid);
|
|
14297
|
+
filterCandidates(parsedAnswer);
|
|
14291
14298
|
if (getBrowserDetails().name === 'Firefox') {
|
|
14292
14299
|
setupBundle(parsedAnswer, this.options.bundlePolicy, this.midPredictor.getMidMap());
|
|
14293
14300
|
if (this.options.bundlePolicy === 'max-bundle') {
|