-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(text): Fix TTML render timing and line break issues (#4407)
This changes the `SimpleTextDisplayer` to flatten text payloads only starting at non-container cues. Not doing so poses an issue with 'rolled over' caption lines. E.g., consider: - TTML file `N` with caption line `A` from time `[1.4, 2.1]`. - TTML file `N+1` with caption lines `A` from time `[1.4, 2.4]` and `B` from time `[2.4, 3.4]`. If captions `A` and `B` are descendants of two different `<p>` elements, Shaka currently flattens the text payload from `A` and `B` into a single cue that is rendered onto the display from time `[1.4, 3.4]`. Therefore, caption `A`'s text payload is incorrectly showing during time `[2.4, 3.4]`. The fix updates the `SimpleTextDisplayer#append()` logic to split up individual non-container cues into their own `VTTCue` object. This will not be done at the `TTMLTextParser` level to ensure proper style inheritance still occurs for the (actual) text cues. Closes #4381
- Loading branch information
1 parent
37adeb2
commit 0e626c0
Showing
2 changed files
with
48 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters