Skip to content

Conversation

@kmcgurty
Copy link

@kmcgurty kmcgurty commented Dec 8, 2025

I'm not sure if feature patches like this are welcome, but I figured if I found it useful, others might. If not, feel free to close/delete this.

This patch replicates how Spotify behaves. When you hover the volume button and scroll your mouse wheel, the volume changes up/down. It's pretty simple, and copies the logic of ctrl+up/down.

I had a bit of trouble figuring out how to know when the player loaded, but I found the window.Events.player.playerReady event useful. The renderer already subscribes to this, so I use that to add the mouse events. The actual slider is not a child of the button, so it requires 2 event subscribers. I use the aria-label to find the button - hopefully it's resistant to UI updates breaking the patch.

@josselinonduty
Copy link
Collaborator

Hey!
Thank you for contributing. That is indeed a nice feature to have ;)

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.

2 participants