ctd1500 / videojs-hotkeys

Adds more hotkey support to video.js
Apache License 2.0
196 stars 107 forks source link

Only change volume on hover #57

Closed omarroth closed 6 years ago

omarroth commented 6 years ago

Currently if a user scrolls anywhere within the player then the scroll event is captured. This interferes with other player elements, notably making it difficult to scroll through captions. This PR makes it so that the volume will only change when the user is hovering over the volume element, similar to how YouTube's volume scroll works. This change is compatible with VideoJS 6 and 7.

Let me know if you'd like me to fix anything!

ctd1500 commented 6 years ago

My initial goal was to have volume scroll functionality like media players (MPC-BE, VLC) available.

If you can modify this to be an option to switch between the current style and hover style, that would help a lot. Then we'll have the best of both worlds available. I'm considering YouTube-style hover volume being turned on by default.

omarroth commented 6 years ago

Added a enableHoverScroll, which is true by default. I can change that if you want, and I'll probably squash this into one commit.

ctd1500 commented 6 years ago

Unless you have anything you want to add/change, I gave this a test run and it seems good to me.

omarroth commented 6 years ago

Squashed and ready to merge!