From 180d151ac9e1c06112c76a3e44a8bb13dc9bea3c Mon Sep 17 00:00:00 2001 From: morethanwords Date: Thu, 28 Oct 2021 14:46:48 +0300 Subject: [PATCH] Video player: seeking with arrows --- src/lib/mediaPlayer.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/mediaPlayer.ts b/src/lib/mediaPlayer.ts index 75141d98..ae2e27fa 100644 --- a/src/lib/mediaPlayer.ts +++ b/src/lib/mediaPlayer.ts @@ -396,6 +396,9 @@ export default class VideoPlayer extends EventListenerBase<{ appMediaPlaybackController.playbackRate += .25; } else if(e.altKey && e.code === 'Minus') { appMediaPlaybackController.playbackRate -= .25; + } else if(this.wrapper.classList.contains('ckin__fullscreen') && (e.code === 'ArrowLeft' || e.code === 'ArrowRight')) { + if(e.code === 'ArrowLeft') appMediaPlaybackController.seekBackward({action: 'seekbackward'}); + else appMediaPlaybackController.seekForward({action: 'seekforward'}); } else { good = false; }