forked from Fijxu/invidious
Set the video time to 0 if the video has been watched ALMOST completly
This commit is contained in:
parent
762fa5214d
commit
c7b8f470d8
1 changed files with 2 additions and 6 deletions
|
@ -351,12 +351,8 @@ 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) {
|
if(!hasTimeParam) set_seconds_after_start(rememberedTime);
|
||||||
if (rememberedTime >= video_data.length_seconds - 20)
|
if (rememberedTime >= video_data.length_seconds - 20 && !hasTimeParam) set_seconds_after_start(0);
|
||||||
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…
Add table
Reference in a new issue