@webex/web-client-media-engine 3.29.3 → 3.29.4
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 +4 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +4 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -7599,7 +7599,10 @@ function getFrameHeightByMaxFs(sourceAspectRatio, requestedMaxFs) {
|
|
|
7599
7599
|
const _gcd = gcd(sourceAspectRatio[0], sourceAspectRatio[1]);
|
|
7600
7600
|
const minNumberRatiosForWidth = sourceAspectRatio[0] / _gcd;
|
|
7601
7601
|
const minNumberRatiosForHeight = sourceAspectRatio[1] / _gcd;
|
|
7602
|
-
|
|
7602
|
+
const macroBlockSize = 16 * 16;
|
|
7603
|
+
const minRatioNumberByMaxFs = Math.sqrt((requestedMaxFs * macroBlockSize) / (minNumberRatiosForWidth * minNumberRatiosForHeight));
|
|
7604
|
+
const roundedMinRatioNumberByMaxFs = Math.max(Math.floor(minRatioNumberByMaxFs), 1.0);
|
|
7605
|
+
return roundedMinRatioNumberByMaxFs * minNumberRatiosForHeight;
|
|
7603
7606
|
}
|
|
7604
7607
|
function getScaleDownRatio(sourceWidth, sourceHeight, maxFs, maxWidth, maxHeight) {
|
|
7605
7608
|
if (!sourceWidth || !sourceHeight || !maxFs) {
|