Skip to content

Close caption menu with the Unknown label for the Português language #988

@elimasword

Description

@elimasword

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.

Screenshot 2024-01-17 at 09 26 10

After doing some debugging, I noticed that in the DefaultTrackNameProvider existed this chunk of code in which the returning language string is empty

Screenshot 2024-01-17 at 09 17 37

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

Actual result

Have the "Unknown" label for "Português" language

Media

Screenshot 2024-01-17 at 09 26 10

Bug Report

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions