title: Unable to catch ExoPlaybackException: Source error
body: <p>No matter what I try, I am not able to catch &quot;ExoPlaybackException: Source error&quot; error. The video playback stops and I can see Exoplayer error thrown.
  The Stacktrace is below:</p>
  <pre><code>2021-02-09 22:36:51.917 27876-19080/com.... E/ExoPlayerImplInternal: Playback error
        com.google.android.exoplayer2.ExoPlaybackException: Source error
          at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:554)
          at android.os.Handler.dispatchMessage(Handler.java:103)
          at android.os.Looper.loop(Looper.java:237)
          at android.os.HandlerThread.run(HandlerThread.java:67)
       Caused by: com.google.android.exoplayer2.source.BehindLiveWindowException
          at com.google.android.exoplayer2.source.hls.HlsChunkSource.getNextChunk(HlsChunkSource.java:308)
          at com.google.android.exoplayer2.source.hls.HlsSampleStreamWrapper.continueLoading(HlsSampleStreamWrapper.java:662)
          at com.google.android.exoplayer2.source.CompositeSequenceableLoader.continueLoading(CompositeSequenceableLoader.java:80)
          at com.google.android.exoplayer2.source.hls.HlsMediaPeriod.continueLoading(HlsMediaPeriod.java:365)
          at com.google.android.exoplayer2.source.MaskingMediaPeriod.continueLoading(MaskingMediaPeriod.java:219)
          at com.google.android.exoplayer2.MediaPeriodHolder.continueLoading(MediaPeriodHolder.java:218)
          at com.google.android.exoplayer2.ExoPlayerImplInternal.maybeContinueLoading(ExoPlayerImplInternal.java:2011)
          at com.google.android.exoplayer2.ExoPlayerImplInternal.handleContinueLoadingRequested(ExoPlayerImplInternal.java:1992)
          at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:489)
          at android.os.Handler.dispatchMessage(Handler.java:103) 
          at android.os.Looper.loop(Looper.java:237) 
          at android.os.HandlerThread.run(HandlerThread.java:67) 
  </code></pre>
  <p>This is my &quot;onPlayerError&quot; method, but it does not seem to be called for some reason.</p>
  <pre><code>private class PlayerEventListener implements Player.EventListener {
  ...
  @Override
          public void onPlayerError(ExoPlaybackException error) {
              switch (error.type) {
                  case ExoPlaybackException.TYPE_SOURCE:
                      Log.e(TAG, &quot;TYPE_SOURCE: &quot; + error.getSourceException().getMessage());
                      break;
  
                  case ExoPlaybackException.TYPE_RENDERER:
                      Log.e(TAG, &quot;TYPE_RENDERER: &quot; + error.getRendererException().getMessage());
                      break;
  
                  case ExoPlaybackException.TYPE_UNEXPECTED:
                      Log.e(TAG, &quot;TYPE_UNEXPECTED: &quot; + error.getUnexpectedException().getMessage());
                      break;
              }
          }
  ...
  }
  
  player.addListener(new PlayerEventListener());
  </code></pre>
  <p>Am I missing anything?</p>