mirror of
https://gitea.invidious.io/iv-org/invidious.git
synced 2024-08-15 00:53:41 +00:00
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.
This commit is contained in:
parent
6c73614a47
commit
f6b1cbd5d0
1 changed files with 4 additions and 1 deletions
|
@ -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 () {
|
||||
|
|
Loading…
Reference in a new issue