AVPlayerviewcontroller metadata tab menu inconsistent values

we are working on a tvOS app with video player (AVPlayerviewcontroller), and we re expiring inconsistent behavior with the language and audio displayed info. (the same behavior is on iOS).


Our master-playlist:

#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="AUDIO_96000",NAME="ITALIANO (STEREO)",DEFAULT=NO,AUTOSELECT=NO,LANGUAGE="it"

#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="AUDIO_96000",NAME="INGLESE (STEREO)",DEFAULT=YES,AUTOSELECT=YES,LANGUAGE="en",URI="r16.m3u8"


And the player shows up:

We expect to display the value of NAME, instead some value is filled using LANGUAGE TAG and others using NAME TAG, it seems there is some rules according with OS Language (in the picture the OS is italian).

Our goals is to show up the value of NAME TAG, in according with HLS Standards, and avoid to set autoselect to YES, because we need to start the playback with Italian language.

How should we manage the playlist to achieve this goal?

Can we use some API on AVPlayerViewController to replace the text using NAME TAG value?


Thank you

Replies

We're aware of this issue. The underlying problem is that the "LANGUAGE" tag specifies the language of the audio, and there is no direct way to specify the language of the "NAME" tag. The system currently applies a heuristic to decide whether to use the value of the "NAME" tag or to use some other localized text instead. (It's possible that you might get different results on iOS and tvOS, too.)


I urge you to file a bug report describing your use case, so that it can be considered in possible future improvements. (If you do, please post the bug number here for reference.)


As a partial workaround, you can force the "NAME" tag to be displayed if you specify "AUTOSELECT=NO", and also omit the "LANGUAGE" tag on that line. This may or may not be possible in your scenario.


(BTW, you said that you wanted to avoid AUTOSELECT=YES and default to Italian language, but in your above example you actually set AUTOSELECT=YES,DEFAULT=YES for the English language audio.)