Example #1
0
 public void resume() {
   if (mSurfaceHolder == null && mCurrentState == STATE_SUSPEND) {
     mTargetState = STATE_RESUME;
   } else if (mCurrentState == STATE_SUSPEND_UNSUPPORTED) {
     openVideo();
   }
 }
Example #2
0
 public void setVideoURI(Uri uri) {
   mUri = uri;
   mSeekWhenPrepared = 0;
   openVideo();
   requestLayout();
   invalidate();
 }
Example #3
0
 public void surfaceCreated(SurfaceHolder holder) {
   mSurfaceHolder = holder;
   if (mMediaPlayer != null
       && mCurrentState == STATE_SUSPEND
       && mTargetState == STATE_RESUME) {
     mMediaPlayer.setDisplay(mSurfaceHolder);
     resume();
   } else {
     openVideo();
   }
 }