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))
Return source
End Sub