danylovolokh/VideoPlayerManager

onBufferingUpdateMainThread does not trigger

lozn00 opened this issue · 5 comments

It seems that the writing is very messy, the cached method onBufferingUpdateMainThread does not trigger and is not conducive to modification. It is hoped that a complete demo can include the display update of the cache.

    private void notifyOnVideoCompletionMainThread() {
    private void notifyOnVideoPreparedMainThread() {
    private void notifyOnErrorMainThread(int what, int extra) {

other ?


   java.lang.IllegalStateException: start, called from illegal state STARTED

                                                                   at com.volokh.danylo.video_player_manager.ui.MediaPlayerWrapper.start(MediaPlayerWrapper.java:393)

                                                                   at com.volokh.danylo.video_player_manager.ui.VideoPlayerView.restart(VideoPlayerView.java:106)

                               
                                    at com.mm999.meiye.adapter.VideoUiAdapter$2.onVideoCompletionMainThread(VideoUiAdapter.java:79)

                                                                   at com.volokh.danylo.video_player_manager.ui.VideoPlayerView.notifyOnVideoCompletionMainThread(VideoPlayerVie

    java.lang.IllegalStateException: start, called from illegal state STARTED

                                                                   at com.volokh.danylo.video_player_manager.ui.MediaPlayerWrapper.start(MediaPlayerWrapper.java:393)

                                                                   at com.volokh.danylo.video_player_manager.ui.VideoPlayerView.restart(VideoPlayerView.java:106)

                                                                   at com.mm999.meiye.adapter.VideoUiAdapter$2.onVideoCompletionMainThread(VideoUiAdapter.java:79)


                                                                   at com.volokh.danylo.video_player_manager.ui.VideoPlayerView.notifyOnVideoCompletionMa

hope enable restart

Please tell me how to stop and play through VideoPlayerManager.

Please tell me how to stop and play, but not destroy resources. The way of source code communication is very complex. I am stupid. I can't read it.

    @Override
    public void stop() {

        mPlayerHandler.clearAllPendingMessages(TAG);
        mPlayerHandler.addMessage(new Stop(mCurrentPlayer, this));
        mPlayerHandler.resumeQueueProcessing(TAG);

        if (SHOW_LOGS) {
            Logger.v(TAG, "stop, mCurrentPlayerState " + mCurrentPlayerState);
        }


    }

    @Override
    public void continuePlay() {
        mPlayerHandler.pauseQueueProcessing(TAG);
        if (SHOW_LOGS) {
            Logger.v(TAG, "continuePlay, mCurrentPlayerState " + mCurrentPlayerState);
        }

        mPlayerHandler.addMessage(new Start(mCurrentPlayer, this));
        mPlayerHandler.resumeQueueProcessing(TAG);
    }

this method is error?