Esempio n. 1
0
 public void onCompletion(MediaPlayer mp) {
   if (mMediaController != null) {
     mMediaController.hide();
   }
   if (mOnCompletionListener != null) {
     mOnCompletionListener.onCompletion(mMediaPlayer);
   }
 }
Esempio n. 2
0
 public void onCompletion(MediaPlayer mp) {
   mCurrentState = STATE_PLAYBACK_COMPLETED;
   mTargetState = STATE_PLAYBACK_COMPLETED;
   if (mMediaController != null) {
     mMediaController.hide();
   }
   if (mOnCompletionListener != null) {
     mOnCompletionListener.onCompletion(mMediaPlayer);
   }
 }
 @Override
 public void onCompletion(MediaPlayer arg0) {
   if (mCurRecordInfo == null) {
     return;
   }
   mCurRecordInfo.play = false;
   mCurRecordInfo = null;
   mMediaPlayer.reset();
   if (mOnCompletionListener != null) {
     mOnCompletionListener.onCompletion();
   }
 }
 @Override
 public boolean onError(MediaPlayer arg0, int arg1, int arg2) {
   if (mCurRecordInfo == null) {
     return false;
   }
   mCurRecordInfo.play = false;
   mCurRecordInfo = null;
   mMediaPlayer.reset();
   if (mOnCompletionListener != null) {
     mOnCompletionListener.onCompletion();
   }
   return false;
 }
Esempio n. 5
0
 private void fireCustomCompletionListeners(MediaPlayer mp) {
   for (OnCompletionListener listener : mCompletionListeners) {
     listener.onCompletion(mp);
   }
 }