diff options
author | metamuffin <metamuffin@disroot.org> | 2025-06-02 13:28:18 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-06-02 13:28:18 +0200 |
commit | 0bfac6434601e8c4feac6d497df632ede15a7503 (patch) | |
tree | 8ad0d7395bb9eafda057b6a8e30382038418a30c /web/script/player/player.ts | |
parent | 96a9d8916091be184270451484957028a75a9653 (diff) | |
download | jellything-0bfac6434601e8c4feac6d497df632ede15a7503.tar jellything-0bfac6434601e8c4feac6d497df632ede15a7503.tar.bz2 jellything-0bfac6434601e8c4feac6d497df632ede15a7503.tar.zst |
use singular "subtitle" when referring to track type
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...") |