aboutsummaryrefslogtreecommitdiff
path: root/web/script/player/track/mse.ts
diff options
context:
space:
mode:
Diffstat (limited to 'web/script/player/track/mse.ts')
-rw-r--r--web/script/player/track/mse.ts4
1 files changed, 2 insertions, 2 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;