-
-
Notifications
You must be signed in to change notification settings - Fork 226
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
LB-1702: Added Volume Control Slider to BrainzPlayer #3097
Conversation
79787fc
to
0cc8fe3
Compare
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.
Thank you for taking up this ticket. The functionality works as expected. But there are some improvements which can be done here.
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.
UI looks good, thanks.
I took another look at the code and have a bit more feedback, sorry for trickling the feedback bit by bit!
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.
You found a good way to do volume setting in componentDidUpdate, albeit with a small prop check required. Nice work on that front!
However I think the UI needs some more work.
The input on the player bar does not look very good on desktop sizes. It is very wide for no reason, and its placement leaves to be desired. Not sure if you looked at it in desktop size, but it's massive and bright colored, it makes it look like a progress bar...
Usually, what I expect from this type of media player is one of two things:
- a volume button, which on hover or click will show a vertical range input above it
- a small horizontal range input like what you see on youtube, spotify, apple music in their respective player controls
Considering we already show the player queue by sliding it up (click the stacked horizontal bars in the player), maybe the first solution makes the most sense in this case. It would also work for smaller screen sizes more easily, as we would only need space for one extra volume icon in the player bar:
Do let me know if you have questions or if you are unsure about anything, better to talk first to figure things out before implementing :)
Made all the required changes. It now looks like this: 2025-01-16.13-34-22.mp4 |
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.
Implemented all the changes :) Hovever, I feel there is a slight problem: |
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 good work!
Everything looking fine now 🚀
Problem
Earlier, ListenBrainz used to play music in max volume by default. This feature aims to let users control the volume of music in ListenBrainz itself.
The feature request ticket was LB-1702.
Solution
I created an input range component. Also added some hooks and states. The UI is basic as of now and can be improved further I believe.
The demo is attached below:
simplescreenrecorder-2024-12-27_17.45.19.mp4
Action
I tested the new feature for YouTube and Spotify but couldn't test it for SoundCloud and Apple Music. I couldn't test it for SoundCloud as they are not accepting new application requests right now so couldn't get the API key. Couldn't test it for Apple Music as I don't have Apple Music premium 😅
If anyone could test it for these two platforms it would be great. Also, please suggest UI changes, if any.
P.S. It's my biggest open-source contribution till date. Thanks @anshg1214 for guiding and supporting me :)