Allow the t parameter to override the stored video playback position

This commit is contained in:
bbielsa 2021-11-17 20:25:47 -05:00 committed by Emilien Devos
parent b90bceb2dc
commit ed6476b5ea

View File

@ -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;
if(!hasTimeParam) {
set_seconds_after_start(remeberedTime);
}
const updateTime = () => {
const raw = player.currentTime();