lineType

The type of the value from line.

LineType.LineTypeFraction indicates that line is a fractional position within the viewport.

LineType.LineTypeNumber indicates that line is a line number, where the size of each line is taken to be the size of the first line of the cue. When line is greater than or equal to 0 lines count from the start of the viewport, with 0 indicating zero offset from the start edge. When line is negative lines count from the end of the viewport, with -1 indicating zero offset from the end edge. For horizontal text the line spacing is the height of the first line of the cue, and the start and end of the viewport are the top and bottom respectively.

Note that it's particularly important to consider the effect of lineAnchor when using LineType.LineTypeNumber. (line == 0 && lineAnchor == ANCHOR_TYPE_START) positions a (potentially multi-line) cue at the very top of the viewport. (line == -1 && lineAnchor == ANCHOR_TYPE_END) positions a (potentially multi-line) cue at the very bottom of the viewport. (line == 0 && lineAnchor == ANCHOR_TYPE_END) and (line == -1 && lineAnchor == ANCHOR_TYPE_START) position cues entirely outside of the viewport. (line == 1 && lineAnchor == ANCHOR_TYPE_END) positions a cue so that only the last line is visible at the top of the viewport. (line == -2 && lineAnchor == ANCHOR_TYPE_START) position a cue so that only its first line is visible at the bottom of the viewport.