Hello everyone and thank you for your help.
Looking a bit about the 'Exoplayer' library, I found the following code where it allows you to see the audio and subtitles that are in the video.
When using this code, I find the audio and subtitle tracks, but I don't know how to select any of the audio tracks (Audios of different languages) or the subtitles.
--
I know that 'exoplayer' has the option of being able to change the audio track or select subtitle and make it visible in the current player.
If anyone can help me or give me an idea of how to work with the 'exoplayer' library using Javaobject.
regards
Looking a bit about the 'Exoplayer' library, I found the following code where it allows you to see the audio and subtitles that are in the video.
B4X:
Sub Player_TrackChanged
Dim jo As JavaObject = player1
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))
Dim mime As String = Format.GetField("sampleMimeType")
Log(mime)
If mime.StartsWith("audio") Then
Log("audio track")
End If
Next
Next
End Sub
When using this code, I find the audio and subtitle tracks, but I don't know how to select any of the audio tracks (Audios of different languages) or the subtitles.
--
I know that 'exoplayer' has the option of being able to change the audio track or select subtitle and make it visible in the current player.
If anyone can help me or give me an idea of how to work with the 'exoplayer' library using Javaobject.
regards