Android Question Addo GetVideoTextLanguages2 issues

Scantech

Well-Known Member
Licensed User
Longtime User
I was just testing the new GetVideoTextLanguages2 method. It poses some issues. Few of the movies does not show anything in the map
B4X:
Sub Player_GetVideoTextLanguages2(Subtitles As Map)

The Subtitles is empty
(MyMap) {}

When i use this
B4X:
Sub test1
    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
End Sub

It has results
(Format) Format(1, null, null, video/avc, avc1.640028, -1, null, [1920, 1080, 23.976025, ColorInfo(Unset color space, Unset color range, Unset color transfer, false, 8bit Luma, 8bit Chroma)], [-1, -1])
null:video/avc
1
(Format) Format(2, null, null, audio/mp4a-latm, mp4a.40.2, 139912, en, [-1, -1, -1.0, null], [2, 44100])
null:audio/mp4a-latm
2

It shows 2 of them. English and not sure about the first one? Why does a 3rd party iptv app shows English and Italian as subtitle?
 

Scantech

Well-Known Member
Licensed User
Longtime User
I feel like a fool. There were 3 similar video name and 2 has no subtitles. Delete this thread.
 
Upvote 0
Top