diff options
author | metamuffin <metamuffin@disroot.org> | 2024-01-29 15:03:18 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-01-29 15:03:18 +0100 |
commit | c0ba30314a06de10c9b98ac130676dcbc9f287fa (patch) | |
tree | e35631ed3181f89ae962e9125cc5073f12967924 /web | |
parent | 4ad7aa6042c64a6e7cfbe2693a4bbeda0514357b (diff) | |
download | jellything-c0ba30314a06de10c9b98ac130676dcbc9f287fa.tar jellything-c0ba30314a06de10c9b98ac130676dcbc9f287fa.tar.bz2 jellything-c0ba30314a06de10c9b98ac130676dcbc9f287fa.tar.zst |
rename stream spec param
Diffstat (limited to 'web')
-rw-r--r-- | web/script/player/track/mse.ts | 4 | ||||
-rw-r--r-- | web/script/player/track/vtt.ts | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/web/script/player/track/mse.ts b/web/script/player/track/mse.ts index 2949890..01836b7 100644 --- a/web/script/player/track/mse.ts +++ b/web/script/player/track/mse.ts @@ -28,7 +28,7 @@ export class MSEPlayerTrack extends PlayerTrack { async init() { this.buffered.value = [{ start: 0, end: this.player.duration.value, status: "loading" }] try { - const res = await fetch(`/n/${encodeURIComponent(this.node_id)}/stream?format=jhlsi&tracks=${this.track_index}`, { headers: { "Accept": "application/json" } }); + const res = await fetch(`/n/${encodeURIComponent(this.node_id)}/stream?format=jhlsi&track=${this.track_index}`, { headers: { "Accept": "application/json" } }); if (!res.ok) return this.player.error.value = "Cannot download index.", undefined; let index!: JhlsTrackIndex & { error: string; }; try { index = await res.json(); } @@ -122,7 +122,7 @@ export class MSEPlayerTrack extends PlayerTrack { async load(index: number) { this.loading.add(index); await this.profile_selector.select_optimal_profile(this.track_index, this.profile); - const url = `/n/${encodeURIComponent(this.node_id)}/stream?format=frag&webm=true&tracks=${this.track_index}&index=${index}${this.profile.value ? `&profile=${this.profile.value.id}` : ""}`; + const url = `/n/${encodeURIComponent(this.node_id)}/stream?format=frag&webm=true&track=${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 => { if (!this.index) return; diff --git a/web/script/player/track/vtt.ts b/web/script/player/track/vtt.ts index 4dddbc7..02a7792 100644 --- a/web/script/player/track/vtt.ts +++ b/web/script/player/track/vtt.ts @@ -33,7 +33,7 @@ export class VttPlayerTrack extends PlayerTrack { async init() { try { - const res = await fetch(`/n/${encodeURIComponent(this.node_id)}/stream?format=jvtt&tracks=${this.track_index}`, { headers: { "Accept": "application/json" } }); + const res = await fetch(`/n/${encodeURIComponent(this.node_id)}/stream?format=jvtt&track=${this.track_index}`, { headers: { "Accept": "application/json" } }); if (!res.ok) return this.player.error.value = "Cannot download index.", undefined; let ai!: JvttCue[] & { error: string; }; try { ai = await res.json(); } |