Skip to content

Conversation

@Bnyro
Copy link
Member

@Bnyro Bnyro commented Jul 17, 2025

Motivation:

  • We previously duplicated the code to embed the views that are required by the player (e.g. the +10 seek indicator, autoplay countdown, ...) by pasting them everywhere a PlayerView instead is defined in XML
  • This way is much cleaner and removes the duplicated code
  • The changes also allow us to have more control over the ExoPlayer views inbuild components and use view bindings on it, which hasn't been possible before this PR.

Caveats:

  • However, we unfortunately need to create a wrapper custom_exo_player_view around the real views, because PlayerView replaces @id/exo_controller_placeholder with the actual controller view in its constructor, so there's no way that we can prevent that behavior. That causes custom_exo_player_view not to be inflatable, because the view with id @id/exo_controller_placeholder doesn't exist anymore.
  • We have to set the dimmed player controls background manually, because it would otherwise overlap the stuff behind it (i.e. the skip buttons)

@Bnyro Bnyro requested a review from FineFindus July 17, 2025 15:44
@FineFindus FineFindus merged commit 915bb19 into libre-tube:master Jul 19, 2025
4 checks passed
@Bnyro Bnyro deleted the custom-player-binding branch July 19, 2025 14:55
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