Skip to content

Commit

Permalink
fix(TTML): Fix subtitles not rendered due to complaint about xml:id (#…
Browse files Browse the repository at this point in the history
…7270)

Fixes #7269
  • Loading branch information
avelad authored Sep 6, 2024
1 parent 17d5cb3 commit 257de7f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/text/ttml_text_parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ shaka.text.TtmlTextParser = class {
TtmlTextParser.getCellResolution_(cellResolution);

const metadata = TXml.getElementsByTagName(tt, 'metadata')[0];
const metadataElements = metadata ? metadata.children : [];
const metadataElements =
(metadata ? metadata.children : []).filter((c) => c != '\n');
const styles = TXml.getElementsByTagName(tt, 'style');
const regionElements = TXml.getElementsByTagName(tt, 'region');

Expand Down

0 comments on commit 257de7f

Please sign in to comment.