aboutsummaryrefslogtreecommitdiff
path: root/web/script/player/mediacaps.ts
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2023-10-28 12:57:46 +0200
committermetamuffin <metamuffin@disroot.org>2023-10-28 12:57:46 +0200
commitc78cbe772723e8b639453a08fd1583a793e309c9 (patch)
treed2e01e4ece96722312f6b5c84a64891a6b20c46f /web/script/player/mediacaps.ts
parent7005927a54bd78468fa1b8a59c9f9d5f5e40706d (diff)
downloadjellything-c78cbe772723e8b639453a08fd1583a793e309c9.tar
jellything-c78cbe772723e8b639453a08fd1583a793e309c9.tar.bz2
jellything-c78cbe772723e8b639453a08fd1583a793e309c9.tar.zst
prof to partial track subtitle support
Diffstat (limited to 'web/script/player/mediacaps.ts')
-rw-r--r--web/script/player/mediacaps.ts9
1 files changed, 8 insertions, 1 deletions
diff --git a/web/script/player/mediacaps.ts b/web/script/player/mediacaps.ts
index 1fec967..7b57302 100644
--- a/web/script/player/mediacaps.ts
+++ b/web/script/player/mediacaps.ts
@@ -67,7 +67,14 @@ export function profile_to_partial_track(profile: EncodingProfile): SourceTrack
language: "en",
name: "test video"
}
- } else throw new Error("todo: subtitles");
+ } else if (profile.subtitles) {
+ return {
+ codec: FFMPEG_ENCODER_CODEC_MAP[profile.subtitles.codec],
+ kind: { subtitles: true },
+ language: "en",
+ name: "test subtitle"
+ }
+ } else throw new Error("unreachable");
}
const MASTROSKA_CODEC_MAP: { [key: string]: string } = {