Skip to content

fix(android): getSupportedResolutions('video') returns what the Recorder can record - #4204

Open
lagudafuadtosin wants to merge 1 commit into
margelo:mainfrom
lagudafuadtosin:fix/android-video-resolutions-recorder
Open

lagudafuadtosin wants to merge 1 commit into
margelo:mainfrom
lagudafuadtosin:fix/android-video-resolutions-recorder

Conversation

@lagudafuadtosin

@lagudafuadtosin lagudafuadtosin commented Oct 2, 2026 •

Copy link
Copy Markdown

Closes #4205

getSupportedResolutions('video') on Android returned every size in the Camera2 stream configuration map. Video records through CameraX Recorder, which only produces Quality tiers (UHD, FHD, HD, SD), so the list held sizes a VideoOutput can never deliver.

On a Galaxy A14 (SM-A145F, Android 15) the list included 2576x1932 and 176x144. Asking for them records 1920x1080 and 720x480, and both resolution harness tests fail: expected 1080 to be 1932, expected 480 to be 144. The doc says the list is what the device "can produce", and iOS already returns recordable sizes.

Fix: build the list from Recorder.getVideoCapabilities(cameraInfo), the supported qualities per dynamic range mapped through getResolution(). getVideoSizes.kt had no other users and is removed. Photo, stream and depth lists are unchanged.

Proof on the A14: both tests fail before, pass after. Full video suite: 16 passed, 0 failed, 2 skipped.

…der can record

The video list was every size in the Camera2 stream configuration map for the
video image formats. The VideoOutput records through CameraX Recorder, which
only produces Quality tiers, and toQualitySelector() snaps any other size to
the nearest tier. On a Galaxy A14 the list included 2576x1932 and 176x144,
which record at 1920x1080 and 720x480, so both resolution harness tests failed.

Build the list from Recorder.getVideoCapabilities(cameraInfo): the supported
qualities per dynamic range mapped through getResolution(). getVideoSizes.kt
had no other users and is removed. Photo, stream and depth lists are unchanged.
@vercel

vercel Bot commented Oct 2, 2026

Copy link
Copy Markdown

@lagudafuadtosin is attempting to deploy a commit to the Margelo Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 Android: getSupportedResolutions('video') advertises stream sizes the Recorder cannot record (2576x1932 -> 1920x1080)

1 participant