title: ExoPlayer , Loop Ended/ Started listener for LoopingMediaSource
body: <p>I am using ExoPlayer for playing video in loop, but before source video is started each loop I need to reset some states of my Layout. I know ExoPlayer is calling onPlayerStateChanged with ExoPlayer.STATE_ENDED paramter when video is ended for usual MediaSources, but it is not called for LoopingMediaSource.</p>
  
  <pre><code>@Override
  public void onPlayerStateChanged(boolean playWhenReady, int playbackState) {
      if (playbackState == ExoPlayer.STATE_ENDED) {
          showControls();
          resetLayoutStates(); //I need it here, even in LoopingMediaSource
      }
      updateButtonVisibilities();
  }
  </code></pre>
  
  <p>Does the Exoplayer have any Callback when Source is restarted or ended in loop ? Or does it have any workaround for my situation ?</p>