diff options
author | metamuffin <metamuffin@disroot.org> | 2023-10-28 12:57:46 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2023-10-28 12:57:46 +0200 |
commit | c78cbe772723e8b639453a08fd1583a793e309c9 (patch) | |
tree | d2e01e4ece96722312f6b5c84a64891a6b20c46f | |
parent | 7005927a54bd78468fa1b8a59c9f9d5f5e40706d (diff) | |
download | jellything-c78cbe772723e8b639453a08fd1583a793e309c9.tar jellything-c78cbe772723e8b639453a08fd1583a793e309c9.tar.bz2 jellything-c78cbe772723e8b639453a08fd1583a793e309c9.tar.zst |
prof to partial track subtitle support
-rw-r--r-- | web/script/player/mediacaps.ts | 9 |
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 } = { |