As I eluded to last week, I have been slowly working on getting this issue resolved where the volume panel does not respond to wheel scroll. This had me diving deep into the code and having to read up on documentation from multiple different dependencies.
Thankfully the owner of the repo told me what file to start looking in but it wasn’t apparent at first what I needed to do. I searched the file and then the directory for anything that had “volume” in it and then “wheel” in it in order to figure out how they handled volume changes and wheel scrolls.
I’m starting to get more familiar with the code but I’m still not sure how to tackle this. After looking around on the internet for a wile I came across an open source plugin for video.js (the video player api FreeTube uses) that is used to override the hotkey settings, and it also had the functionality to enable volume scroll on hover, the exact thing I am trying to accomplish.
I did my best to replicate the code and it partially worked. The first issue I noticed is that I was only able to change the volume after making the actual video player my active element. Once it was my active element I did not have to be hovered over the volume panel to change the volume but instead could change the volume if hovered anywhere over the entire video player.
At this point it was exam week and I was starting to stress out about getting this finished in time so I asked for help on the Slack channel. HumphD gave me a couple of good suggestions that I was not able to immediately implement. After exams though I gave it another try and was able to figure it out after a short amount of time.
I cleaned up all the unnecessary code that was left over from my first attempt, rebased and squashed my commits into a single commit, and then made my third PR!
I had made a note in the PR that there was something that I wasn’t sure to label a feature or a bug. When the mute button is clicked the user cannot scroll the volume back on, but must click the volume again to un-mute. What I didn’t realize was that that volume was actually still changing when the mute was clicked. Thankfully another contributor found it.
After some discussion from the community the owner made an appearance and told me what they expected. He wanted it so that the volume will not change when muted, and that if the user scrolls while muted, the volume will un-mute and go to the lowest volume level. After meeting those specs I committed and am still awaiting review.