Lines Matching refs:mMediaPlayer
323 private MediaPlayer mMediaPlayer;
346 Log.e(TAG, "playOrPause playing: "+((mMediaPlayer == null)?false:!mMediaPlayer.isPlaying())+
347 " mMediaPlayer: "+mMediaPlayer+
350 if (mMediaPlayer == null || !mMediaPlayer.isPlaying()){
351 if (mMediaPlayer == null) {
357 mMediaPlayer = new MediaPlayer();
361 mMediaPlayer.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength());
365 mMediaPlayer.setDataSource(mFileName);
367 mMediaPlayer.setAudioStreamType(mStreamType);
368 mMediaPlayer.prepare();
369 mMediaPlayer.setLooping(true);
372 mMediaPlayer.release();
373 mMediaPlayer = null;
376 if (mMediaPlayer != null) {
377 mMediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
385 if (mMediaPlayer != null) {
386 mMediaPlayer.start();
389 mMediaPlayer.pause();
395 if (mMediaPlayer != null) {
396 mMediaPlayer.stop();
397 mMediaPlayer.release();
398 mMediaPlayer = null;
405 if (mMediaPlayer != null) {
406 return mMediaPlayer.isPlaying();