mirror of
https://github.com/androidx/media.git
synced 2025-05-06 23:20:42 +08:00

Numerical lines conceptually map to a grid of lines in the viewport, with the Cue text lines being aligned to one of the viewport lines. It doesn't make sense to position a single-line cue differently based on lineAnchor when it's expected to 'snap' to a particular line on the viewport grid. So we redefine the position to be in terms of the cue lines rather than the bounds of the cue box. It's also not possible to always handle ANCHOR_TYPE_MIDDLE when lineType=NUMBER (as it relies on the number of lines in the cue being odd), so it's easier to ignore lineAnchor completely. PiperOrigin-RevId: 318034664