diff options
author | kontrollanten <6680299+kontrollanten@users.noreply.github.com> | 2021-02-05 09:49:15 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2021-02-16 10:37:01 +0100 |
commit | 684cdacbbd775b5f404dd7b373e02dd21baf5ff0 (patch) | |
tree | 86ba1fc12c8c3c6c11d0b49c277859181123d7ee | |
parent | e0b5972167e551c1c48a3ae0509f5ad12f806161 (diff) | |
download | PeerTube-684cdacbbd775b5f404dd7b373e02dd21baf5ff0.tar.gz PeerTube-684cdacbbd775b5f404dd7b373e02dd21baf5ff0.tar.zst PeerTube-684cdacbbd775b5f404dd7b373e02dd21baf5ff0.zip |
client(hotkeys): remove seekstep VLC behavior
closes #2810
-rw-r--r-- | client/src/assets/player/peertube-player-manager.ts | 21 |
1 files 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 { | |||
543 | enableVolumeScroll: false, | 543 | enableVolumeScroll: false, |
544 | enableModifiersForNumbers: false, | 544 | enableModifiersForNumbers: false, |
545 | 545 | ||
546 | rewindKey: function (event: KeyboardEvent) { | ||
547 | return isNaked(event, 'ArrowLeft') | ||
548 | }, | ||
549 | |||
550 | forwardKey: function (event: KeyboardEvent) { | ||
551 | return isNaked(event, 'ArrowRight') | ||
552 | }, | ||
553 | |||
546 | fullscreenKey: function (event: KeyboardEvent) { | 554 | fullscreenKey: function (event: KeyboardEvent) { |
547 | // fullscreen with the f key or Ctrl+Enter | 555 | // fullscreen with the f key or Ctrl+Enter |
548 | return isNaked(event, 'f') || (!event.altKey && event.ctrlKey && event.key === 'Enter') | 556 | return isNaked(event, 'f') || (!event.altKey && event.ctrlKey && event.key === 'Enter') |
549 | }, | 557 | }, |
550 | 558 | ||
551 | seekStep: function (event: KeyboardEvent) { | ||
552 | // mimic VLC seek behavior, and default to 5 (original value is 5). | ||
553 | if (event.ctrlKey && event.altKey) { | ||
554 | return 5 * 60 | ||
555 | } else if (event.ctrlKey) { | ||
556 | return 60 | ||
557 | } else if (event.altKey) { | ||
558 | return 10 | ||
559 | } else { | ||
560 | return 5 | ||
561 | } | ||
562 | }, | ||
563 | |||
564 | customKeys: { | 559 | customKeys: { |
565 | increasePlaybackRateKey: { | 560 | increasePlaybackRateKey: { |
566 | key: function (event: KeyboardEvent) { | 561 | key: function (event: KeyboardEvent) { |