mediathekview / mediathekviewweb

Eine Weboberfläche als Alternative zum Java-Client
https://mediathekviewweb.de/
GNU General Public License v3.0
884 stars 67 forks source link

Feature Request: Add common-used hotkeys to the embedded video player #236

Open gjaekel opened 2 years ago

gjaekel commented 2 years ago

To ease the use, please add a set of common-used hotkeys to control the embedded video player.

gjaekel commented 2 years ago

The used player is video.js. There is a already a project called videojs-hotkeys that seems fit and to provide the requested functionality.

As described on the project home page, it already might be sufficient to to import it and append a single ready-function to the call of the function to play the video, named videojs

https://github.com/mediathekview/mediathekviewweb/blob/5722bd9ad192c936f7e28054091c7f99a5778410/client/index.ts#L891 might become

video = (videojs as any as (id: string) => any)('video-player').ready(function() {
  this.hotkeys({
    [...]
  });
});

I might send a pull request, but I can't test it in any way. Therefore, I first want to ask if there is any development version of the website to test functionality and play around with the hotkey options.

I also found a Firefox add-on called Code Injector. This is able to modify the delivered code "live" in the browser and might be used as the development environment I'm looking for. But I'm no developer and don't know how to "hook" or override the function call in discussion. May anybody give me a hint?