-
-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TV playback controls: add fast seeking and enable track selection without pausing #870
base: main
Are you sure you want to change the base?
Conversation
Some player action like seeking does not require pausing from the User point of view but will trigger a short pause of the player while buffering.
This allows switching audio/subtitles tracks while keeping the video playing.
This is not optimal behavior. Further improvements to the seekbar are needed.
I see that linting fails due to some style issues (and missing imports). Is there anyway for me to configure my Android Studio to enforce these styles ? |
I don't know of a way to show the linting errors in Android Studio. However you can run |
I like the changes to open up the controls without pausing the playback. |
I think you're right, it's not completely satisfying right now, and I noticed some strange behavior sometimes when sending some inputs right after starting the videos that might be linked to that. I will try to rework it in the following weeks. I do think we need to have some kind of fast seeking that doesn't have to show the controls however, not sure how that can be achieved... |
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