MediaPlayer setOnSeekCompleteListener - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for MediaPlayer setOnSeekCompleteListener method.

This code example shows how to use the following methods:prepare, setDataSource, setOnCompletionListener, setOnPreparedListener, setOnSeekCompleteListener
This code example shows how to use the following methods:getCurrentPosition, getDuration, setOnSeekCompleteListener, start
            public void onSeekComplete(MediaPlayer mediaPlayer) {
              if (D)
                Log.d(
                    TAG,
                    "current audio position... " 
                        + mMediaPlayer.getCurrentPosition());
              mMediaPlayer.start();
              mMediaPlayer.setOnSeekCompleteListener(null);
 
              // If the endtime is valid, start an async task to loop until the 
              // audio gets to the endtime 
              if (endTimeMS < mMediaPlayer.getDuration()) {
                mListenForEndAudioInterval = new ListenForEndAudioInterval();
                mListenForEndAudioInterval.setEndAudioInterval(endTimeMS);
                mListenForEndAudioInterval.execute();
              } 
            } 
          }); 
    } else { 
      if (mRequestedMediaPlayer < 2) {
5
CodeRank
This code example shows how to use the following methods:setOnBufferingUpdateListener, setOnCompletionListener, setOnErrorListener, setOnPreparedListener, setOnSeekCompleteListener
This code example shows how to use the following methods:setOnBufferingUpdateListener, setOnCompletionListener, setOnErrorListener, setOnInfoListener, setOnPreparedListener
    public static final String TAG = DefMediaPlayer.class.getName();
 
    private MediaPlayer mMediaPlayer = null;
 
    protected DefMediaPlayer() { 
        mMediaPlayer = new MediaPlayer();
        mMediaPlayer.setOnBufferingUpdateListener(this);
        mMediaPlayer.setOnCompletionListener(this);
        mMediaPlayer.setOnErrorListener(this);
        mMediaPlayer.setOnInfoListener(this);
        mMediaPlayer.setOnPreparedListener(this);
        mMediaPlayer.setOnSeekCompleteListener(this);
        mMediaPlayer.setOnVideoSizeChangedListener(this);
    } 
 
    @Override 
    public long getCurrentPosition() { 
        try { 
            return mMediaPlayer.getCurrentPosition();
        } catch (IllegalStateException e) {
6
CodeRank
This code example shows how to use the following methods:prepare, setDataSource, setOnCompletionListener, setOnPreparedListener, setOnSeekCompleteListener
This code example shows how to use the following methods:prepare, setDataSource, setOnCompletionListener, setOnPreparedListener, setOnSeekCompleteListener
This code example shows how to use the following methods:prepare, setDataSource, setOnCompletionListener, setOnPreparedListener, setOnSeekCompleteListener
This code example shows how to use the following methods:prepareAsync, setDataSource, setOnBufferingUpdateListener, setOnCompletionListener, setOnPreparedListener
This code example shows how to use the following methods:prepare, setDataSource, setOnCompletionListener, setOnPreparedListener, setOnSeekCompleteListener
This code example shows how to use the following methods:prepare, setDataSource, setOnCompletionListener, setOnPreparedListener, setOnSeekCompleteListener

Related MediaPlayer setOnSeekCompleteListener Questions & Answers:

setOnSeekCompleteListener Method Overview
Register a callback to be invoked when a seek operation has been completed.
See Code Examples for other Android MediaPlayer Methods: