-
Notifications
You must be signed in to change notification settings - Fork 40
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
Add some introductory paragraphs to the Data model section. #409
Add some introductory paragraphs to the Data model section. #409
Conversation
This is to explain the box model and how settings work on cues and regions.
@dwsinger please review |
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.
Proposed rewording for easier parsing.
index.bs
Outdated
group cues together. Cues are positioned either inside the video viewport directly or inside a | ||
region, which is positioned inside the video viewport.</p> | ||
|
||
<p class=note>A set of cue settings position cues inside the video viewport. A set of region |
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.
A set of cue settings position cues inside the video viewport.
is really hard to parse. How about:
The positions of cues inside the video viewport are defined by a set of cue settings.
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.
ok, thanks.
index.bs
Outdated
|
||
<p class=note>A set of cue settings position cues inside the video viewport. A set of region | ||
settings position regions inside the video viewport. Cues that are inside regions can only use a | ||
limited set of their cue settings. Specifically, if the cue has a "vertical", "line" or "size" |
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.
Likewise:
The positions of regions inside the video viewport are defined by a set of region settings.
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.
ok.
index.bs
Outdated
settings position regions inside the video viewport. Cues that are inside regions can only use a | ||
limited set of their cue settings. Specifically, if the cue has a "vertical", "line" or "size" | ||
setting, the cue drops out of the region. Otherwise, the cue's width is calculated to be relative to | ||
the region width rather than the viewport. </p> |
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.
I'd like to see an extra sentence in here clarifying if regions act as clipping area for the cues within them or if they are only positioning constructs.
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.
"Clipping" is not the right word: if a cue text is longer than the region width allows, it will be broken into another line - that's what CSS does for us.
The definition of region width already states that a cue is to be rendered within the region's width: https://www.w3.org/TR/webvtt1/#webvtt-region-width
A width
A number giving the width of the box within which the text of each line of the containing cues is to be rendered, to be interpreted as a percentage of the video width. Defaults to 100.
You'll notice that if the cue has an explicit "size" setting, it drops out of the region. A cue's default size is 100%. For regions this is relative to the region width. Therefore, the cue's width is the same as the region's width.
How would you like me to say this?
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.
Gosh, right, there are lots of things to unpack here.
Firstly, in terms of clipping behaviour I think you're saying that there is a combination of wrapping and clipping, so that the clipping only ever occurs in the block progression direction, by means of losing whole lines. The consequence is that no cue text is ever displayed outside the region that the cue is in. However if the text size is such that the whole cue does not fit within the region, there may be some lines of text that are never visible. The general rule is that lines that do not fit in their cue's region are not displayed. Those points are worth stating.
Secondly, I can't see in the parsing and processing models why cues with a "size" setting drop out of the region. If they drop out, where do they go? Are they dropped on the floor, or displayed somewhere else outside the region?
The same is true for the "vertical" and "line" settings: in all three cases I could not find algorithmic steps switched on the presence or absence of those settings that modify the position to be either region-based or viewport-based. Please could you point me to where that happens?
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.
"Dropping out of a region" merely means that they are not rendered within the region, but rendered in their own right with the settings given.
Looks like there are some things missing in the parsing algorithm. I'll add some text. Thanks for noticing.
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.
You're welcome. By the way, this is exactly the kind of thing that's in my mind when I grump about algorithmic specifications and the ability for the WG to test that they do what they're supposed to do.
Please check the last comment - first two comments have been addressed. |
index.bs
Outdated
setting, the cue drops out of the region. Otherwise, the cue's width is calculated to be relative to | ||
the region width rather than the viewport. </p> | ||
<p class=note>The position of a cue inside the video viewport is defined by a set of cue settings. | ||
The position of a region inside the video viewport is defined through a set of region settings. Cues |
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.
Probably we should be consistent about the use of "by" or "through". I'd go for "by" in both places.
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.
OK :-)
Also added more help text to the README.
This happens for cues that have a vertical, line or size cue setting.
@nigelmegitt ready for re-review |
|
||
To format the index.bs file, run: | ||
|
||
$ ./format.py index.bs |
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.
This seems like it has nothing to do with #383, but whatever, no big deal.
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.
Yeah, it's just for future editors - had to come in somewhere. ;-)
This is to explain the box model and how settings work on cues and regions.
closes issue #383