mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-03-16.git
synced 2024-08-15 00:53:18 +00:00
Only play after error if already playing
This commit is contained in:
parent
095b5fcea0
commit
d5c9b7dfe8
1 changed files with 6 additions and 1 deletions
|
@ -121,13 +121,18 @@ player.on('error', function(event) {
|
||||||
|
|
||||||
var currentTime = player.currentTime();
|
var currentTime = player.currentTime();
|
||||||
var playbackRate = player.playbackRate();
|
var playbackRate = player.playbackRate();
|
||||||
|
var paused = player.paused()
|
||||||
|
|
||||||
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.playbackRate(playbackRate);
|
||||||
|
|
||||||
|
if (!paused) {
|
||||||
player.play();
|
player.play();
|
||||||
|
}
|
||||||
}, 5000), 5000);
|
}, 5000), 5000);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue