aboutsummaryrefslogtreecommitdiff
path: root/web/script/player/track.ts
diff options
context:
space:
mode:
Diffstat (limited to 'web/script/player/track.ts')
-rw-r--r--web/script/player/track.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/web/script/player/track.ts b/web/script/player/track.ts
index 59690c3..fe4c3c1 100644
--- a/web/script/player/track.ts
+++ b/web/script/player/track.ts
@@ -78,7 +78,9 @@ export class PlayerTrack {
async load(index: number) {
this.loading.add(index)
- const buf = await this.player.downloader.download(`/n/${encodeURIComponent(this.node_id)}/stream?format=hlsseg&tracks=${this.track_index}&index=${index}`)
+ this.player.profile_selector.select_optimal_profile(this.track_index, this.profile)
+ const url = `/n/${encodeURIComponent(this.node_id)}/stream?format=hlsseg&tracks=${this.track_index}&index=${index}${this.profile.value ? `profile=${this.profile.value.id}` : ""}`;
+ const buf = await this.player.downloader.download(url)
await new Promise<void>(cb => {
this.append_queue.push({ buf, ...this.metadata.segments[index], index, cb })
this.tick_append()