Skip to content

feat(home): add customizable background trailer playback - #668

Open
procopio1000 wants to merge 2 commits into
ProdigyV21:mainfrom
procopio1000:feature/663-background-trailers
Open

feat(home): add customizable background trailer playback#668
procopio1000 wants to merge 2 commits into
ProdigyV21:mainfrom
procopio1000:feature/663-background-trailers

Conversation

@procopio1000

Copy link
Copy Markdown

Summary

Implements customizable automatic trailer playback on the Home screen, addressing #663.

Changes

  • Adds background trailer playback on the Home screen without opening the full-screen player.
  • Respects the existing trailerAutoPlay setting.
  • Respects the existing trailerDelaySeconds configuration.
  • Respects the existing trailerInCards mode.
  • Preserves in-card trailer playback when that mode is enabled.
  • Adds Hero/Backdrop trailer playback when trailerInCards is disabled.
  • Stops the current trailer immediately when focus changes.
  • Cancels stale asynchronous trailer operations to prevent delayed playback from previously focused items.
  • Keeps D-pad navigation available while trailers are playing.
  • Reuses a shared trailer player and releases resources when entering the main player.
  • Preserves the existing Home catalog layout.

Validation

  • compileSideloadDebugKotlin
  • testSideloadDebugUnitTest
  • assembleSideloadDebug
  • Tested on a physical Android TV via ADB ✅
  • Verified trailer activation, delay, focus changes and playback behavior ✅

Closes #663

@github-actions github-actions Bot added the area: android Changes to the Android app or Gradle build label Sep 7, 2026
@ProdigyV21

Copy link
Copy Markdown
Owner

got screenshots/screenrecordings of how this looks?

@procopio1000

procopio1000 commented Sep 7, 2026

Copy link
Copy Markdown
Author

got screenshots/screenrecordings of how this looks?

Sure! I’ll record some screenshots/screen recordings right now and add them to the PR.

@procopio1000

Copy link
Copy Markdown
Author

got screenshots/screenrecordings of how this looks?

Uploading 20260907-114051_IzjgOqBX.mp4…

@procopio1000

Copy link
Copy Markdown
Author

got screenshots/screenrecordings of how this looks?

IMG_20260907_124736_296 IMG_20260907_124736_286 IMG_20260907_124736_110

@procopio1000

Copy link
Copy Markdown
Author

got screenshots/screenrecordings of how this looks?

20260907-114051_IzjgOqBX.mp4

@ProdigyV21

Copy link
Copy Markdown
Owner

Thanks for the contribution and the recordings! Optional trailer previews could be a nice addition, but this needs a few changes before merging.

Please keep Home's existing appearance unchanged. I don't want the smaller top-right backdrop or the new hero layout. Keep the current backdrop size, positioning, image alignment, padding/spacing and gradients, including the logo/description placement. Trailers should fit the existing layout, and with autoplay off Home should look exactly as it does on main.

The remaining issues are:

  1. YouTube extraction is restored. Current main deliberately removed direct YouTube extraction from both Android distributions. This PR brings back YouTubeExtractor, direct stream playback and separate audio/video handling, and the existing copyright-safeguard test fails. Please keep those safeguards and use an official YouTube playback approach that meets its requirements, or trailer files we have permission to play directly.
  2. The trailer controls are still hidden. The visible TV settings row map excludes autoplay, sound, delay and in-card mode. Fresh installs default to autoplay off with no way to enable it, while existing users cannot change their saved preferences. The controls need to be wired up for the agreed playback approach.
  3. The shared player cannot recover after activity destruction. MainActivity.onDestroy() permanently releases the application-wide TrailerPlayerPool. Exiting and reopening while the process remains alive then reuses a disabled pool. Make its lifecycle restartable or scope it appropriately.
  4. In-card artwork does not return when playback ends. FeaturedMediaCard hides the artwork after the first frame but never restores it when the trailer finishes or fails. Handle onPlayingChanged(false) so the card returns to its normal artwork instead of remaining black.

After updating, please rerun the build/tests and check TV navigation, exit/reopen, and trailer completion/error behavior. I'd like to keep the preview idea, without redesigning Home or undoing the recent compliance changes.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Add customizable background trailer playback on Home screen

2 participants