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

fix(text): Fix cue region rendering in UI #4412

Merged
merged 5 commits into from
Aug 16, 2022

Conversation

joeyparrish
Copy link
Member

Both TTML and VTT regions should be thought of as separate elements
from the cue structures they contain. To this end, the UI text
displayer now creates separate region elements to represent CueRegion
objects, and the Cues attached to them nest inside those region
elements in the DOM.

Closes #4381

Both TTML and VTT regions should be thought of as separate elements
from the cue structures they contain.  To this end, the UI text
displayer now creates separate region elements to represent CueRegion
objects, and the Cues attached to them nest inside those region
elements in the DOM.

Closes shaka-project#4381
@github-actions
Copy link
Contributor

github-actions bot commented Aug 16, 2022

Incremental code coverage: 98.53%

lib/text/ui_text_displayer.js Outdated Show resolved Hide resolved
lib/text/ui_text_displayer.js Outdated Show resolved Hide resolved
lib/text/ui_text_displayer.js Outdated Show resolved Hide resolved
@joeyparrish joeyparrish marked this pull request as ready for review August 16, 2022 23:01
@joeyparrish joeyparrish requested a review from theodab August 16, 2022 23:01
@joeyparrish joeyparrish merged commit b1f46db into shaka-project:main Aug 16, 2022
@joeyparrish joeyparrish deleted the fix-ui-cue-regions branch August 16, 2022 23:37
joeyparrish added a commit that referenced this pull request Aug 16, 2022
Both TTML and VTT regions should be thought of as separate elements
from the cue structures they contain.  To this end, the UI text
displayer now creates separate region elements to represent CueRegion
objects, and the Cues attached to them nest inside those region
elements in the DOM.

Closes #4381
Copy link
Contributor

@JulianDomingo JulianDomingo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late review. Was familiarizing myself with the ui_text_displayer code in the process, but looks good!

joeyparrish added a commit that referenced this pull request Aug 17, 2022
Both TTML and VTT regions should be thought of as separate elements
from the cue structures they contain.  To this end, the UI text
displayer now creates separate region elements to represent CueRegion
objects, and the Cues attached to them nest inside those region
elements in the DOM.

Closes #4381
joeyparrish added a commit that referenced this pull request Aug 17, 2022
Both TTML and VTT regions should be thought of as separate elements
from the cue structures they contain.  To this end, the UI text
displayer now creates separate region elements to represent CueRegion
objects, and the Cues attached to them nest inside those region
elements in the DOM.

Closes #4381
joeyparrish added a commit that referenced this pull request Aug 17, 2022
Both TTML and VTT regions should be thought of as separate elements
from the cue structures they contain.  To this end, the UI text
displayer now creates separate region elements to represent CueRegion
objects, and the Cues attached to them nest inside those region
elements in the DOM.

Closes #4381
joeyparrish added a commit to joeyparrish/shaka-player that referenced this pull request Aug 29, 2022
Without an explicit size, some platforms render bitmap-based cues as
0x0.  This effect was seen in Chrome on Mac in particular.  This
started with PR shaka-project#4412, where we factored out regions into their own
element.

The TTML spec says that background images should fill their associated
region, so this fixes the issue by making the div explicitly the size
of its parent element (100% x 100%).
joeyparrish added a commit that referenced this pull request Aug 30, 2022
Without an explicit size, some platforms render bitmap-based cues as
0x0.  This effect was seen in Chrome on Mac in particular.  This
started with PR #4412, where we factored out regions into their own
element.

The TTML spec says that background images should fill their associated
region, so this fixes the issue by making the div explicitly the size
of its parent element (100% x 100%).
avelad pushed a commit that referenced this pull request Aug 31, 2022
Without an explicit size, some platforms render bitmap-based cues as
0x0.  This effect was seen in Chrome on Mac in particular.  This
started with PR #4412, where we factored out regions into their own
element.

The TTML spec says that background images should fill their associated
region, so this fixes the issue by making the div explicitly the size
of its parent element (100% x 100%).
avelad pushed a commit that referenced this pull request Aug 31, 2022
Without an explicit size, some platforms render bitmap-based cues as
0x0.  This effect was seen in Chrome on Mac in particular.  This
started with PR #4412, where we factored out regions into their own
element.

The TTML spec says that background images should fill their associated
region, so this fixes the issue by making the div explicitly the size
of its parent element (100% x 100%).
avelad pushed a commit that referenced this pull request Aug 31, 2022
Without an explicit size, some platforms render bitmap-based cues as
0x0.  This effect was seen in Chrome on Mac in particular.  This
started with PR #4412, where we factored out regions into their own
element.

The TTML spec says that background images should fill their associated
region, so this fixes the issue by making the div explicitly the size
of its parent element (100% x 100%).
avelad pushed a commit that referenced this pull request Aug 31, 2022
Without an explicit size, some platforms render bitmap-based cues as
0x0.  This effect was seen in Chrome on Mac in particular.  This
started with PR #4412, where we factored out regions into their own
element.

The TTML spec says that background images should fill their associated
region, so this fixes the issue by making the div explicitly the size
of its parent element (100% x 100%).
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Jul 25, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ttml subtitle position different with shaka-player 3.2.0 and 4.1.1
3 participants