jplayer / jPlayer

jPlayer : HTML5 Audio & Video for jQuery
http://jplayer.org/
Other
4.6k stars 1.47k forks source link

Standardize keyboard shortcuts #363

Open Phyks opened 8 years ago

Phyks commented 8 years ago

Hi,

What about using more standard keyboard shortcuts (or allow the user to use them as an alternative)?

I am thinking in (working in many players, such as VLC):

I do not think they would interfer with browsers default keybindings, and such shortcuts are already used by others webapps such as Jupyter notebook.

Especially, since I am willing to add those in Ampache, I start the discussion on the upstream project side to see if it is something worth implementing upstream or that we should do on Ampache side.

Thanks

wikiloops commented 7 years ago

Hey, just stumbled across this issue and thought I'd leave a quick comment: Please do not implement such keyboard shortcuts, or at least keep them as turned "off" by default. Reason why: First of all, it really isn't that complicated to add key-bindings triggering the desired functionality in JS (which is what I did), and secondly, if you happen to have any kind of form field delivered alongside your player (like a comment box, p.e.), your visitor will run into quite unexpected player behaviour while he is typing into that form field or using the arrow keys to navigate his text entry. Some "disable keyboard shortcuts if user is focused on some form element"-magic needs to be applied here, and I'd think that might be too implementation specific to be solved reliably in the jPlayer library, at least this scenario should be considered. I guess simple checks if a textarea or text-input are active could be implemented in a default version, just please don't add a standard feature that would be likely to cause problems in many scenarios.

Have a nice day :)