You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my application, we are creating a fullscreen player view where we create a builder of the exoplayer and pass the media that we want to play into it. In that media, we have close captions in two languages, we have English and Português.
When the player is loaded and I click on the close captions button to open the menu to select the languages I get the options "None", "English" and "Unknown", this last one is not correct.
After doing some debugging, I noticed that in the DefaultTrackNameProvider existed this chunk of code in which the returning language string is empty
Is it possible for the fallback here to be the format.language value and not an empty language, and rely on the values of the language labels defined in the captions of the media?
Expected result
Have the correct language labels in the menu of the close captions
The Format.language in that section of code from your screencapture shouldn't have "português" as that is not a valid IETF BCP 47 language tag. It should be "pt".
I tested that if the format.language was "pt" then languageLocale.getDisplayName would return "português".
Can I ask what media you are trying to play and if you may provide it? It may be that the media is providing an incorrect language tag value in its manifest or container.
@microkatz Ok yes, we have an issue there but shouldn't in these cases where the languageName is empty the return be the value that we have in format.language to avoid displaying "Unknown"
Version
Media3 1.2.0
More version details
No response
Devices that reproduce the issue
Pixel 6 running Android 14
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Not tested
Reproduction steps
In my application, we are creating a fullscreen player view where we create a builder of the exoplayer and pass the media that we want to play into it. In that media, we have close captions in two languages, we have English and Português.
When the player is loaded and I click on the close captions button to open the menu to select the languages I get the options "None", "English" and "Unknown", this last one is not correct.
After doing some debugging, I noticed that in the
DefaultTrackNameProvider
existed this chunk of code in which the returning language string is emptyIs it possible for the fallback here to be the
format.language
value and not an empty language, and rely on the values of the language labels defined in the captions of the media?Expected result
Have the correct language labels in the menu of the close captions
Actual result
Have the "Unknown" label for "Português" language
Media
Bug Report
adb bugreport
to android-media-github@google.com after filing this issue.The text was updated successfully, but these errors were encountered: