Skip to content

fix(android): letterbox portrait video correctly in the player view - #64

Open
TenGosc007 wants to merge 2 commits into
fix/ios-video-uploadfrom
fix/android-vertical-player
Open

TenGosc007 wants to merge 2 commits into
fix/ios-video-uploadfrom
fix/android-vertical-player

Conversation

@TenGosc007

Copy link
Copy Markdown
Collaborator

Summary

Portrait video was stretched to the full player width on Android.
Media3's AspectRatioFrameLayout letterboxes the surface via
requestLayout(), which the RN view hierarchy swallows — the surface
view was never re-measured. The wrapper now forces the measure/layout
pass on onVideoSizeChanged, so the SDK's resize_mode="fit" applies
(video pillarboxed, controls full-width). Also fixes the example app's
speed buttons collapsing under custom controls.

Type of Change

  • Bug fix

Affected Areas

  • Player (VOD)
  • Example app

Testing

  • yarn typecheck
  • yarn lint
  • Android example builds (yarn android in example/)
  • Manual playback/upload/broadcast test — portrait 720x1280 video on
    Android emulator renders pillarboxed; native + custom controls OK

Library User Impact

Bug fix only — portrait VOD now letterboxes like iOS; no API changes.

AI Assistance

  • AI helped with this PR; I reviewed and understand the final changes.

Checklist

  • The PR is focused on one clear change.
  • Tests or manual verification are included where appropriate.
  • No secrets, access keys, private URLs, certificates, or provisioning profiles are included.

TenGosc007 and others added 2 commits October 10, 2026 22:03
…rectly

Media3's AspectRatioFrameLayout letterboxes the video surface in response
to onVideoSizeChanged via requestLayout, which is swallowed by the RN view
hierarchy — the inner surface view is never re-measured and keeps its
initial full-box bounds, stretching portrait video to full width. Force
the measure/layout pass manually so the SDK's resize_mode="fit" applies
(video and controls keep proper bounds inside the full-size player view).

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
controlsSection centers children, shrinking the speed rows to content
width and collapsing the flex buttons into thin strips.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@TenGosc007 TenGosc007 self-assigned this Oct 10, 2026
@TenGosc007
TenGosc007 added this pull request to stack #44 October 10, 2026 20:41

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.

2 participants