Searched refs:mMediaPlayer (Results 1 – 7 of 7) sorted by relevance
76 private MediaPlayer mMediaPlayer; field in Playback137 return mPlayOnFocusGain || (mMediaPlayer != null && mMediaPlayer.isPlaying()); in isPlaying()141 return mMediaPlayer != null ? in getCurrentStreamPosition()142 mMediaPlayer.getCurrentPosition() : mCurrentPosition; in getCurrentStreamPosition()156 if (mState == PlaybackState.STATE_PAUSED && !mediaHasChanged && mMediaPlayer != null) { in play()171 mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); in play()172 mMediaPlayer.setDataSource(source); in play()179 mMediaPlayer.prepareAsync(); in play()202 if (mMediaPlayer != null && mMediaPlayer.isPlaying()) { in pause()203 mMediaPlayer.pause(); in pause()[all …]
31 private MediaPlayer mMediaPlayer; field in MediaPlayerDemo_Audio70 mMediaPlayer = new MediaPlayer(); in playAudio()71 mMediaPlayer.setDataSource(path); in playAudio()72 mMediaPlayer.prepare(); in playAudio()73 mMediaPlayer.start(); in playAudio()80 mMediaPlayer = MediaPlayer.create(this, R.raw.test_cbr); in playAudio()81 mMediaPlayer.start(); in playAudio()96 if (mMediaPlayer != null) { in onDestroy()97 mMediaPlayer.release(); in onDestroy()98 mMediaPlayer = null; in onDestroy()
42 private MediaPlayer mMediaPlayer; field in MediaPlayerDemo_Video122 mMediaPlayer = new MediaPlayer(); in playVideo()123 mMediaPlayer.setDataSource(path); in playVideo()124 mMediaPlayer.setDisplay(holder); in playVideo()125 mMediaPlayer.prepare(); in playVideo()126 mMediaPlayer.setOnBufferingUpdateListener(this); in playVideo()127 mMediaPlayer.setOnCompletionListener(this); in playVideo()128 mMediaPlayer.setOnPreparedListener(this); in playVideo()129 mMediaPlayer.setOnVideoSizeChangedListener(this); in playVideo()130 mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); in playVideo()[all …]
49 private MediaPlayer mMediaPlayer; field in AudioFxDemo72 mMediaPlayer = MediaPlayer.create(this, R.raw.test_cbr); in onCreate()73 Log.d(TAG, "MediaPlayer audio session ID: " + mMediaPlayer.getAudioSessionId()); in onCreate()85 mMediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() { in onCreate()91 mMediaPlayer.start(); in onCreate()98 mEqualizer = new Equalizer(0, mMediaPlayer.getAudioSessionId()); in setupEqualizerFxAndUI()173 mVisualizer = new Visualizer(mMediaPlayer.getAudioSessionId()); in setupVisualizerFxAndUI()189 if (isFinishing() && mMediaPlayer != null) { in onPause()192 mMediaPlayer.release(); in onPause()193 mMediaPlayer = null; in onPause()
45 private MediaPlayer mMediaPlayer; field in SoundAlarmListenerService54 mMediaPlayer = new MediaPlayer(); in onCreate()61 mMediaPlayer.release(); in onDestroy()78 mMediaPlayer.reset(); in onDataChanged()81 mMediaPlayer.setAudioStreamType(AudioManager.STREAM_ALARM); in onDataChanged()83 mMediaPlayer.setDataSource(getApplicationContext(), mAlarmSound); in onDataChanged()84 mMediaPlayer.prepare(); in onDataChanged()88 mMediaPlayer.start(); in onDataChanged()92 if (mMediaPlayer.isPlaying()) { in onDataChanged()93 mMediaPlayer.stop(); in onDataChanged()
64 private MediaPlayer mMediaPlayer; field in LocalPlayer102 if (mMediaPlayer != null) { in release()103 mMediaPlayer.stop(); in release()104 mMediaPlayer.release(); in release()105 mMediaPlayer = null; in release()118 mMediaPlayer.setDataSource(mContext, item.getUri()); in play()119 mMediaPlayer.prepareAsync(); in play()143 mMediaPlayer.seekTo(pos); in seek()157 item.setDuration(mMediaPlayer.getDuration()); in getStatus()159 mSeekToPos : mMediaPlayer.getCurrentPosition()); in getStatus()[all …]
53 private MediaPlayer mMediaPlayer; field in MainActivity154 if (mMediaPlayer == null) { in playMusic()155 mMediaPlayer = MediaPlayer.create(this, R.raw.sound); in playMusic()156 mMediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() { in playMusic()165 mMediaPlayer.start(); in playMusic()172 if (mMediaPlayer != null) { in stopMusic()173 mMediaPlayer.stop(); in stopMusic()174 mMediaPlayer.release(); in stopMusic()175 mMediaPlayer = null; in stopMusic()257 if (mMediaPlayer != null) { in onStop()[all …]