@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 CHANGED
@@ -7603,7 +7603,10 @@ function getFrameHeightByMaxFs(sourceAspectRatio, requestedMaxFs) {
7603
7603
  const _gcd = gcd(sourceAspectRatio[0], sourceAspectRatio[1]);
7604
7604
  const minNumberRatiosForWidth = sourceAspectRatio[0] / _gcd;
7605
7605
  const minNumberRatiosForHeight = sourceAspectRatio[1] / _gcd;
7606
- return (Math.floor(Math.sqrt((requestedMaxFs * 16 * 16) / (minNumberRatiosForWidth * minNumberRatiosForHeight))) * minNumberRatiosForHeight);
7606
+ const macroBlockSize = 16 * 16;
7607
+ const minRatioNumberByMaxFs = Math.sqrt((requestedMaxFs * macroBlockSize) / (minNumberRatiosForWidth * minNumberRatiosForHeight));
7608
+ const roundedMinRatioNumberByMaxFs = Math.max(Math.floor(minRatioNumberByMaxFs), 1.0);
7609
+ return roundedMinRatioNumberByMaxFs * minNumberRatiosForHeight;
7607
7610
  }
7608
7611
  function getScaleDownRatio(sourceWidth, sourceHeight, maxFs, maxWidth, maxHeight) {
7609
7612
  if (!sourceWidth || !sourceHeight || !maxFs) {