Previously, the automatically selected subtitle track
has not been marked (with check mark) in subtitle track list,
just like audio track.
But, in subtitle track option UI, there is no 'auto' option,
which is different from audio track selection menu.
This CL marks the auto selected subtitle track name in the cc list.
PiperOrigin-RevId: 320802575
AdDisplayContainer now takes the video ad player at construction time,
and obstructions are registered/unregistered via a new method. Also
'content complete' is now notified via ad callbacks rather than the
AdsLoader.
PiperOrigin-RevId: 320567666
The system services may return a null value if the service is
not available. Guard against this by falling back to default values.
PiperOrigin-RevId: 319187882
This fixes an issue where, even if captioning manager is disabled, the latest used captioning manager preference
related to text size is being applied.
In order to replicate:
1. Go to Captioning Preferences under device Settings and enable it
2. Change the text size to "very large"
3. Observe the selected text size is used for subtitles, for example in Youtube
4. Go to Captioning Preferences under device Settings and disable it
5. Observe the text size used for subtitles does not come back to normal, stays on "very large"
The existing code moves a multi-line cue box by multiples of the height
of the whole cue box (incorrect), rather than multiples of the first
line of text (correct). These two are equivalent for single-line cues,
which is why I didn't initially spot the problem.
PiperOrigin-RevId: 318036793
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
This removes a lot of duplication from the module configuration,
avoids divergence, and makes sure that only the important differences
to the default are visible in each module file.
PiperOrigin-RevId: 318024823
Some of the CSS font sizes are derived from the current view height, if
this calculation is done before the view has been measured then a zero
view height results in a zero px font size and no visible text.
This can happen when the view type is changed (and so the
WebViewSubtitleOutput has been recently added to the SubtitleView
ViewGroup).
PiperOrigin-RevId: 311552052
It displays images too, and in fact it's used exclusively to display
images in SubtitleWebView. It also doesn't use a TextView - so all round
a slightly confusing name.
Also rename SubtitleWebView to WebViewSubtitleOutput to match the same
pattern.
PiperOrigin-RevId: 311312758
This allows properties to propagate when switching view types
(e.g. bottomPaddingFraction).
It also allows the style-stripping code to be pushed up to SubtitleView
and therefore shared.
PiperOrigin-RevId: 310353534
Users of addTextOutput should instead query the current cues if they
need them. This is more consistent with how other listeners are handled.
PiperOrigin-RevId: 310112241
This is a more specific ViewGroup subclass that handles some of the
layout logic automatically. It's designed to work best with a single
child view, as used here.
PiperOrigin-RevId: 306654947