From 0a86d4be9525accdf90d57268448246de9568153 Mon Sep 17 00:00:00 2001 From: meandaD Date: Wed, 25 Oct 2023 23:51:33 +0200 Subject: [PATCH] #1214 jump to t=0 when set by param --- web/ts/TUMLiveVjs.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/ts/TUMLiveVjs.ts b/web/ts/TUMLiveVjs.ts index 537a93c19..929fa785d 100644 --- a/web/ts/TUMLiveVjs.ts +++ b/web/ts/TUMLiveVjs.ts @@ -65,7 +65,7 @@ class PlayerSettings { let iOSReady; const t: number | undefined = +getQueryParam("t"); this.player.on("loadedmetadata", () => { - if (!isNaN(t) && t) { + if (!isNaN(t)) { this.player.currentTime(t); console.log(`⚫️ jump to: ${t}`); } @@ -73,7 +73,7 @@ class PlayerSettings { if (videojs.browser.IS_IOS) { this.player.on("canplaythrough", () => { // Can be executed multiple times during playback - if (!iOSReady && t) { + if (!iOSReady) { this.player.currentTime(t); iOSReady = true; }