mirror of
https://gitea.invidious.io/iv-org/invidious
synced 2024-12-22 14:35:46 +01:00
Player: Fix video playback for videos that have already been watched.
Trying to watch an already watched video will make the video start 15 seconds before the end of the video. This is not very comfortable when listening to music or watching/listening playlists over and over.
This commit is contained in:
parent
1ae14cc224
commit
e82c965e89
@ -351,7 +351,12 @@ if (video_data.params.save_player_pos) {
|
|||||||
const rememberedTime = get_video_time();
|
const rememberedTime = get_video_time();
|
||||||
let lastUpdated = 0;
|
let lastUpdated = 0;
|
||||||
|
|
||||||
if(!hasTimeParam) set_seconds_after_start(rememberedTime);
|
if(!hasTimeParam) {
|
||||||
|
if (rememberedTime >= video_data.length_seconds - 20)
|
||||||
|
set_seconds_after_start(0);
|
||||||
|
else
|
||||||
|
set_seconds_after_start(rememberedTime);
|
||||||
|
}
|
||||||
|
|
||||||
player.on('timeupdate', function () {
|
player.on('timeupdate', function () {
|
||||||
const raw = player.currentTime();
|
const raw = player.currentTime();
|
||||||
|
Loading…
Reference in New Issue
Block a user