aboutsummaryrefslogtreecommitdiff
path: root/web/script/player/player.ts
diff options
context:
space:
mode:
Diffstat (limited to 'web/script/player/player.ts')
-rw-r--r--web/script/player/player.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/web/script/player/player.ts b/web/script/player/player.ts
index 9cedaf5..8fccb24 100644
--- a/web/script/player/player.ts
+++ b/web/script/player/player.ts
@@ -129,6 +129,7 @@ export class Player {
this.set_pers()
})
}
+
async update(newt?: number) {
await Promise.all(this.active_tracks.value.map(t => t.update(newt ?? this.video.currentTime)))
}
@@ -142,7 +143,7 @@ export class Player {
track.abort.abort()
} else if (state && active_index == -1) {
this.logger?.log(`Enabled track ${index}: ${display_track(this.tracks![index])}`)
- this.active_tracks.value.push((await create_track(this, this.node_id, index, this.tracks![index]))!)
+ this.active_tracks.value.push(create_track(this, this.node_id, index, this.tracks![index])!)
if (update) await this.update()
}
this.active_tracks.change()