Beispiel #1
0
 @Override
 public void onPlayerError(ExoPlaybackException exception) {
   rendererBuildingState = RenderBuildingState.IDLE;
   for (ExoPlayerListener listener : listeners) {
     listener.onError(exception);
   }
 }
Beispiel #2
0
 private void reportPlayerState() {
   boolean playWhenReady = player.getPlayWhenReady();
   int playbackState = getPlaybackState();
   if (lastReportedPlayWhenReady != playWhenReady || lastReportedPlaybackState != playbackState) {
     for (ExoPlayerListener listener : listeners) {
       listener.onStateChanged(playWhenReady, playbackState);
     }
     lastReportedPlayWhenReady = playWhenReady;
     lastReportedPlaybackState = playbackState;
   }
 }
Beispiel #3
0
  public void onRenderersError(Exception e) {
    builderCallback = null;
    if (internalErrorListener != null) {
      internalErrorListener.onRendererInitializationError(e);
    }

    for (ExoPlayerListener listener : listeners) {
      listener.onError(e);
    }

    rendererBuildingState = RenderBuildingState.IDLE;
    reportPlayerState();
  }
Beispiel #4
0
 @Override
 public void onVideoSizeChanged(int width, int height, float pixelWidthHeightRatio) {
   for (ExoPlayerListener listener : listeners) {
     listener.onVideoSizeChanged(width, height, pixelWidthHeightRatio);
   }
 }