Android Question Addo Exoplayer GetVideoTextLanguages2 questions

Scantech

Well-Known Member
Licensed User
Longtime User
B4X:
Dim jo As JavaObject = Player
Dim TrackGroups As JavaObject = jo.GetFieldJO("player").RunMethod("getCurrentTrackGroups", Null)
For i = 0 To TrackGroups.GetField("length") - 1
    Dim TrackGroup As JavaObject = TrackGroups.RunMethod("get", Array(i))
    For j = 0 To TrackGroup.GetField("length") - 1
        Dim Format As JavaObject = TrackGroup.RunMethodJO("getFormat", Array(j))
        Log(Format)
        Log(Format.GetField("label") & ":" & Format.GetField("sampleMimeType")) '音轨和字幕语言名称
        Log(Format.GetField("id") )
    Next
Next

The above code is the new method in the latest release of addoExoPlayer and i want to use the Player.SetTextLanguage2(??) function.

The format contains lots of data and you can obtain them by using Format.GetField("???"). It currently shows 3 types of fields examples (Label, SampleMimeType and id).

These are the formats retrieved.
Question 1: What is the field name for en, ar, el, is?
Question 2: Is there a documentation to point me to the right direction with field names?
Question 3: What is und? is that similar to auto?

Thanks in advance
 

Scantech

Well-Known Member
Licensed User
Longtime User
His example has been updated and demonstrates it. Ill look into it. Sorry for any inconvenience
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…