forked from midou/invidious
Allow the t parameter to override the stored video playback position
This commit is contained in:
parent
b90bceb2dc
commit
ed6476b5ea
@ -202,10 +202,14 @@ if (video_data.premiere_timestamp && Math.round(new Date() / 1000) < video_data.
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (video_data.params.save_player_pos) {
|
if (video_data.params.save_player_pos) {
|
||||||
|
const url = new URL(location);
|
||||||
|
const hasTimeParam = url.searchParams.has("t");
|
||||||
const remeberedTime = get_video_time();
|
const remeberedTime = get_video_time();
|
||||||
let lastUpdated = 0;
|
let lastUpdated = 0;
|
||||||
|
|
||||||
|
if(!hasTimeParam) {
|
||||||
set_seconds_after_start(remeberedTime);
|
set_seconds_after_start(remeberedTime);
|
||||||
|
}
|
||||||
|
|
||||||
const updateTime = () => {
|
const updateTime = () => {
|
||||||
const raw = player.currentTime();
|
const raw = player.currentTime();
|
||||||
|
Loading…
Reference in New Issue
Block a user