Skip to content

Should line:100% render the cue offscreen? #482

@jonknowles

Description

@jonknowles

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:

 ____________________________________________________________
|                         line:0%                            |
|                         line:10%                           |
|                         line:20%                           |
|                         line:30%                           |
|                         line:40%                           |
|                         line:50%                           |
|                         line:60%                           |
|                         line:70%                           |
|                         line:80%                           |
|_________________________line:90%___________________________| 
                          line:100%   

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions