Java 类android.media.MediaPlayer.OnSeekCompleteListener 实例源码

项目:MyMusicPlayer    文件:MyMusicService.java   
public void initPlay() {

        // 跳到指定位置播放,一种是暂停位置,一种是拖动后的位置
        mediaPlayer.setOnSeekCompleteListener(new OnSeekCompleteListener() {

            @Override
            public void onSeekComplete(MediaPlayer mp) {

                Intent intent = new Intent();
                intent.setAction("seekComplete");
                if (secondPause != -1) {
                    intent.putExtra("seek", false);
                    intent.putExtra("pause", secondPause);
                } else {
                    intent.putExtra("seek", Msg_Music.SEEK);
                }
                sendBroadcast(intent);

            }
        });

    }
项目:letv    文件:VideoViewH264m3u8.java   
public void setOnSeekCompleteListener(OnSeekCompleteListener l) {
    this.mOnSeekCompleteListener = l;
}
项目:letv    文件:VideoViewH264LeMobile.java   
public void setOnSeekCompleteListener(OnSeekCompleteListener l) {
    this.mOnSeekCompleteListener = l;
}
项目:letv    文件:VideoViewH264m3u8Hw.java   
public void setOnSeekCompleteListener(OnSeekCompleteListener l) {
    this.mOnSeekCompleteListener = l;
}
项目:letv    文件:VideoViewH264m3u8HwLeMobile.java   
public void setOnSeekCompleteListener(OnSeekCompleteListener l) {
    this.mOnSeekCompleteListener = l;
}
项目:letv    文件:VideoViewH264mp4.java   
public void setOnSeekCompleteListener(OnSeekCompleteListener l) {
    this.mOnSeekCompleteListener = l;
}
项目:letv    文件:VideoViewTV.java   
public OnSeekCompleteListener getOnSeekCompleteListener() {
    return this.mOnSeekCompleteListener;
}
项目:letv    文件:VideoViewTV.java   
public void setOnSeekCompleteListener(OnSeekCompleteListener mOnSeekCompleteListener) {
    this.mOnSeekCompleteListener = mOnSeekCompleteListener;
}
项目:letv    文件:VideoViewH264m3u8_4D.java   
public void setOnSeekCompleteListener(OnSeekCompleteListener l) {
    this.mOnSeekCompleteListener = l;
}
项目:letv    文件:VideoViewH264LeMobile_4D.java   
public void setOnSeekCompleteListener(OnSeekCompleteListener l) {
    this.mOnSeekCompleteListener = l;
}
项目:letv    文件:VideoViewH264mp4_4D.java   
public void setOnSeekCompleteListener(OnSeekCompleteListener l) {
    this.mOnSeekCompleteListener = l;
}
项目:letv    文件:VideoViewH264m3u8Hw_4D.java   
public void setOnSeekCompleteListener(OnSeekCompleteListener l) {
    this.mOnSeekCompleteListener = l;
}
项目:letv    文件:FFMpegPlayer.java   
public void setOnSeekCompleteListener(OnSeekCompleteListener listener) {
    this.mOnSeekCompleteListener = listener;
}
项目:FullscreenVideoView    文件:FullscreenVideoView.java   
public void setOnSeekCompleteListener(OnSeekCompleteListener l) {
    if (mediaPlayer != null)
        this.seekCompleteListener = l;
    else throw new RuntimeException("Media Player is not initialized");
}
项目:huaxingtan_android    文件:MusicPlayerService.java   
public boolean setAudioItem(AudioItem item, 
        OnPreparedListener onPreparedListener, 
        OnSeekCompleteListener onSeekCompleteListener, 
        OnErrorListener onErrorListener,
        final OnBufferingUpdateListener onBufferingUpdateListener,
        OnCompletionListener onCompletionListener) {

    if (onPreparedListener != null)
        mMediaPlayer.setOnPreparedListener(onPreparedListener);

    if (onErrorListener != null)
        mMediaPlayer.setOnErrorListener(onErrorListener);

    MediaPlayer.OnBufferingUpdateListener bufferListenerProxy = new MediaPlayer.OnBufferingUpdateListener() {
        public void onBufferingUpdate(MediaPlayer mp, int percent) {
            if(percent == 100)
                doneBuffering = true;
            if (onBufferingUpdateListener != null)
                onBufferingUpdateListener.onBufferingUpdate(mp, percent);
        }
    };
    mMediaPlayer.setOnBufferingUpdateListener(bufferListenerProxy);


    if (onSeekCompleteListener != null)
        mMediaPlayer.setOnSeekCompleteListener(onSeekCompleteListener);

    if (onCompletionListener != null)
        mMediaPlayer.setOnCompletionListener(onCompletionListener);

    if (getNowPlayingId() != item.getFileId()) {
        mMediaPlayer.reset();
        mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
        mAudioItem = item;
        String URI = mAudioItem.getFileUrl();
        doneBuffering = false;
        if (mAudioItem.getStatus() == Status.FINISHED)
            URI = new File(this.getFilesDir(), mAudioItem.getPath()).getAbsolutePath();
            bufferListenerProxy.onBufferingUpdate(mMediaPlayer, 100);
        try {
            mMediaPlayer.setDataSource(URI);
        } catch (Exception e) {
            Log.d(TAG, "failed to load "+URI, e);
            doneBuffering = true;
            return false;
        }
        wifiLock();
        mMediaPlayer.prepareAsync();
    } else {
        if (onPreparedListener!=null)
            onPreparedListener.onPrepared(mMediaPlayer);
    }

    return true;
}
项目:letv    文件:LetvMediaPlayerControl.java   
void setOnSeekCompleteListener(OnSeekCompleteListener onSeekCompleteListener);