From c78cbe772723e8b639453a08fd1583a793e309c9 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sat, 28 Oct 2023 12:57:46 +0200 Subject: prof to partial track subtitle support --- web/script/player/mediacaps.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'web/script/player/mediacaps.ts') 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 } = { -- cgit v1.2.3-70-g09d2