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

onVideoStoppedMainThread #80

Open GuardYang opened 6 years ago

GuardYang commented 6 years ago

onVideoStoppedMainThread 机型 oppo R7c

paolomoschini commented 6 years ago

In MediaPlayerWrapper change this:

  private boolean inUiThread() {
        return Thread.currentThread().getId() == 1;
    }

with this:

private boolean inUiThread() {
   return Thread.currentThread() == Looper.getMainLooper().getThread();
}