Skip to content

New TTML_PARSED event

Created by: Gontran-Molotov

This PR provides a new TTML_PARSED event emitted every time a TTML (XML) string has been parsed to get a JavaScript object representing the TTML document.

TTML_PARSED events have the following structure:

{
    type: "ttmlParsed", // dashjs.MediaPlayer.events.TTML_PARSED
    ttmlString: string,
    ttmlDoc: Object
}
  • The ttmlString property is the content of the downloaded TTML segment as string.
  • The ttmlDoc property is the result of the ttmlString parsing. This a JavaScript object.

TTML_EVENT offers the opportunity to change the content of captions or the value of TTML properties before they are processed for screen rendering. This is useful to fix invalid or unadapted values.

Merge request reports