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

feat(TextTrackInfo) Passthrough roles even if dash can't parse them #1801

Conversation

justinanastos
Copy link
Contributor

Assuming an AdaptionSet has roles defined, the only way to access them is via MediaPlayer#getTracksFor('text'). If the manifest is using fragmented text, then MediaPlayer#getTracksFor('text') will return [] and the only way to get the text track list is to listen for TEXT_TRACKS_ADDED. However, the tracks in the TEXT_TRACKS_ADDED event is TextTrackInfo[], which does not include the original roles.

This will pass through whatever roles are parsed, allowing them to be accessed for all text track types.

Possibly a workaround for #1236

Assuming an AdaptionSet has roles defined, the only way to access them is via [`MediaPlayer#getTracksFor('text')`](http://cdn.dashjs.org/latest/jsdoc/module-MediaPlayer.html#getTracksFor__anchor). If the manifest is using fragmented text, then `MediaPlayer#getTracksFor('text')` will return `[]` and the only way to get the text track list is to listen for `TEXT_TRACKS_ADDED`. However, the `tracks` property in the `TEXT_TRACKS_ADDED` event is `TextTrackInfo[]`, which does not include the original `roles` from the manifest.

This will pass through whatever `roles` are found, allowing them to be accessed for all text track types.
@dsparacio dsparacio merged commit 5b81a59 into Dash-Industry-Forum:development Mar 3, 2017
@dsparacio
Copy link
Contributor

Thanks good addition!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants