diff options
| author | 138138138 <78271024+138138138@users.noreply.github.com> | 2022-06-22 19:33:02 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-22 19:33:02 +0800 |
| commit | f6b1cbd5d0338e65f56adb3aaf71738534afda6a (patch) | |
| tree | d907be4724056a757e6aa8d51ee5b83dac9c3e1a | |
| parent | 6c73614a47a5a88df45aa32fadb64e85595d2a18 (diff) | |
| download | invidious-f6b1cbd5d0338e65f56adb3aaf71738534afda6a.tar.gz invidious-f6b1cbd5d0338e65f56adb3aaf71738534afda6a.tar.bz2 invidious-f6b1cbd5d0338e65f56adb3aaf71738534afda6a.zip | |
Player MobileUi fast forward/backward rate
The fast forward/backward seconds will be adjusted according to playback rate (same as YouTube app behavior).
5 seconds is used when the playback rate is 1x. Previously it was 10 seconds. I believe most of the users watch videos at 2x, so the change will not be obvious.
| -rw-r--r-- | assets/js/player.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/assets/js/player.js b/assets/js/player.js index 7d099e66..7930a3d3 100644 --- a/assets/js/player.js +++ b/assets/js/player.js @@ -145,7 +145,7 @@ function isMobile() { } if (isMobile()) { - player.mobileUi(); + player.mobileUi({ touchControls: { seekSeconds: 5 * player.playbackRate() } }); var buttons = ['playToggle', 'volumePanel', 'captionsButton']; @@ -274,6 +274,9 @@ function updateCookie(newVolume, newSpeed) { player.on('ratechange', function () { updateCookie(null, player.playbackRate()); + if (isMobile()) { + player.mobileUi({ touchControls: { seekSeconds: 5 * player.playbackRate() } }); + } }); player.on('volumechange', function () { |
