Skip to content

feat(mobile-player): comprehensive mobile player interface overhaul & modular architecture - #610

Open
Himanth-reddy wants to merge 13 commits into
ProdigyV21:mainfrom
Himanth-reddy:feature/modular-player-architecture
Open

feat(mobile-player): comprehensive mobile player interface overhaul & modular architecture#610
Himanth-reddy wants to merge 13 commits into
ProdigyV21:mainfrom
Himanth-reddy:feature/modular-player-architecture

Conversation

@Himanth-reddy

@Himanth-reddy Himanth-reddy commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR delivers a comprehensive overhaul of the mobile video player interface, introducing modular architecture refactoring, refined multi-tap and swipe gesture engines, enhanced subtitle and audio drawers, dynamic edge-to-edge system bar integration, instantaneous orientation exit handling, and expanded aspect ratio controls.


What Has Been Done (Commit Breakdown)

1. Modular Player Architecture Refactor (32573186)

  • Before: The player was contained in a monolithic 6,000+ line screen where mobile touch logic, Android TV D-pad navigation, ExoPlayer engine specifics, and subtitle processing were tightly coupled.
  • After: Modularized into specialized subsystems:
    • player/mobile/: Dedicated mobile touch UI, design tokens (MobilePlayerTokens), bottom sheets, contextual prompts, and gesture surfaces.
    • player/tv/: Dedicated 10-foot Android TV D-pad interface.
    • player/engine/: Engine-agnostic abstraction layer (PlayerEngine, PlayerEngineModels, PlayerEngineFactory) supporting multiple playback backends.
    • player/subtitles/: Encapsulated subtitle and AI synchronization services.
    • player/common/: Shared playback gates and system bar effect coordinators.

2. PlayerEngine Wiring & Settings Persistence (b7c9b69b)

  • Before: Playback options (auto-skip intervals, audio normalization, delay offsets) were not unified and did not persist across sessions.
  • After: Wired PlayerEngine as the single coordinator for playback actions; persisted preferences in DataStore; implemented real-time intro/outro skip intervals, audio normalization via LoudnessEnhancer, and delay sync.

3. Multi-Tap Gestures Engine (d79e4d0d)

  • Before: Touch interaction was limited to single-tap toggles.
  • After: Implemented a comprehensive multi-tap gesture detection state machine:
    • Single tap: Toggle playback controls / dismiss open panels.
    • Double tap (Left / Right halves): Fast rewind / forward 10 seconds with animated ripple overlays.
    • Triple tap: Seamlessly cycle aspect ratio modes on the fly.

4. 2-Stage Drilldown Subtitle Picker & Language Standardization (6a1ef148, e140d6ac)

  • Before: Subtitles were shown in a flat, unorganized list with abbreviated ISO codes (e.g., eng, spa, por) and harsh bordered cards.
  • After: Redesigned subtitle sheet into a 2-stage drilldown:
    • Stage 1 (Language Groups): Standardized full language names (English, Spanish, etc.) with track count badges, active indicators, and quick Off toggle.
    • Stage 2 (Track Details): Granular track selection displaying metadata badges (Embedded, Provider, SDH, Forced).
    • Modern borderless card styling with soft focus highlights.

5. Monotonic Vertical Swipe Gestures (d8f9a912)

  • Before: Vertical volume and brightness gestures lacked an activation baseline, causing sign-reversal bugs (where an upward swipe could decrease volume on slight diagonals) and abrupt value jumps upon activation.
  • After: Implemented an activation baseline model (effectiveDeltaY = totalDeltaY - activationDeltaY). Swipes are strictly monotonic, continuous at activation (zero jump), and strict axis dominance filtering prevents accidental adjustments during horizontal seeking or diagonal swipes.

6. Edge-to-Edge System Bars & Dynamic Insetting (d8f9a912)

  • Before: System bars were static or did not synchronize with controls visibility, risking UI collisions or viewport resizing.
  • After: Transient system bars (BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE) dynamically follow player controls visibility—revealing real status icons and navigation buttons when controls appear and hiding them cleanly when controls fade out. Interactive overlays combine live WindowInsets.systemBars and WindowInsets.displayCutout for safe clearance without video shifts.

7. Instantaneous & Smooth Exit Flow (d8f9a912)

  • Before: Orientation restoration was deferred until screen disposal, causing the previous screen to render in landscape and freeze for ~0.5s before rotating to portrait.
  • After: Remembers the exact device orientation from before entering playback and synchronously restores it the instant exit navigation is dispatched. Back navigation cleanly closes drawer panels and lock state first before exiting.

8. Aspect Ratio Modes & Startup Indicator Fix (1a42f84f)

  • Before: Limited aspect ratio options, and the indicator HUD erroneously flashed on screen every time the player initialized.
  • After: Added four standard aspect ratio modes: Auto (default), Fit to Screen, Stretch, and Crop. Fixed initial composition so the HUD indicator is suppressed on player startup and only appears on explicit user action.

@github-actions github-actions Bot added the area: android Changes to the Android app or Gradle build label Aug 26, 2026
@Himanth-reddy Himanth-reddy changed the title feat(player): modular player architecture, MX Player gestures, system bars sync, and aspect ratio modes feat(player): modular player architecture, swipe gestures, system bars sync, and aspect ratio modes Aug 26, 2026
@Himanth-reddy Himanth-reddy changed the title feat(player): modular player architecture, swipe gestures, system bars sync, and aspect ratio modes feat(mobile-player): comprehensive mobile player interface overhaul & modular architecture Aug 26, 2026
@Himanth-reddy
Himanth-reddy force-pushed the feature/modular-player-architecture branch 4 times, most recently from 4622085 to 49ba401 Compare August 26, 2026 09:44
- Extract dedicated Mobile UI into player/mobile/ with touch controls, bottom sheets, and contextual prompt cards
- Extract dedicated Android TV UI into player/tv/ with D-pad navigation, 10-foot chrome, and TV overlays
- Introduce multi-engine playback abstraction layer in player/engine/ with PlayerEngine, PlayerEngineModels, and PlayerEngineFactory (ExoPlayer / MPV / VLC)
- Encapsulate AI & Subtitle translation/synchronization services into player/subtitles/
- Move shared playback gatekeeper logic into player/common/
- Clean up PlayerScreen into a lean root coordinator
… mobile player

- Single tap: show/hide playback controls
- Double tap (left/right): seek backward/forward 10s with visual indicator overlay
- Double tap (center): toggle play/pause
- Triple tap: cycle aspect ratio (Fit / Fill / Zoom)
- Revert debug applicationIdSuffix change in build.gradle.kts
- Wire PlayerEngine as the core controller in PlayerScreen for play/pause, seek, speed, and track actions
- Persist and load auto_skip_intro, auto_skip_outro, audio_delay_ms, audio_normalization, and subtitle preferences in DataStore
- Add real-time auto-skip interval enforcement for intro/outro
- Connect audioDelayMs to subtitle sync processor and audioNormalization to LoudnessEnhancer
- Stage 1: clean list of language groups with track count badges, active indicators, and Off toggle
- Stage 2: detailed subtitle tracks for chosen language with Embedded, Provider, SDH, and Forced badges
- Full back-navigation and gesture support
…ction UI

- Normalize all language codes to full names with Java Locale fallback across Mobile & TV
- Reposition track count number to the right, adjacent to the chevron arrow without background badge
- Remove hard borders from selected cards, using smooth borderless highlight background
…e gestures on error, and retain active stream
@Himanth-reddy
Himanth-reddy force-pushed the feature/modular-player-architecture branch from 49ba401 to 254708e Compare August 26, 2026 10:07
@Himanth-reddy
Himanth-reddy force-pushed the feature/modular-player-architecture branch from 33af87d to dcf1cf1 Compare August 26, 2026 11:55
@Himanth-reddy
Himanth-reddy force-pushed the feature/modular-player-architecture branch from dcf1cf1 to 39dd0e5 Compare August 26, 2026 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: android Changes to the Android app or Gradle build Work in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant