polimediaupv/paella

Keyboard shortcut: Increase/Decrease playback rate

Closed this issue · 2 comments

Hi everybody,

I have a request regarding using keyboard shortcuts. I would like to increase and decrease the playback rate and I can hardcode it. Here is an example:

var videoContainer = paella.player.videoContainer;
videoContainer.setPlaybackRate(1.5);

By using playbackRate() I am no able to retrieve the current playback rate. How is it possible to retrieve the current playback rate, so I can set the playbackrate manually (via the keyboard shortcut in "main.js").

Thanks for your help in advance.

Kind regards,
Matthias

You can implement your own key configuration using a KeyPlugin. The documentation is not updated on the web page, but there are documents available in the doc folder of the repository:

Hi @unikn-horstmann , did you end up writing a custom key plugin to make the keyboard shortcut to increase and decrease playback rate for Paella 6? If so, would you be willing to share that work? The Paella 7 has the built keyboard shortcut for playbackRate, but our site would like it for Paella 6 until we upgrade.

Otherwise, I'll try make a PlaybackRateKeyboardShortcutPlugin modeled on the DefaultShortcuts but with similar code from the Paella 7 shortcut plugin for playbackRate...
https://github.com/polimediaupv/paella/blob/develop/plugins/es.upv.paella.keyPlugin/main.js
https://github.com/polimediaupv/paella-core/blob/main/src/js/plugins/es.upv.paella.defaultShortcuts.js#L62-L92