Private Sub CreateUriSource(Uri As String) As Object
Dim ctxt As JavaObject
ctxt.InitializeContext
Dim HttpDataSourceFactory As JavaObject
HttpDataSourceFactory.InitializeNewInstance("androidx.media3.datasource.DefaultHttpDataSource$Factory", Null)
HttpDataSourceFactory.RunMethod("setAllowCrossProtocolRedirects", Array(True))
Dim DataSource As JavaObject = HttpDataSourceFactory.RunMethod("createDataSource", Null)
Dim DataSourceFactory As JavaObject = ctxt.CreateEvent("androidx.media3.datasource.DataSource.Factory", "", DataSource)
Dim ProgressiveMediaSourceFactory As JavaObject
ProgressiveMediaSourceFactory.InitializeNewInstance("androidx.media3.exoplayer.source.ProgressiveMediaSource.Factory", Array(DataSourceFactory))
Dim MediaItem As JavaObject
MediaItem.InitializeStatic("androidx.media3.common.MediaItem")
Return ProgressiveMediaSourceFactory.RunMethod("createMediaSource", Array(MediaItem.RunMethod("fromUri", Array(Uri))))
End Sub