Customizable keybindings
jacekim
Member
On web player, I see that 'M' is mapped to "Mute" and 'P' is mapped for playing, and so on.
I was wondering if this could be customizable. I use asti.ga on mac os at work, and 'M' keybinding is overrides "Cmd+M" command, a OS-wide shortcut to minimize the active window. I also use browser extension(vimium) that use 'p' to map to something else.
I'd like to be able to change the keybindings to something 'space' for play/pause, but I imagine other people have their different use cases. A customizable keybinding would be greatly appreciated.
Thank you.
Comments
Thanks. We use the standard jPlayer keybindings as documented here: https://jplayer.org/latest/developer-guide/#jPlayer-option-keyEnabled
This allows customisation at the code level and works in the browser; in theory we should be able to customise these so you can use different keys.
I'm a bit surprised, though. I would've thought the simple "m" binding for mute does not override Cmd+M... Maybe we can check the Cmd key is depressed at the same time, and ignore the keypress if so.
Yeah that was surprising for me as well. Is the front-end code open sourced, by any chance? I honestly wouldn't mind looking into it myself, and submitting a PR
No, sorry... but if you're interested, look in
app.js
(not minified atm) around lines 4085 where the player is created and refer to https://jplayer.org/latest/developer-guide/#jPlayer-option-keyBindings :-D