diff options
author | metamuffin <metamuffin@disroot.org> | 2023-10-02 22:58:44 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2023-10-02 22:58:44 +0200 |
commit | 1f11c16aefe71d68605d2cd0ad5da9c016aa3570 (patch) | |
tree | 39a5cdc211c6f5da660acb4a8da36e88f88863c7 /web/script/player/track.ts | |
parent | e52890060edb988cf16f184d5711e539b1c1dd01 (diff) | |
download | jellything-1f11c16aefe71d68605d2cd0ad5da9c016aa3570.tar jellything-1f11c16aefe71d68605d2cd0ad5da9c016aa3570.tar.bz2 jellything-1f11c16aefe71d68605d2cd0ad5da9c016aa3570.tar.zst |
testing profile autoselect
Diffstat (limited to 'web/script/player/track.ts')
-rw-r--r-- | web/script/player/track.ts | 4 |
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() |