Update FORMATS.mdx

This commit is contained in:
Marc Rousavy 2021-09-09 22:01:23 +02:00 committed by GitHub
parent f9dbb6921c
commit 0bbda5b84b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -111,10 +111,9 @@ export const sortFormatsByResolution = (left: CameraDeviceFormat, right: CameraD
let leftPoints = left.photoHeight * left.photoWidth; let leftPoints = left.photoHeight * left.photoWidth;
let rightPoints = right.photoHeight * right.photoWidth; let rightPoints = right.photoHeight * right.photoWidth;
if (left.videoHeight != null && left.videoWidth != null && right.videoHeight != null && right.videoWidth != null) { // we also care about video dimensions, not only photo.
leftPoints += left.videoWidth * left.videoHeight; leftPoints += left.videoWidth * left.videoHeight;
rightPoints += right.videoWidth * right.videoHeight; rightPoints += right.videoWidth * right.videoHeight;
}
// you can also add points for FPS, etc // you can also add points for FPS, etc