@webex/web-client-media-engine 3.0.0 → 3.0.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 +19 -19
- package/dist/esm/index.js +19 -19
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -9938,26 +9938,26 @@ class SendOnlyTransceiver extends Transceiver {
|
|
|
9938
9938
|
}
|
|
9939
9939
|
updateSendParameters(requestedIdEncodingParamsMap) {
|
|
9940
9940
|
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
|
-
|
|
9941
|
+
if (this.publishedStream) {
|
|
9942
|
+
this.setStreamRequested(requestedIdEncodingParamsMap.size > 0);
|
|
9943
|
+
const sendParameters = this.sender.getParameters();
|
|
9944
|
+
sendParameters.encodings.forEach((encoding, index) => {
|
|
9945
|
+
var _a, _b;
|
|
9946
|
+
const encodingParams = requestedIdEncodingParamsMap.get(index);
|
|
9947
|
+
encoding.active = !!encodingParams;
|
|
9948
|
+
if (encodingParams) {
|
|
9949
|
+
const { maxPayloadBitsPerSecond, maxFs, maxWidth, maxHeight } = encodingParams;
|
|
9950
|
+
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);
|
|
9951
|
+
if (maxPayloadBitsPerSecond !== undefined && maxPayloadBitsPerSecond >= 0) {
|
|
9952
|
+
encoding.maxBitrate = maxPayloadBitsPerSecond;
|
|
9953
|
+
}
|
|
9954
|
+
if (scaleDownRatio !== undefined && scaleDownRatio >= 1.0) {
|
|
9955
|
+
encoding.scaleResolutionDownBy = scaleDownRatio;
|
|
9956
|
+
}
|
|
9957
9957
|
}
|
|
9958
|
-
}
|
|
9959
|
-
|
|
9960
|
-
|
|
9958
|
+
});
|
|
9959
|
+
yield this.sender.setParameters(sendParameters);
|
|
9960
|
+
}
|
|
9961
9961
|
this.requestedIdEncodingParamsMap = requestedIdEncodingParamsMap;
|
|
9962
9962
|
});
|
|
9963
9963
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -9934,26 +9934,26 @@ class SendOnlyTransceiver extends Transceiver {
|
|
|
9934
9934
|
}
|
|
9935
9935
|
updateSendParameters(requestedIdEncodingParamsMap) {
|
|
9936
9936
|
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
|
-
|
|
9937
|
+
if (this.publishedStream) {
|
|
9938
|
+
this.setStreamRequested(requestedIdEncodingParamsMap.size > 0);
|
|
9939
|
+
const sendParameters = this.sender.getParameters();
|
|
9940
|
+
sendParameters.encodings.forEach((encoding, index) => {
|
|
9941
|
+
var _a, _b;
|
|
9942
|
+
const encodingParams = requestedIdEncodingParamsMap.get(index);
|
|
9943
|
+
encoding.active = !!encodingParams;
|
|
9944
|
+
if (encodingParams) {
|
|
9945
|
+
const { maxPayloadBitsPerSecond, maxFs, maxWidth, maxHeight } = encodingParams;
|
|
9946
|
+
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);
|
|
9947
|
+
if (maxPayloadBitsPerSecond !== undefined && maxPayloadBitsPerSecond >= 0) {
|
|
9948
|
+
encoding.maxBitrate = maxPayloadBitsPerSecond;
|
|
9949
|
+
}
|
|
9950
|
+
if (scaleDownRatio !== undefined && scaleDownRatio >= 1.0) {
|
|
9951
|
+
encoding.scaleResolutionDownBy = scaleDownRatio;
|
|
9952
|
+
}
|
|
9953
9953
|
}
|
|
9954
|
-
}
|
|
9955
|
-
|
|
9956
|
-
|
|
9954
|
+
});
|
|
9955
|
+
yield this.sender.setParameters(sendParameters);
|
|
9956
|
+
}
|
|
9957
9957
|
this.requestedIdEncodingParamsMap = requestedIdEncodingParamsMap;
|
|
9958
9958
|
});
|
|
9959
9959
|
}
|
package/package.json
CHANGED