Skip to content

Commit

Permalink
#1214 jump to t=0 when set by param
Browse files Browse the repository at this point in the history
  • Loading branch information
YiranDuan721 committed Oct 25, 2023
1 parent e337d87 commit 0a86d4b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/ts/TUMLiveVjs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,15 @@ 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}`);
}
});
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;
}
Expand Down

0 comments on commit 0a86d4b

Please sign in to comment.