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
[Redesign][Feature Request] In player screen, show remaining song time instead of duration #664
Comments
Hey! Yeah that sounds absolutely doable, and very straight-forward to implement! Just subtract the current position from the total duration at the right spot in the control area, and add the setting. Let me know if you want to handle it yourself, otherwise I can do it to! Do you think the "time remaining" behavior should be the default on iOS, or should the default stay the same? Do other music apps like Spotify or Youtube Music also show the remaining time on iOS, or just the default music app? |
Hi! A problem I found by simply subtracting the current position from the total duration is that the two times will not update in sync. This behavior is the same as Spotify, you can see it in the following video. spotify.mp4Apple Music (and the Music app in general) updates the times in sync, as can be seen in this video. apple_music.mp4For the two videos the same song has been used. Note that the "Apple Music behavior" is also the same with Finamp on the dynamic island and the lock screen. I, personally, prefer the way Apple Music does it. One way I found to implement this is to round down the duration of the song. For example if the song has a duration of 230217139 microseconds by rounding it to 230000000 and then just doing the subtraction as you suggested the two times are updated in sync. This rounding would be performed just for the display of the times. Another way I think we could solve this is keeping a state with the time passed and the time remaining. Each time, before rendering the two values, we check if the new time passed and the new time remaining both differ from their previous values. If they do we render the new values, if they don't we render the old values. This would basically skip the frames were the two values would not update in sync. I haven't tried this solution yet. What do you think would be the best solution? |
Interesting that the behavior really is different between the platforms. You can test out Youtube Music's behavior without a subscription, it just won't allow background playback and will have ads afaik. But yes, setting the default value of the setting to Oh and don't forget to add the minus/hypthen as a prefix in that case, like the other apps do! |
The default behavior on YouTube Music is to show the total duration and it does not seem to have an option to change it to the remaining time. |
Okay, yeah that doesn't really surprise me. We can proceed as planned though 👌🏻 |
Hello! Coming from the Music app on iOS, in the player screen, I'm used to see the remaining time of the song currently being played instead of the duration.
What I would like to propose is to add a toggle in the settings that would allow to choose between the current behavior (show the total duration) or show the remaining time.
If this is something that you think could be worth to add, I could start working on it.
The text was updated successfully, but these errors were encountered: