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
Feat: SeekBar in listenPlayer #133
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the work! 💯
A few changes, then we should be good to go.
app/src/main/java/org/listenbrainz/android/ui/screens/listens/NowPlaying.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/listenbrainz/android/ui/screens/listens/NowPlaying.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/listenbrainz/android/ui/screens/listens/NowPlaying.kt
Outdated
Show resolved
Hide resolved
all requested changes are done bhaiya, sorry for the delay, was a bit busy with college fest this week. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the feature @rishuriya but it lags a lot for me. Can you please look into the lag?
bitmap = bitmapHere | ||
bitmap =ListenBitmap( | ||
bitmap=bitmapHere, | ||
id = playerState.track.uri |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should have just made a separate variable here. Why store it with the bitmap like this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, bitmap is updated from event callback, which is called every second to get song position and to avoid updating of bitmap again and again, the function will only run when uri which it store is different from the current song.
I also faced the lag before, so I checked the CPU usage which was 20%, but I bring it down to 3 to 5%. after that I didn't face the lag, but if you encounter can you tell me if you faced it after hearing several songs or from the beginning, I am also working to create the timer inside the function so that it should not call Spotify to check the position of the song. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @rishuriya for this amazing functionality! 💯
We should be moving this to the BrainzPlayer however in future.
This PR includes the feature to show the progress of online playing songs in the card, also the ability to control music like seek, play, and pause from LB-android.
@akshaaatt bhaiya, can you review this and suggest any change if required.