Пример #1
0
 @Override
 protected void onStop() {
   super.onStop();
   if (player != null) {
     player.release();
     player = null;
   }
   videoRenderer = null;
   shutterView.setVisibility(View.VISIBLE);
 }
Пример #2
0
 @Override
 public void onVisibleBehindCanceled() {
   super.onVisibleBehindCanceled();
   if (player != null) {
     player.release();
     player = null;
   }
   videoRenderer = null;
   shutterView.setVisibility(View.VISIBLE);
 }
Пример #3
0
  public void release() {
    if (builderCallback != null) {
      builderCallback.cancel();
      builderCallback = null;
    }

    rendererBuildingState = RenderBuildingState.IDLE;
    surface = null;
    player.release();
  }
 @Override
 public void onPause() {
   super.onPause();
   if (mPlayer != null) {
     mPlayer.stop();
     mPlayerPosition = mPlayer.getCurrentPosition();
     mPlayer.release();
     mPlayer = null;
   }
   mCallback = null;
   mVideoRenderer = null;
   mShutter.setVisibility(View.VISIBLE);
 }
Пример #5
0
 @Override
 protected void onStop() {
   super.onStop();
   mExoPlayer.release();
   timer.cancel();
 }
Пример #6
0
 public void release() {
   rendererBuilder.cancel();
   rendererBuildingState = RENDERER_BUILDING_STATE_IDLE;
   surface = null;
   player.release();
 }