-
Notifications
You must be signed in to change notification settings - Fork 31
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
Should line:100% render the cue offscreen? #482
Comments
I think the repositioning is speced by step 10.4 (The "...WebVTT cue snap-to-lines flag is false" branch) in [1]:
|
Excellent, thank you @fsoder for pointing that out, that section definitely seems to be the source for that vtt.js function, and it seems to imply that (even if there's only one cue box, I assume), it should be moved to the closest position onscreen. |
I really need to go through the PRs against this repo... |
The spec says that line "offsets the cue box from the top, the right or left of the video viewport". I understand this to mean that for horizontal cues, the top of the cue box is offset from the top of the viewport in proportion to the percentage value of the line setting (or by some factor of line-height for integer line settings). So a line:0% would be flush to the top of the viewport. If that is so, it seems like line:100% cues should be offset all the way offscreen at the bottom of the viewport, like so:
I noticed that Chrome will keep line:100% cues on screen, but Firefox lets them go offscreen. The videojs/vtt.js implementation seems to have logic to nudge the line:100% cue back onto the viewport here: https://github.com/videojs/vtt.js/blob/master/lib/process/move-box-to-line-position.js#L14:L40
But I don't see this behavior defined in the spec (maybe I'm overlooking something). I Is it expected that line:100% cues will be rendered offscreen?
The text was updated successfully, but these errors were encountered: