Skip to content

feat: improve inline video player UX#211

Merged
barrydeen merged 1 commit intomainfrom
feat/video-player-improvements
Mar 11, 2026
Merged

feat: improve inline video player UX#211
barrydeen merged 1 commit intomainfrom
feat/video-player-improvements

Conversation

@barrydeen
Copy link
Copy Markdown
Owner

Summary

  • Dynamic aspect ratio — detects actual video dimensions instead of hardcoded 16:9, with 500dp max height cap for portrait videos
  • Autoplay/autopause — videos auto-play when >50% visible and pause when scrolled out of view
  • Controls on tap — native ExoPlayer scrubber and play/pause hidden by default, revealed on tap with 2s auto-hide. Mute and fullscreen buttons overlay in sync
  • Global mute — videos start muted; toggling unmute on any video unmutes all videos for the session
  • User pause respected — tapping pause won't be overridden by visibility autoplay; resets when scrolled away and back
  • RESIZE_MODE_ZOOM — eliminates black bars around videos by filling the container

Test plan

  • Verify landscape videos render full-width without black bars
  • Verify portrait/vertical videos render at correct proportions (not squished), capped at reasonable height
  • Scroll videos in and out of view — confirm autoplay/autopause
  • Tap pause, confirm video stays paused while in viewport
  • Scroll paused video out and back — confirm it resumes
  • Tap video to show controls, confirm scrubber/play-pause/timeline appear and auto-hide after ~2s
  • Tap mute button on one video, scroll to another — confirm it's also unmuted
  • Restart app — confirm videos default to muted again
  • Tap fullscreen — confirm it opens full screen player at correct position

- Dynamic aspect ratio: detect actual video dimensions via onVideoSizeChanged
  instead of hardcoded 16:9, with 500dp max height for portrait videos
- Autoplay/autopause: videos play when >50% visible and pause when scrolled away
- Controls on tap: native ExoPlayer scrubber/play-pause hidden by default,
  shown on tap with 2s auto-hide timeout
- Mute button: added alongside fullscreen, muted by default
- Global mute state: toggling mute on any video applies to all videos for the
  session via shared MutableStateFlow
- User pause respected: manual pause is not overridden by visibility autoplay,
  resets when scrolled out of view
- RESIZE_MODE_ZOOM on PlayerView to eliminate black bars

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@barrydeen barrydeen merged commit 171cc29 into main Mar 11, 2026
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.

1 participant