diff options
Diffstat (limited to 'client/src')
-rw-r--r-- | client/src/assets/player/peertube-player.ts | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/client/src/assets/player/peertube-player.ts b/client/src/assets/player/peertube-player.ts index eca2ce6c3..5cea69eb8 100644 --- a/client/src/assets/player/peertube-player.ts +++ b/client/src/assets/player/peertube-player.ts | |||
@@ -69,7 +69,27 @@ function getVideojsOptions (options: { | |||
69 | Object.assign(videojsOptions.plugins, { | 69 | Object.assign(videojsOptions.plugins, { |
70 | hotkeys: { | 70 | hotkeys: { |
71 | enableVolumeScroll: false, | 71 | enableVolumeScroll: false, |
72 | enableModifiersForNumbers: false | 72 | enableModifiersForNumbers: false, |
73 | customKeys: { | ||
74 | increasePlaybackRateKey: { | ||
75 | key: function (event) { | ||
76 | // use '>' | ||
77 | return event.which === 51 | ||
78 | }, | ||
79 | handler: function (player, options, event) { | ||
80 | player.playbackRate(player.playbackRate() + 0.1) | ||
81 | } | ||
82 | }, | ||
83 | decreasePlaybackRateKey: { | ||
84 | key: function (event) { | ||
85 | // use '<' | ||
86 | return event.which === 50 | ||
87 | }, | ||
88 | handler: function (player, options, event) { | ||
89 | player.playbackRate(player.playbackRate() - 0.1) | ||
90 | } | ||
91 | } | ||
92 | } | ||
73 | } | 93 | } |
74 | }) | 94 | }) |
75 | } | 95 | } |