Skip to content

Commit

Permalink
fix(TTML): Extended subtitle codec support (#6832)
Browse files Browse the repository at this point in the history
> Quote from specs:
> Valid examples include:
> • "stpp.ttml.etd1" - TTML content suitable for presentation by an
EBU-TT-D renderer
> • "stpp.ttml.etd1|im1t" or "stpp.ttml.im1t|etd1" - TTML content
suitable for presentation by an EBU-TT-D or
IMSC1 renderer 

Fixes #6831
  • Loading branch information
david-hm-morgan authored and avelad committed Jun 18, 2024
1 parent 350c958 commit af732cb
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/text/mp4_ttml_parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,19 @@ shaka.text.TextEngine.registerParser(
shaka.text.TextEngine.registerParser(
'application/mp4; codecs="stpp.ttml.im1t"',
() => new shaka.text.Mp4TtmlParser());
shaka.text.TextEngine.registerParser(
'application/mp4; codecs="stpp.ttml.im2t"',
() => new shaka.text.Mp4TtmlParser());
shaka.text.TextEngine.registerParser(
'application/mp4; codecs="stpp.ttml.etd1"',
() => new shaka.text.Mp4TtmlParser());
shaka.text.TextEngine.registerParser(
'application/mp4; codecs="stpp.ttml.etd1|im1t"',
() => new shaka.text.Mp4TtmlParser());
shaka.text.TextEngine.registerParser(
'application/mp4; codecs="stpp.ttml.im1t|etd1"',
() => new shaka.text.Mp4TtmlParser());

// Legacy codec string uses capital "TTML", i.e.: prior to HLS rfc8216bis:
// Note that if a Variant Stream specifies one or more Renditions that
// include IMSC subtitles, the CODECS attribute MUST indicate this with a
Expand Down

0 comments on commit af732cb

Please sign in to comment.