Set the video time to 0 if the video has been watched ALMOST completly

This commit is contained in:
Fijxu 2024-06-04 12:54:27 -04:00
parent 762fa5214d
commit c7b8f470d8
Signed by: Fijxu
GPG key ID: 32C1DDF333EDA6A4

View file

@ -351,12 +351,8 @@ if (video_data.params.save_player_pos) {
const rememberedTime = get_video_time();
let lastUpdated = 0;
if(!hasTimeParam) {
if (rememberedTime >= video_data.length_seconds - 20)
set_seconds_after_start(0);
else
set_seconds_after_start(rememberedTime);
}
if(!hasTimeParam) set_seconds_after_start(rememberedTime);
if (rememberedTime >= video_data.length_seconds - 20 && !hasTimeParam) set_seconds_after_start(0);
player.on('timeupdate', function () {
const raw = player.currentTime();