aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-01-12 16:01:39 +0100
committerChocobozzz <me@florianbigard.com>2022-01-13 11:16:35 +0100
commitfc3412fd4e90c8836dfd8ced6f85c6118adfbe75 (patch)
treec8d2e2daeae04233deb4607ab254b84f755992bc /client/src/assets/player
parentdd200d34773905300c871e3a779556755df293d9 (diff)
downloadPeerTube-fc3412fd4e90c8836dfd8ced6f85c6118adfbe75.tar.gz
PeerTube-fc3412fd4e90c8836dfd8ced6f85c6118adfbe75.tar.zst
PeerTube-fc3412fd4e90c8836dfd8ced6f85c6118adfbe75.zip
Cleanup player hotkeys
Diffstat (limited to 'client/src/assets/player')
-rw-r--r--client/src/assets/player/peertube-player-manager.ts15
1 files changed, 13 insertions, 2 deletions
diff --git a/client/src/assets/player/peertube-player-manager.ts b/client/src/assets/player/peertube-player-manager.ts
index b5317f45b..d715adf56 100644
--- a/client/src/assets/player/peertube-player-manager.ts
+++ b/client/src/assets/player/peertube-player-manager.ts
@@ -687,9 +687,20 @@ export class PeertubePlayerManager {
687 player.playbackRate(parseFloat(newValue.toFixed(2))) 687 player.playbackRate(parseFloat(newValue.toFixed(2)))
688 } 688 }
689 }, 689 },
690 frameByFrame: { 690 previousFrame: {
691 key: function (event: KeyboardEvent) { 691 key: function (event: KeyboardEvent) {
692 return isNaked(event, '.') 692 return event.key === ','
693 },
694 handler: function (player: videojs.Player) {
695 player.pause()
696 // Calculate movement distance (assuming 30 fps)
697 const dist = 1 / 30
698 player.currentTime(player.currentTime() - dist)
699 }
700 },
701 nextFrame: {
702 key: function (event: KeyboardEvent) {
703 return event.key === '.'
693 }, 704 },
694 handler: function (player: videojs.Player) { 705 handler: function (player: videojs.Player) {
695 player.pause() 706 player.pause()