public void onCompletion(MediaPlayer mp) { if (mMediaController != null) { mMediaController.hide(); } if (mOnCompletionListener != null) { mOnCompletionListener.onCompletion(mMediaPlayer); } }
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; }
private void fireCustomCompletionListeners(MediaPlayer mp) { for (OnCompletionListener listener : mCompletionListeners) { listener.onCompletion(mp); } }