Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements DASH forced-subtitles that are subtitles defined for when no other subtitle track is selected.
The idea is often to implement "Forced Narrative Subtitles" which allows to provide clarifications on different element in the screen. You can read more information on it here for example: https://partnerhelp.netflixstudios.com/hc/en-us/articles/217558918-Understanding-Forced-Narrative-Subtitles
With this PR, those text tracks will now have a
forced
attribute set totrue
in the various APIs where it is inspectable (getAvailableTextTracks
,getTextTrack
and the eventstextTrackChange
andavailableTextTracksChange
).Moreover, they are used as default text tracks, instead of no text track, when no set preference match the current choice, following a specific rule:
This algorithm was chosen after pondering what the most logical would be. It is imperfect however (setting forced subtitles by default even if it is in a different language than the audio track could be preferred for example) and as such it may be changed in the future.
Though in any case, that track can be manually set by
setTextTrack
or preferences, which thus can be used for more precize settings.