I’ve run into an issue using jPlayer and I thought after searching a few places that it would be used commonly enough on here and someone is bound to have run into a similar issue.
I am using the jPlayer to play through audio files and my users would like the functionality to fast-forward and rewind via specific hotkeys. I noticed that jPlayer doesn’t offer this functionality out of the box (it only handles fast-forward and rewind through clicking on the progress bar currently)
Ideally – all that would be necessary would be for a single keypress to toggle the fast-forwarding (or rewinding). When the same key is pressed again, the audio file would begin playing based on the current location.
I decided to implement my own solution to this, which currently seems to work just fine. I thought I would share it in case anyone else encounters such an issue.
Pardon the crude implementation. It was just a proof of concept:
Necessary Javascript:
Working Demo (Use left arrow for rewind and right for fast-forward)