I am following this tutorial to implement the Exoplayer. But the ExtractorMediaSource class is deprecated. I need to play video from a remote url. What is the alternative to use in this situation?
val mediaSource = ExtractorMediaSource
.Factory(DefaultDataSourceFactory(context, userAgent))
.setExtractorsFactory(DefaultExtractorsFactory())
.createMediaSource(Uri.parse(url))
ExtractorMediaSource is deprecated.ProgressiveMediaSource is updated source factory
ProgressiveMediaSource.Factory(DefaultHttpDataSource.Factory())
.createMediaSource(MediaItem.fromUri(Uri.parse("url or path")))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With