@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);
 }
Ejemplo n.º 2
0
 @UiThread(propagation = UiThread.Propagation.REUSE)
 void updateSeekBar() {
   mSeekBar.setProgress(
       (int) (mExoPlayer.getCurrentPosition() * 1.0f / mExoPlayer.getDuration() * 100));
 }
Ejemplo n.º 3
0
 @Override
 public long getCurrentPosition() {
   return player.getCurrentPosition();
 }