binding keyboard shortcuts to jplayer

278 views
Skip to first unread message

SeanR

unread,
Apr 28, 2011, 7:21:53 AM4/28/11
to jPlayer: HTML5 Audio & Video for jQuery
Hi, are there any plans to integrate common keyboard shortcuts in
jplayer e.g. spacebar = play/pause? Couldn't see a mention in the
developer guide and wanted to check before implementing my own.

I figure there will need to be a combination of bindings that affect
a) the player and b) an associated playlist (to use the up down arrows
to select next track etc.

Is there anything in the jplayer code to swallow any keyboard events
and not propogate up to 3rd party code?

thanks

Sean

Mark Panaghiston

unread,
Apr 28, 2011, 9:50:40 AM4/28/11
to jpl...@googlegroups.com
jPlayer does not detect any keyboard event. All we did was use links in our standard skins so that the browser's default targeting system could target the controls.

Each browser has its own unique combination of buttons to hold down in order to access the accesskey if you use the HTML standard way of doing it.

After discussion in this group, around a year ago now, it was decided that no further action should be taken. Detecting key presses by default can lead to lots of problems and it depends on the needs of your target.

The visually impaired tend to use a browser designed for the purpose and it has a sensible way of targeting the controls already there for them. The HTML has the word "play" on the play button, so they know which one to click on. Likewise for all the other controls.

At this time, we do not plan to add anything like this to jPlayer. If you want it to play when you hit space, then create the key handler and then issue the play command to jPlayer when they hit space.

Best regards,
Mark P.
Reply all
Reply to author
Forward
0 new messages