Java Code Examples for android.media.MediaPlayer.OnSeekCompleteListener

The following examples show how to use android.media.MediaPlayer.OnSeekCompleteListener. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may want to check out the right sidebar which shows the related API usage.
Example 1
Source Project: FimiX8-RE   Source File: CustomVideoView.java    License: MIT License 6 votes vote down vote up
public void seekAndPause(int position) {
    if (this.playerState == 1) {
        showPauseView(false);
        setCurrentPlayState(2);
        if (isPlaying()) {
            this.mediaPlayer.seekTo(position);
            this.mediaPlayer.setOnSeekCompleteListener(new OnSeekCompleteListener() {
                public void onSeekComplete(MediaPlayer mp) {
                    LogUtil.d(CustomVideoView.TAG, "do seek and pause");
                    CustomVideoView.this.mediaPlayer.pause();
                    CustomVideoView.this.mHandler.removeCallbacksAndMessages(null);
                }
            });
        }
    }
}
 
Example 2
Source Project: FimiX8-RE   Source File: X8CustomVideoView.java    License: MIT License 6 votes vote down vote up
public void seekAndPause(int position) {
    if (this.playerState == 1) {
        showPauseView(false);
        this.listener.onVideoPause(false);
        setCurrentPlayState(2);
        if (isPlaying()) {
            this.mediaPlayer.seekTo(position);
            this.mediaPlayer.setOnSeekCompleteListener(new OnSeekCompleteListener() {
                public void onSeekComplete(MediaPlayer mp) {
                    LogUtil.d(X8CustomVideoView.TAG, "do seek and pause");
                    X8CustomVideoView.this.mediaPlayer.pause();
                    X8CustomVideoView.this.mHandler.removeCallbacksAndMessages(null);
                }
            });
        }
    }
}
 
Example 3
Source Project: FimiX8-RE   Source File: CustomVideoView.java    License: MIT License 5 votes vote down vote up
public void seekAndResume(int position) {
    if (this.mediaPlayer != null) {
        showPauseView(true);
        entryResumeState();
        this.mediaPlayer.seekTo(position);
        this.mediaPlayer.setOnSeekCompleteListener(new OnSeekCompleteListener() {
            public void onSeekComplete(MediaPlayer mp) {
                LogUtil.d(CustomVideoView.TAG, "do seek and resume");
                CustomVideoView.this.mediaPlayer.start();
                CustomVideoView.this.mHandler.sendEmptyMessage(1);
            }
        });
    }
}
 
Example 4
Source Project: FimiX8-RE   Source File: X8CustomVideoView.java    License: MIT License 5 votes vote down vote up
public void seekAndResume(int position) {
    if (this.mediaPlayer != null) {
        showPauseView(true);
        this.listener.onVideoPause(true);
        entryResumeState();
        this.mediaPlayer.seekTo(position);
        this.mediaPlayer.setOnSeekCompleteListener(new OnSeekCompleteListener() {
            public void onSeekComplete(MediaPlayer mp) {
                LogUtil.d(X8CustomVideoView.TAG, "do seek and resume");
                X8CustomVideoView.this.mediaPlayer.start();
                X8CustomVideoView.this.mHandler.sendEmptyMessage(1);
            }
        });
    }
}
 
Example 5
Source Project: letv   Source File: VideoViewH264m3u8.java    License: Apache License 2.0 4 votes vote down vote up
public void setOnSeekCompleteListener(OnSeekCompleteListener l) {
    this.mOnSeekCompleteListener = l;
}
 
Example 6
Source Project: letv   Source File: VideoViewH264LeMobile.java    License: Apache License 2.0 4 votes vote down vote up
public void setOnSeekCompleteListener(OnSeekCompleteListener l) {
    this.mOnSeekCompleteListener = l;
}
 
Example 7
Source Project: letv   Source File: VideoViewH264m3u8Hw.java    License: Apache License 2.0 4 votes vote down vote up
public void setOnSeekCompleteListener(OnSeekCompleteListener l) {
    this.mOnSeekCompleteListener = l;
}
 
Example 8
Source Project: letv   Source File: VideoViewH264m3u8HwLeMobile.java    License: Apache License 2.0 4 votes vote down vote up
public void setOnSeekCompleteListener(OnSeekCompleteListener l) {
    this.mOnSeekCompleteListener = l;
}
 
Example 9
Source Project: letv   Source File: VideoViewH264mp4.java    License: Apache License 2.0 4 votes vote down vote up
public void setOnSeekCompleteListener(OnSeekCompleteListener l) {
    this.mOnSeekCompleteListener = l;
}
 
Example 10
Source Project: letv   Source File: VideoViewTV.java    License: Apache License 2.0 4 votes vote down vote up
public OnSeekCompleteListener getOnSeekCompleteListener() {
    return this.mOnSeekCompleteListener;
}
 
Example 11
Source Project: letv   Source File: VideoViewTV.java    License: Apache License 2.0 4 votes vote down vote up
public void setOnSeekCompleteListener(OnSeekCompleteListener mOnSeekCompleteListener) {
    this.mOnSeekCompleteListener = mOnSeekCompleteListener;
}
 
Example 12
Source Project: letv   Source File: VideoViewH264m3u8_4D.java    License: Apache License 2.0 4 votes vote down vote up
public void setOnSeekCompleteListener(OnSeekCompleteListener l) {
    this.mOnSeekCompleteListener = l;
}
 
Example 13
Source Project: letv   Source File: VideoViewH264LeMobile_4D.java    License: Apache License 2.0 4 votes vote down vote up
public void setOnSeekCompleteListener(OnSeekCompleteListener l) {
    this.mOnSeekCompleteListener = l;
}
 
Example 14
Source Project: letv   Source File: VideoViewH264mp4_4D.java    License: Apache License 2.0 4 votes vote down vote up
public void setOnSeekCompleteListener(OnSeekCompleteListener l) {
    this.mOnSeekCompleteListener = l;
}
 
Example 15
Source Project: letv   Source File: VideoViewH264m3u8Hw_4D.java    License: Apache License 2.0 4 votes vote down vote up
public void setOnSeekCompleteListener(OnSeekCompleteListener l) {
    this.mOnSeekCompleteListener = l;
}
 
Example 16
Source Project: letv   Source File: FFMpegPlayer.java    License: Apache License 2.0 4 votes vote down vote up
public void setOnSeekCompleteListener(OnSeekCompleteListener listener) {
    this.mOnSeekCompleteListener = listener;
}
 
Example 17
Source Project: FullscreenVideoView   Source File: FullscreenVideoView.java    License: Apache License 2.0 4 votes vote down vote up
public void setOnSeekCompleteListener(OnSeekCompleteListener l) {
    if (mediaPlayer != null)
        this.seekCompleteListener = l;
    else throw new RuntimeException("Media Player is not initialized");
}
 
Example 18
Source Project: letv   Source File: LetvMediaPlayerControl.java    License: Apache License 2.0 votes vote down vote up
void setOnSeekCompleteListener(OnSeekCompleteListener onSeekCompleteListener);