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

Clarify line cue setting specification. #399

Merged
merged 4 commits into from
Nov 18, 2017
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1869,15 +1869,16 @@ given:</p>
</ol>

<p class="note">A <a>WebVTT line cue setting</a> configures the offset of the cue box from the video
viewport's edge in the direction opposite to the <a lt="WebVTT cue writing direction">writing
direction</a>. For horizontal cues, this is the vertical offset from the top of the video viewport.
The offset is for the <a lt="WebVTT cue line start alignment">start</a>, <a lt="WebVTT cue line
center alignment">center</a>, or <a lt="WebVTT cue line end alignment">end</a> of the cue box,
depending on the <a>WebVTT cue line alignment</a> value - <a lt="WebVTT cue line start
alignment">start</a> by default. The offset can be given either as a percentage of the video
dimension or as a line number. Line numbers are based on the size of the first line of the cue.
Positive line numbers count from the start of the video viewport (the first line is numbered 0),
negative line numbers from the end of the viewport (the last line is numbered &#x2212;1).</p>
viewport's edge in the direction orthogonal to the <a lt="WebVTT cue writing direction">writing
direction</a>. For horizontal cues, this is the vertical offset from the top of the video viewport,
for vertical cues, it's the horizontal offset. The offset is for the <a lt="WebVTT cue line start
alignment">start</a>, <a lt="WebVTT cue line center alignment">center</a>, or <a lt="WebVTT cue line
end alignment">end</a> of the cue box, depending on the <a>WebVTT cue line alignment</a> value - <a
lt="WebVTT cue line start alignment">start</a> by default. The offset can be given either as a
percentage of the video dimension or as a line number. Line numbers are based on the size of the
Copy link
Contributor

Choose a reason for hiding this comment

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

This is the size in the block progression direction, i.e. the vertical height for horizontal cues, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks, I think the bit I was focusing on here was "percentage of the video dimension" which seems vague, since it's a two dimensional thing, and in general not square. Suggestion would be to qualify it by saying something like "percentage of the relevant writing-mode dependent video dimension"

Copy link
Member Author

Choose a reason for hiding this comment

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

OK

Copy link
Member Author

Choose a reason for hiding this comment

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

@nigelmegitt please see PR #420

first line of the cue. Positive line numbers count from the start of the video viewport (the first
line is numbered 0), negative line numbers from the end of the viewport (the last line is numbered
Copy link
Contributor

Choose a reason for hiding this comment

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

Is is true that start == (top or left) and end == (bottom or right)? Or are those terms writing mode dependent, i.e. end could be the left in rtl?

Copy link
Member Author

@silviapfeiffer silviapfeiffer Dec 2, 2017

Choose a reason for hiding this comment

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

I'll quote from the spec, which answers your question:

A line alignment
An alignment for the cue box’s line, one of:

Start alignment
The cue box’s top side (for horizontal cues), left side (for vertical growing right), or right side (for vertical growing left) is aligned at the line.

Center alignment
The cue box is centered at the line.

End alignment
The cue box’s bottom side (for horizontal cues), right side (for vertical growing right), or left side (for vertical growing left) is aligned at the line.

By default, the line alignment is set to start.

The line alignment is separate from the text alignment — right-to-left vs. left-to-right cue text does not affect the line alignment.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks, I thought so. I'm not sure why I was asking now, probably I was worried about the meaning of "start" being clear, but it is well defined. This looks fine to me now.

&#x2212;1).</p>

<p>A <dfn>WebVTT position cue setting</dfn> consists of the following components, in the order
given:</p>
Expand Down
Loading