From 684cdacbbd775b5f404dd7b373e02dd21baf5ff0 Mon Sep 17 00:00:00 2001 From: kontrollanten <6680299+kontrollanten@users.noreply.github.com> Date: Fri, 5 Feb 2021 09:49:15 +0100 Subject: [PATCH] client(hotkeys): remove seekstep VLC behavior closes #2810 --- .../assets/player/peertube-player-manager.ts | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/client/src/assets/player/peertube-player-manager.ts b/client/src/assets/player/peertube-player-manager.ts index 4ea9fda2e..2cbef48ea 100644 --- a/client/src/assets/player/peertube-player-manager.ts +++ b/client/src/assets/player/peertube-player-manager.ts @@ -543,24 +543,19 @@ export class PeertubePlayerManager { enableVolumeScroll: false, enableModifiersForNumbers: false, + rewindKey: function (event: KeyboardEvent) { + return isNaked(event, 'ArrowLeft') + }, + + forwardKey: function (event: KeyboardEvent) { + return isNaked(event, 'ArrowRight') + }, + fullscreenKey: function (event: KeyboardEvent) { // fullscreen with the f key or Ctrl+Enter return isNaked(event, 'f') || (!event.altKey && event.ctrlKey && event.key === 'Enter') }, - seekStep: function (event: KeyboardEvent) { - // mimic VLC seek behavior, and default to 5 (original value is 5). - if (event.ctrlKey && event.altKey) { - return 5 * 60 - } else if (event.ctrlKey) { - return 60 - } else if (event.altKey) { - return 10 - } else { - return 5 - } - }, - customKeys: { increasePlaybackRateKey: { key: function (event: KeyboardEvent) {