From ad7a32363280462cd7428e09c41d0c584e8d4345 Mon Sep 17 00:00:00 2001 From: AlexWebArchitect Date: Sat, 31 Jul 2021 12:13:07 +0300 Subject: [PATCH] add keyboard shortcut for updating video playback rate --- src/lib/mediaPlayer.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/mediaPlayer.ts b/src/lib/mediaPlayer.ts index 75f3f1a8..53155513 100644 --- a/src/lib/mediaPlayer.ts +++ b/src/lib/mediaPlayer.ts @@ -347,6 +347,10 @@ export default class VideoPlayer { onMuteClick(); } else if(e.code === 'Space') { this.togglePlay(); + } else if(e.altKey && e.code === 'Equal') { + this.video.playbackRate += 0.25; + } else if(e.altKey && e.code === 'Minus') { + this.video.playbackRate -= 0.25; } }); }