diff options
Diffstat (limited to 'web/script/player/player.ts')
-rw-r--r-- | web/script/player/player.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/web/script/player/player.ts b/web/script/player/player.ts index 47568dc..210ce9a 100644 --- a/web/script/player/player.ts +++ b/web/script/player/player.ts @@ -112,18 +112,18 @@ export class Player { this.duration.value = streaminfo.segments[0].duration this.streaminfo = streaminfo this.tracks = streaminfo!.segments[0].tracks; - + console.log("aaa", this.tracks); this.video.src = URL.createObjectURL(this.media_source) this.media_source.addEventListener("sourceopen", async () => { - let video = false, audio = false, subtitles = false; + let video = false, audio = false, subtitle = false; for (let i = 0; i < this.tracks!.length; i++) { const t = this.tracks![i]; if (t.kind == "video" && !video) video = true, await this.set_track_enabled(i, true, false) if (t.kind == "audio" && !audio) audio = true, await this.set_track_enabled(i, true, false) - if (t.kind == "subtitles" && !subtitles) - subtitles = true, await this.set_track_enabled(i, true, false) + if (t.kind == "subtitle" && !subtitle) + subtitle = true, await this.set_track_enabled(i, true, false) } this.set_pers("Buffering initial stream fragments...") |