danylovolokh / VideoPlayerManager

This is a project designed to help controlling Android MediaPlayer class. It makes it easier to use MediaPlayer ListView and RecyclerView. Also it tracks the most visible item in scrolling list. When new item in the list become the most visible, this library gives an API to track it.
3.15k stars 747 forks source link

Could we know wen media player really started? #20

Open lenguyenthanh opened 8 years ago

lenguyenthanh commented 8 years ago

We now have this callback for MediaPlayer state:

public interface MainThreadMediaPlayerListener {
        void onVideoSizeChangedMainThread(int width, int height);

        void onVideoPreparedMainThread();

        void onVideoCompletionMainThread();

        void onErrorMainThread(int what, int extra);

        void onBufferingUpdateMainThread(int percent);

        void onVideoStoppedMainThread();
    }

But we don't really know when the video is really started. It may load a video over the air so the time to buffer data is a little long.

It's good if we know when MediaPlayer start playing the video, we can make some animation in between preparing and playing.

AleksandrKrasnoperov commented 8 years ago

How implement MediaPlayer.OnInfoListener?

brucetoo commented 8 years ago

Here is where really start,the original lib is miss callback about MediaPlayer.OnInfoListener, i added onInfoMainThread