TV playback controls: add fast seeking and enable track selection without pausing #870
+58
−39
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @jarnedemeulemeester thanks a lot for your work ! I am using the Android TV version of Findroid because the playback is much more robust than the official one. But I found the controls to be a bit finicky... here is a proposition to improve them a bit, adding fast seeking and track switching without pause. I hope this is of interest to you ! It is my first time using Compose so I would be happy to receive feedback and improve my code.
This PR proposes an addition to the current playback controls to allow seeking and changing tracks without pausing the playback.
The current controls are especially tedious to use for seeking:
This PR adds two new behaviors:
However, I had to inhibit several current behaviors to achieve that:
paused
while buffering. But this is not a pause to which the UI should react. In commit dc1aac3 I make UI pause-state independent from the player's own state so that we can have finer behaviors.Box
containing the video surface has custom bindings for the D-pad keys: on Enter it pauses playback and shows the controls. These actions were still performed while the controls were shown (without a negative impact). In commit a8461c1 I restrict these actions to trigger only if the player box is in focus. This prevent fast-seek on Right and Left to trigger while navigating in the controls.Here is a screencast showing seeking and switching subtitles without pausing:
Screencast_20241027_125214.webm.mov