mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-03-16.git
synced 2024-08-15 00:53:18 +00:00
Allow the t parameter to override the stored video playback position
This commit is contained in:
parent
b90bceb2dc
commit
ed6476b5ea
1 changed files with 5 additions and 1 deletions
|
@ -202,10 +202,14 @@ if (video_data.premiere_timestamp && Math.round(new Date() / 1000) < video_data.
|
|||
}
|
||||
|
||||
if (video_data.params.save_player_pos) {
|
||||
const url = new URL(location);
|
||||
const hasTimeParam = url.searchParams.has("t");
|
||||
const remeberedTime = get_video_time();
|
||||
let lastUpdated = 0;
|
||||
|
||||
set_seconds_after_start(remeberedTime);
|
||||
if(!hasTimeParam) {
|
||||
set_seconds_after_start(remeberedTime);
|
||||
}
|
||||
|
||||
const updateTime = () => {
|
||||
const raw = player.currentTime();
|
||||
|
|
Loading…
Reference in a new issue