muxinc / media-chrome

Custom elements (web components) for making audio and video player controls that look great in your website or app.
https://media-chrome.org
MIT License
1.21k stars 62 forks source link

Add keyboard arrow controls for volume when not on the volume range #957

Open heff opened 1 month ago

heff commented 1 month ago

At first I thought we might add arrow controls to the mute button to control volume, because it felt odd that didn't work, but looking at the youtube player it looks like they just capture any up and down arrow usage as volume control.

I think we should do something similar. We already do this for left and right arrows, skipping ahead and back.

We should also make the left and right arrows work for volume control when the volume range is specifically selected. This is a range-level detail. The native HTML range will respond to either up/down or left/right arrows. The media chrome range only responds to up/down for some reason. I'm sure there's a reason we'll need to dig up.