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: WebVTT line not correctly positioned in UITextDisplayer (#4567) #4682

Merged
merged 4 commits into from
Nov 10, 2022

Conversation

Robloche
Copy link
Contributor

This PR intends to fix issue #4567.

As per spectification, here and there, my understanding is that a cue line with an optional alignment position end, e.g. line:91%,end, should have its bottom edge at 91% from the top of the screen.

But the current code places it at 91% from the bottom of the screen.

…roject#4567)

As stated in the specifications at
https://w3c.github.io/webvtt/#webvtt-line-cue-setting
and
https://w3c.github.io/webvtt/#webvtt-cue-line-alignment
the "end" modifier in the line alignment directive means that the box
is positioned from the top of the screen but relatively to its bottom
edge. The previous code actually positioned the box from the bottom of
the screen.
@google-cla
Copy link

google-cla bot commented Nov 10, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@avelad avelad added type: bug Something isn't working correctly priority: P2 Smaller impact or easy workaround component: WebVTT The issue involves WebVTT subtitles specifically labels Nov 10, 2022
@avelad avelad added this to the v4.3 milestone Nov 10, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Nov 10, 2022

Incremental code coverage: 60.00%

Copy link
Member

@joeyparrish joeyparrish left a comment

Choose a reason for hiding this comment

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

Overall, this looks correct. But before merging, I'm going to attempt to add a commit which creates a regression test, including screenshot comparisons generated in our lab.

If I can't figure out how to add that commit to your PR, I'll put it into a follow-up PR instead.

Thanks for the fix, and thanks for your patience!

@joeyparrish
Copy link
Member

New screenshots have been generated in the private lab for all supported platforms. When the GitHub test pass completes, I'll merge this PR. Thanks!

@joeyparrish joeyparrish merged commit 140aefe into shaka-project:main Nov 10, 2022
@Robloche
Copy link
Contributor Author

Thanks for the fix, and thanks for your patience!

I'm glad to help, and I know it's how open source works. Thanks to you for your dedication.

joeyparrish added a commit that referenced this pull request Dec 8, 2022
…4682)

As per spectification,
[here](https://w3c.github.io/webvtt/#webvtt-line-cue-setting) and
[there](https://w3c.github.io/webvtt/#webvtt-cue-line-alignment), my
understanding is that a cue line with an optional alignment position
`end`, e.g. `line:91%,end`, should have its bottom edge at 91% from the
top of the screen.

But the current code places it at 91% from the bottom of the screen.

Fixes #4567

Co-authored-by: Rodolphe Breton <[email protected]>
Co-authored-by: Joey Parrish <[email protected]>
joeyparrish added a commit that referenced this pull request Dec 8, 2022
…4682)

As per spectification,
[here](https://w3c.github.io/webvtt/#webvtt-line-cue-setting) and
[there](https://w3c.github.io/webvtt/#webvtt-cue-line-alignment), my
understanding is that a cue line with an optional alignment position
`end`, e.g. `line:91%,end`, should have its bottom edge at 91% from the
top of the screen.

But the current code places it at 91% from the bottom of the screen.

Fixes #4567

Co-authored-by: Rodolphe Breton <[email protected]>
Co-authored-by: Joey Parrish <[email protected]>
joeyparrish added a commit that referenced this pull request Dec 8, 2022
…4682)

As per spectification,
[here](https://w3c.github.io/webvtt/#webvtt-line-cue-setting) and
[there](https://w3c.github.io/webvtt/#webvtt-cue-line-alignment), my
understanding is that a cue line with an optional alignment position
`end`, e.g. `line:91%,end`, should have its bottom edge at 91% from the
top of the screen.

But the current code places it at 91% from the bottom of the screen.

Fixes #4567

Co-authored-by: Rodolphe Breton <[email protected]>
Co-authored-by: Joey Parrish <[email protected]>
@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
component: WebVTT The issue involves WebVTT subtitles specifically priority: P2 Smaller impact or easy workaround status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants