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