Fix styling for the initially displayed CEA-608 cue #666
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.
Description
Issue: PW-22216
When enabling CEA captions within the time range of a cue, this cue is not styled as expected.
This is because we reset the CEA caption setup (mainly adding a
cea-608
class to the subtitle overlay that causes caption styling to be applied) on asubtitleenabled
event. The CEA caption setup gets done on acueenter
event, but that one may arrive before.The event flow is as follows:
subtitleenable
cueenter
subtitleenabled
Thus, we should reset the CEA caption setup on
subtitleenable
, to get a clean slate for whatever subtitle format arrives in the followingcueenter
.Furthermore, there was a slight issue with vertical alignment of caption cues when the player size was rather small.
Checklist (for PR submitter and reviewers)
CHANGELOG
entry