From 1f11c16aefe71d68605d2cd0ad5da9c016aa3570 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Mon, 2 Oct 2023 22:58:44 +0200 Subject: testing profile autoselect --- web/script/player/track.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'web/script/player/track.ts') 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(cb => { this.append_queue.push({ buf, ...this.metadata.segments[index], index, cb }) this.tick_append() -- cgit v1.2.3-70-g09d2