mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-03-16.git
synced 2024-08-15 00:53:18 +00:00
Respect playback rate when reloading player
This commit is contained in:
parent
b38a2bbd12
commit
26b7200360
1 changed files with 2 additions and 0 deletions
|
@ -118,11 +118,13 @@ player.on('error', function(event) {
|
||||||
console.log("An error occured in the player, reloading...");
|
console.log("An error occured in the player, reloading...");
|
||||||
|
|
||||||
var currentTime = player.currentTime();
|
var currentTime = player.currentTime();
|
||||||
|
var playbackRate = player.playbackRate()
|
||||||
player.load();
|
player.load();
|
||||||
if (currentTime > 0.5) {
|
if (currentTime > 0.5) {
|
||||||
currentTime -= 0.5;
|
currentTime -= 0.5;
|
||||||
}
|
}
|
||||||
player.currentTime(currentTime);
|
player.currentTime(currentTime);
|
||||||
|
player.playbackRate(playbackRate);
|
||||||
player.play()
|
player.play()
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue