diff options
Diffstat (limited to 'client/src/assets/player/peertube-player.ts')
-rw-r--r-- | client/src/assets/player/peertube-player.ts | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/client/src/assets/player/peertube-player.ts b/client/src/assets/player/peertube-player.ts index 5cea69eb8..2c16c87ec 100644 --- a/client/src/assets/player/peertube-player.ts +++ b/client/src/assets/player/peertube-player.ts | |||
@@ -73,20 +73,18 @@ function getVideojsOptions (options: { | |||
73 | customKeys: { | 73 | customKeys: { |
74 | increasePlaybackRateKey: { | 74 | increasePlaybackRateKey: { |
75 | key: function (event) { | 75 | key: function (event) { |
76 | // use '>' | 76 | return event.key === '>' |
77 | return event.which === 51 | ||
78 | }, | 77 | }, |
79 | handler: function (player, options, event) { | 78 | handler: function (player) { |
80 | player.playbackRate(player.playbackRate() + 0.1) | 79 | player.playbackRate((player.playbackRate() + 0.1).toFixed(2)) |
81 | } | 80 | } |
82 | }, | 81 | }, |
83 | decreasePlaybackRateKey: { | 82 | decreasePlaybackRateKey: { |
84 | key: function (event) { | 83 | key: function (event) { |
85 | // use '<' | 84 | return event.key === '<' |
86 | return event.which === 50 | ||
87 | }, | 85 | }, |
88 | handler: function (player, options, event) { | 86 | handler: function (player) { |
89 | player.playbackRate(player.playbackRate() - 0.1) | 87 | player.playbackRate((player.playbackRate() - 0.1).toFixed(2)) |
90 | } | 88 | } |
91 | } | 89 | } |
92 | } | 90 | } |