title: Exoplayer for android, trying to stream a m3u8 file and getting error: None of the available extractors could read the stream
body: <p>I am trying to stream an m3u8 file and I am getting an error.
  The url I am using is the following: <a href="http://storage.googleapis.com/videos.siku.org/10005/dash/master.m3u8" rel="noreferrer">http://storage.googleapis.com/videos.siku.org/10005/dash/master.m3u8</a>
  This streaming video does work in a browser. 
  I am getting the following error at runtime: </p>
  
  <blockquote>
    <p>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, AmrExtractor, Ac4Extractor, FlacExtractor) could read the stream.
            at com.google.android.exoplayer2.source.ProgressiveMediaPeriod$ExtractorHolder.selectExtractor(ProgressiveMediaPeriod.java:1090)
            at com.google.android.exoplayer2.source.ProgressiveMediaPeriod$ExtractingLoadable.load(ProgressiveMediaPeriod.java:969)
            at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:391)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
            at java.lang.Thread.run(Thread.java:764)</p>
  </blockquote>
  
  <p>I am using the class <a href="https://stackoverflow.com/questions/59439625/how-to-implement-exoplayer-2-11-1-in-android/59441454#59441454">ExoPlayerHelper</a> (which was taken from a stackoverflow question, although I did implement this the recommended way and I was getting the same error)</p>
  
  <p>Here is the class I am using: </p>
  
  <pre><code>class ExoPlayerHelper(
      private val playerView: PlayerView,
      onError: (ExoPlaybackException) -&gt; Unit,
      onPlayerBuffer: (Boolean) -&gt; Unit
  ) {
      private var exoPlayer: ExoPlayer? = null
      private var mediaSource: ProgressiveMediaSource? = null
      private val playerListener = object : Player.EventListener {
          override fun onPlayerError(error: ExoPlaybackException) {
              super.onPlayerError(error)
              onError(error)
          }
  
          override fun onPlayerStateChanged(playWhenReady: Boolean, playbackState: Int) {
              super.onPlayerStateChanged(playWhenReady, playbackState)
              onPlayerBuffer(playbackState == Player.STATE_BUFFERING)
          }
      }
  
      fun initializePlayer(url: String) {
          exoPlayer = SimpleExoPlayer.Builder(playerView.context).build()
          exoPlayer!!.repeatMode = Player.REPEAT_MODE_ALL
          exoPlayer!!.addListener(playerListener)
          playerView.player = exoPlayer
  
          val userAgent =
              Util.getUserAgent(playerView.context, playerView.context.getString(R.string.app_name))
          mediaSource = ProgressiveMediaSource
              .Factory(
                  DefaultDataSourceFactory(playerView.context, userAgent),
                  DefaultExtractorsFactory()
              )
              .createMediaSource(Uri.parse(url))
              exoPlayer!!.prepare(mediaSource!!, true, false)
              exoPlayer!!.playWhenReady = true
          }
      }
  }
  </code></pre>
  
  <p>I do get a blank com.google.android.exoplayer2.ui.PlayerView with the controls appearing. 
  When pressing the play button I get the same error message:</p>
  
  <blockquote>
    <p>com.google.android.exoplayer2.ExoPlaybackException: com.google.android.exoplayer2.source.UnrecognizedInputFormatException: None of the available extractors (MatroskaExtractor, FragmentedMp4Extractor, Mp4Extractor, Mp3Extractor, AdtsExtractor, Ac3Extractor, TsExtractor, FlvExtractor, OggExtractor, PsExtractor, WavExtractor, AmrExtractor, Ac4Extractor, FlacExtractor) could read the stream.</p>
  </blockquote>
  
  <p>Any clues as to why I am getting this error UnrecognizedInputFormatException? </p>