예제 #1
0
 public void seekTo(long msec) {
   if (isInPlaybackState()) {
     mMediaPlayer.seekTo(msec);
     mSeekWhenPrepared = 0;
   } else {
     mSeekWhenPrepared = msec;
   }
 }
 @Override
 public void seekTo(int i) {
   if (mMediaPlayer != null && mIsMediaReadyToBePlayed) {
     mMediaPlayer.seekTo(i);
   } else {
     Log.e(TAG, "MediaPlayer is not instantiated yet.");
   }
 }
예제 #3
0
 public void seekTo(float percent) {
   if (mInitialized) mPlayer.seekTo((int) (percent * getDuration()));
 }