Exemplo n.º 1
0
 @Override
 public void onPlayerError(ExoPlaybackException exception) {
   rendererBuildingState = RenderBuildingState.IDLE;
   for (ExoPlayerListener listener : listeners) {
     listener.onError(exception);
   }
 }
Exemplo n.º 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;
   }
 }
Exemplo n.º 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();
  }
Exemplo n.º 4
0
 @Override
 public void onVideoSizeChanged(int width, int height, float pixelWidthHeightRatio) {
   for (ExoPlayerListener listener : listeners) {
     listener.onVideoSizeChanged(width, height, pixelWidthHeightRatio);
   }
 }