Hi, In the new version of exoplayer, I get the following error:
This error in b4a reference to this code:
See this
B4X:
java.lang.RuntimeException: Constructor not found.
B4X:
Sub CreateMergedSource(Sources() As Object) As Object
Dim arr As JavaObject
arr.InitializeArray("com.google.android.exoplayer2.source.MediaSource", Sources)
Dim m As JavaObject
Return m.InitializeNewInstance("com.google.android.exoplayer2.source.MergingMediaSource", Array(arr))
End Sub
Sub CreateSingleSampleMediaSource (Uri As String) As Object
Dim format As JavaObject
format = format.InitializeStatic("com.google.android.exoplayer2.Format").RunMethod("createTextSampleFormat", Array(Null, "application/x-subrip", 1, "en"))
Dim source As JavaObject
Dim u As Uri
u.Parse(Uri)
Dim exo As JavaObject = player1
source.InitializeNewInstance("com.google.android.exoplayer2.source.SingleSampleMediaSource", Array(u, exo.RunMethod("createDefaultDataFactory", Null), _
format, -9223372036854775807)) ' error in this line (Constructor not found)
Return source
End Sub