Code example for MediaPlayer: Playing audio and video

Methods: prepareseekTostartstop

0
        } 
    } 
     
    public void rewindBackgroundMusic(){         
        if (mBackgroundMediaPlayer != null){
            mBackgroundMediaPlayer.stop();          
             
            try { 
                mBackgroundMediaPlayer.prepare();
                mBackgroundMediaPlayer.seekTo(0);
                mBackgroundMediaPlayer.start();
                 
                this.mIsPaused = false;
            } catch (Exception e){
                Log.e(TAG, "rewindBackgroundMusic: error state");
            }            
        } 
    } 
     
    public boolean isBackgroundMusicPlaying(){