Tweak Cue.line javadoc again to reflect WebVTT spec

It's interesting WebVTT explicitly handles line & position differently
in horizontal-rl/lr and vertical-lr/rl contexts. position is always
measured from the left of the viewport, even for rtl text, but line in
vertical-rl is measured from the right of the viewport.

We don't have to make Cue match WebVTT (I can go change the WebVTT
decoding instead) but it seems a reasonable 'default' to follow.

PiperOrigin-RevId: 304353900
This commit is contained in:
ibaker 2020-04-02 10:00:33 +01:00 committed by Oliver Woodman
parent dc4118da7b
commit f3c7c88d7c

View File

@ -154,9 +154,10 @@ public final class Cue {
* <ul> * <ul>
* <li>For {@link #TYPE_UNSET} (i.e. horizontal), this is the vertical position relative to the * <li>For {@link #TYPE_UNSET} (i.e. horizontal), this is the vertical position relative to the
* top of the viewport. * top of the viewport.
* <li>For {@link #VERTICAL_TYPE_LR} and {@link #VERTICAL_TYPE_RL} (i.e. vertical), this is the * <li>For {@link #VERTICAL_TYPE_LR} this is the horizontal position relative to the left of the
* horizontal position relative to the left of the viewport. Note that positioning is * viewport.
* relative to the left of the viewport even in the case of vertical-growing-left text. * <li>For {@link #VERTICAL_TYPE_RL} this is the horizontal position relative to the right of
* the viewport.
* </ul> * </ul>
*/ */
public final float line; public final float line;