android.media.MediaPlayer.OnSeekCompleteListener Java Examples

The following examples show how to use android.media.MediaPlayer.OnSeekCompleteListener. 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 check out the related API usage on the sidebar.
Example #1
Source File: CustomVideoView.java    From FimiX8-RE with 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 File: X8CustomVideoView.java    From FimiX8-RE with 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 File: X8CustomVideoView.java    From FimiX8-RE with 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 #4
Source File: CustomVideoView.java    From FimiX8-RE with 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 #5
Source File: FullscreenVideoView.java    From FullscreenVideoView with 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 #6
Source File: FFMpegPlayer.java    From letv with Apache License 2.0 4 votes vote down vote up
public void setOnSeekCompleteListener(OnSeekCompleteListener listener) {
    this.mOnSeekCompleteListener = listener;
}
 
Example #7
Source File: VideoViewH264m3u8Hw_4D.java    From letv with Apache License 2.0 4 votes vote down vote up
public void setOnSeekCompleteListener(OnSeekCompleteListener l) {
    this.mOnSeekCompleteListener = l;
}
 
Example #8
Source File: VideoViewH264mp4_4D.java    From letv with Apache License 2.0 4 votes vote down vote up
public void setOnSeekCompleteListener(OnSeekCompleteListener l) {
    this.mOnSeekCompleteListener = l;
}
 
Example #9
Source File: VideoViewH264LeMobile_4D.java    From letv with Apache License 2.0 4 votes vote down vote up
public void setOnSeekCompleteListener(OnSeekCompleteListener l) {
    this.mOnSeekCompleteListener = l;
}
 
Example #10
Source File: VideoViewH264m3u8_4D.java    From letv with Apache License 2.0 4 votes vote down vote up
public void setOnSeekCompleteListener(OnSeekCompleteListener l) {
    this.mOnSeekCompleteListener = l;
}
 
Example #11
Source File: VideoViewTV.java    From letv with Apache License 2.0 4 votes vote down vote up
public void setOnSeekCompleteListener(OnSeekCompleteListener mOnSeekCompleteListener) {
    this.mOnSeekCompleteListener = mOnSeekCompleteListener;
}
 
Example #12
Source File: VideoViewTV.java    From letv with Apache License 2.0 4 votes vote down vote up
public OnSeekCompleteListener getOnSeekCompleteListener() {
    return this.mOnSeekCompleteListener;
}
 
Example #13
Source File: VideoViewH264mp4.java    From letv with Apache License 2.0 4 votes vote down vote up
public void setOnSeekCompleteListener(OnSeekCompleteListener l) {
    this.mOnSeekCompleteListener = l;
}
 
Example #14
Source File: VideoViewH264m3u8HwLeMobile.java    From letv with Apache License 2.0 4 votes vote down vote up
public void setOnSeekCompleteListener(OnSeekCompleteListener l) {
    this.mOnSeekCompleteListener = l;
}
 
Example #15
Source File: VideoViewH264m3u8Hw.java    From letv with Apache License 2.0 4 votes vote down vote up
public void setOnSeekCompleteListener(OnSeekCompleteListener l) {
    this.mOnSeekCompleteListener = l;
}
 
Example #16
Source File: VideoViewH264LeMobile.java    From letv with Apache License 2.0 4 votes vote down vote up
public void setOnSeekCompleteListener(OnSeekCompleteListener l) {
    this.mOnSeekCompleteListener = l;
}
 
Example #17
Source File: VideoViewH264m3u8.java    From letv with Apache License 2.0 4 votes vote down vote up
public void setOnSeekCompleteListener(OnSeekCompleteListener l) {
    this.mOnSeekCompleteListener = l;
}
 
Example #18
Source File: LetvMediaPlayerControl.java    From letv with Apache License 2.0 votes vote down vote up
void setOnSeekCompleteListener(OnSeekCompleteListener onSeekCompleteListener);