Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New TTML_PARSED event #2444

Merged

Conversation

Gontran-Molotov
Copy link
Contributor

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.

@epiclabsDASH epiclabsDASH added this to the v2.6.7 milestone Feb 27, 2018
@epiclabsDASH
Copy link
Contributor

@Gontran-Molotov, thanks for the contribution. Could you please also add this event information to the typings file (index.d.ts)?

@Gontran-Molotov
Copy link
Contributor Author

Gontran-Molotov commented Feb 28, 2018

@epiclabsDASH I added the event information to the typings file. Could you please check this is correct as I don't use TypeScript myself?

@epiclabsDASH epiclabsDASH merged commit aad8e11 into Dash-Industry-Forum:development Mar 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants