Open voodoos opened 3 weeks ago
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 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 ./gradlew ktlintFormat
to check and lint your code
I like the changes to open up the controls without pausing the playback.
But I am not sure if coupling isPlaying
to the user interaction is a good idea. What if the playback get's pause by the mediasession from for example a phone or something?
But I am not sure if coupling
isPlaying
to the user interaction is a good idea. What if the playback get's pause by the mediasession from for example a phone or something?
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 dc1aac3d6733b01b9407cc63a470fedd43b2a3dc 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 a8461c1914b383669f9124cf5dab2a99a42cbfc5 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: