Looking at the ExoPlayer documentation, the "Hello World" example suggests that to play a standard video you should use a ProgressiveMediaSource
(compared to many online tutorials I've seen suggesting you use an ExtractorMediaSource
)
Looking at the source code for ExoPlayer, it claims that ExtractorMediaSource
is deprecated, and ProgressiveMediaSource
has replaced it:
/** @deprecated Use {@link ProgressiveMediaSource} instead. */
In my own project I'm using ExoPlayer v2.9.5 -- which is the latest version on jcenter, released February 2019
Yet when I try to instantiate a ProgressiveMediaSource
, I get the error:
Cannot resolve symbol 'ProgressiveMediaSource'
Why can I not locate this class? What am I doing wrong?
I found that by clicking on this tab, newer versions of ExoPlayer were listed.
ProgressiveMediaSource
was added in version 2.10.0
However version 2.10.0 also made the switch from the Android Support Library to AndroidX, so you will have to upgrade your whole project to AndroidX if you wish to use it.
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