mirror of
https://github.com/shaka-project/shaka-player.git
synced 2026-06-16 16:16:40 +03:00
5c24410560
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>