Skip to content
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

Merged
merged 9 commits into from Jun 2, 2023
Merged

Conversation

rishuriya
Copy link
Contributor

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.

Copy link
Member

@akshaaatt akshaaatt left a 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.

@rishuriya
Copy link
Contributor Author

all requested changes are done bhaiya, sorry for the delay, was a bit busy with college fest this week.

Copy link
Member

@akshaaatt akshaaatt left a 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
Copy link
Member

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?

Copy link
Contributor Author

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.

@rishuriya
Copy link
Contributor Author

I like the feature @rishuriya but it lags a lot for me. Can you please look into the lag?

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.

Copy link
Member

@akshaaatt akshaaatt left a 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.

@akshaaatt akshaaatt merged commit 0f9168d into metabrainz:main Jun 2, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants