From 3b484c362e607e4f17e0bb68051e7f6bf2140e3a Mon Sep 17 00:00:00 2001 From: 138138138 <78271024+138138138@users.noreply.github.com> Date: Wed, 17 Feb 2021 21:33:26 +0800 Subject: [PATCH] Skip duration multiply by playback rate Fast Forward/Backward like YouTube. The skip duration is multiplied by playback rate. --- assets/js/player.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/js/player.js b/assets/js/player.js index 04326631..7490bd75 100644 --- a/assets/js/player.js +++ b/assets/js/player.js @@ -430,17 +430,17 @@ window.addEventListener('keydown', e => { case 'ArrowRight': case 'MediaFastForward': - action = skip_seconds.bind(this, 5); + action = skip_seconds.bind(this, 5 * player.playbackRate()); break; case 'ArrowLeft': case 'MediaTrackPrevious': - action = skip_seconds.bind(this, -5); + action = skip_seconds.bind(this, -5 * player.playbackRate()); break; case 'l': - action = skip_seconds.bind(this, 10); + action = skip_seconds.bind(this, 10 * player.playbackRate()); break; case 'j': - action = skip_seconds.bind(this, -10); + action = skip_seconds.bind(this, -10 * player.playbackRate()); break; case '0':