I have used the exoplayer library to play video in my application. But I can not play youtube video link using exoplayer.
I am getting below exception:
ExoPlayerImplInternal: Source error. com.google.android.exoplayer2.source.UnrecognizedInputFormatException: None of the available extractors (MatroskaExtractor, FragmentedMp4Extractor, Mp4Extractor, Mp3Extractor, AdtsExtractor, Ac3Extractor, TsExtractor, FlvExtractor, OggExtractor, PsExtractor, WavExtractor) could read the stream.
I have searched on that but I have got the suggestion to use youtube android player API. But if we don't want to use youtube API. If anyone knows other option to play youtube video using exolayer only then please answer here.
It's not possible to obtain direct links to YouTube videos for playback by ExoPlayer.
YouTube's Android Player API is the officially supported way of playing YouTube videos in Android applications.
Unfortunate to hear the need to use different player to stream youtube videos. This is irony since youtube app is internally using ExoPlayer.
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