-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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) Subtitles are shown stacked #3152
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks! I'm going to add a regression test to our screenshot-based UI layout tests after this is merged.
All tests passed! |
In issue #3151, some TVs showed subtitles stacked on one another when one should have expired. This only occurred on some platforms because it required very specific values for video.currentTime at the exact moment the UI text displayer calculated visibility. Limited precision on video.currentTime on some platforms may have exposed the edge case, but it was always possible. PR #3152 fixed the issue by correcting the visibility calculation. Cue end times should be excluded from their visibility range, i.e. (start, end]. This adds a new regression test for this edge case using our screenshot-based layout tests. Note that the behavior can only be controlled when we control text display through the UI. When using native text display from the browser, the exact visibility and interpretation of timing is entirely up to the browser. As of Feb 2021, Chrome, Edge, and Safari all do it wrong, and Firefox does it right. Change-Id: I2cdb8a2a759960d5ed8ce8790bf9daaeb2a335eb
JFYI, Chrome, Edge, and Safari all get this wrong in their native cue rendering. FF & IE/legacy Edge get it right. I filed these issues with the browser vendors to make the same/similar fix in the browser for native cue display:
|
We've seen some SmartTVs show one subtitle without removing the previous one. I think this is happening because two different subtitles may meet the condition of "greater or equal than" and "lower or equal than" at the same time. After changing the greater than or equal with a greater than subtitles were fixed. @joeyparrish will add a regression test after this fix. Closes #3151
In issue #3151, some TVs showed subtitles stacked on one another when one should have expired. This only occurred on some platforms because it required very specific values for video.currentTime at the exact moment the UI text displayer calculated visibility. Limited precision on video.currentTime on some platforms may have exposed the edge case, but it was always possible. PR #3152 fixed the issue by correcting the visibility calculation. Cue end times should be excluded from their visibility range, i.e. (start, end]. This adds a new regression test for this edge case using our screenshot-based layout tests. Note that the behavior can only be controlled when we control text display through the UI. When using native text display from the browser, the exact visibility and interpretation of timing is entirely up to the browser. As of Feb 2021, Chrome, Edge, and Safari all do it wrong, and Firefox does it right. Backported to v3.0.x Change-Id: I2cdb8a2a759960d5ed8ce8790bf9daaeb2a335eb
We've seen some SmartTVs show one subtitle without removing the previous one. I think this is happening because two different subtitles may meet the condition of "greater or equal than" and "lower or equal than" at the same time. After changing the greater than or equal with a greater than subtitles were fixed. @joeyparrish will add a regression test after this fix. Closes #3151
This PR solves issue #3151.
We've seen some SmartTVs show one subtitle without removing the previous one.
I think this is happening because two different subtitles may meet the condition of "greater or equal than" and "lower or equal than" at the same time. After changing the greater than or equal with a greater than subtitles were fixed.