Files
shaka-player/lib/config
Vincent Valot 5c24410560 feat: New autoShowText config to change initial text visibility behavior (#3421)
Adds a new autoShowText config to allow apps to choose the behavior of text visibility on startup.

The default is the old behavior (`AutoShowText.IF_SUBTITLES_MAY_BE_NEEDED`), which is to auto-enabled text only if we think subtitles may be needed.  This is when the user's preferred audio language is unavailable, but the preferred text language **is** available.

A new option has been added (`AutoShowText.IF_PREFERRED_TEXT_LANGUAGE`) that will only consider the user's preferred text language.  If a match is found, text is visible on startup.

Finally, we add two additional options that are extremely simple: `AutoShowText.ALWAYS` and `AutoShowText.NEVER`.  Applications that want complete control over text visibility without any "smart" choices made by the player can use these options.

Co-authored-by: Joey Parrish <joeyparrish@google.com>
2022-09-21 10:53:52 -07:00
..