diff options
Diffstat (limited to 'web/script/player')
-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(); } |