Skip to content

refactor(player): modularise the video player and make it adaptive - #1046

Merged
A-EDev merged 94 commits into
mainfrom
refactor/video-player-panes
Sep 11, 2026
Merged

A-EDev merged 94 commits into
mainfrom
refactor/video-player-panes

Conversation

@A-EDev

@A-EDev A-EDev commented Sep 11, 2026

Copy link
Copy Markdown
Owner

Summary

Modularises the video player and makes it adaptive. The 3,689-line view model becomes a 594-line orchestrator over pure reducers and single-purpose collaborators, the player's sheets, controls, overlays and gestures move into ui/components/videoplayer/ and ui/components/shared/ with one bottom-sheet scaffold and one sealed open-sheet state, and layout decisions come from the platform WindowSizeClass: adaptive feed grids, a WideNavigationRail on expanded windows, and a SupportingPaneScaffold player detail that also hosts the description, chapters, settings pages and sleep timer beside the video.

Related issue

None. The supporting-pane behaviour follows the earlier side-column work from #918.

Change type

  • Bug fix
  • Feature
  • Refactor or maintenance
  • Build, packaging, or CI
  • Documentation

Validation

  • ./gradlew :app:assembleGithubDebug
  • ./gradlew :app:testGithubDebugUnitTest — 1,626 run, 2 skipped, 0 failures (Compose UI tests now run in the JVM through Robolectric)
  • I ran any additional flavor-specific build or test tasks affected by this change. — :app:compileFossDebugKotlin
  • I manually tested the affected behavior on an Android device or emulator.

Test device and Android version: POCO (1220×2712, HyperOS) for the sheet, controls and frame passes; Android Studio resizable emulator (API 36, tablet mode) for the 840×1200 and 1280×800 dp windows, the pane takeovers and the fullscreen drawer.

Risk and compatibility

  • No database or preference migrations. No new permissions.

  • New dependencies, all BOM-pinned: androidx.window:window / window-core 1.5.0 (already in the APK transitively, now declared), androidx.compose.material3.adaptive:adaptive-layout / adaptive-navigation 1.3.0, Robolectric 4.16.1 for tests.

  • Playback path (player managers, media session, services) is untouched; the view model split keeps every player call on one preparer. Comments load once the sheet has settled; position and premiere polls are lifecycle-gated; the live-chat loop runs only while a panel shows it.

  • Behaviour changes: two-pane player at ≥ 840 dp width with a 480 dp height guard (a 600–839 dp tablet in landscape now gets one column with a two-column related grid); subtitle style is a page of the settings sheet; feed columns come from GridCells.Adaptive.

  • The change does not introduce secrets, private data, or unexpected telemetry.

  • New user-facing text uses Android string resources.

  • Dependency and lockfile changes are intentional and limited to this PR.

  • Room schema changes include the required version bump and migration, or this PR does not change the Room schema.

  • Breaking changes and upgrade steps are clearly documented.

…formatters, download stream policy and geometry
…he into the video view model through transitional providers
…ls overlay, download dialogs and layout modes with Compose tests
… sheets, dialogs and host into their feature packages
…solver so it stops colliding with the media source resolver
…d live watch fetches onto PlayerSecondaryMetadataLoader
…shared VideoEngagementUseCase and adopt it in shorts and quick actions
…t keeps one request per video in flight and adopt it in shorts
…egate the recovery, settings and presence surfaces off the view model
…dow size class and delete the four breakpoint tables and the form-factor helpers
…nded-width windows with medium height and reserve its width for the content and the mini player
…de mode from the window size class with the 840 dp width and 480 dp height rule and keep the mini player clear of the rail
…n through the compose BOM for the player detail panes
…caffold and size the expanded video from the same pane directive
…p timer in the supporting pane and the fullscreen drawer, and fold the subtitle style sheet into the settings sheet
Copilot AI lite review requested due to automatic review settings September 11, 2026 11:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions github-actions Bot added player Video and audio playback ui Compose UI, theming, or Material 3 surfaces extraction InnerTube / NewPipe extraction and networking build Gradle, dependencies, packaging, or R8 labels Sep 11, 2026
@A-EDev
A-EDev merged commit 1f88972 into main Sep 11, 2026
5 checks passed
@A-EDev A-EDev added the merged Pull request verified, tested and merged label Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Gradle, dependencies, packaging, or R8 extraction InnerTube / NewPipe extraction and networking merged Pull request verified, tested and merged player Video and audio playback ui Compose UI, theming, or Material 3 surfaces

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants