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.
In VideoPlayerView start method, object mReadyForPlaybackIndicator may wait all the time,
try { mReadyForPlaybackIndicator.wait(); } catch (InterruptedException e) { throw new RuntimeException(e); }
but sometimes the player may occur error while playing and no error callback,then the method may blocked forever. And this will cause MessagesHandlerThread blocked too.
if (SHOW_LOGS) Logger.v(TAG, "run, mLastMessage " + mLastMessage); mLastMessage.runMessage(); if (SHOW_LOGS) Logger.v(TAG, "run, mLastMessage finished");
this make start method in VideoPlayerView becomes synchronized,so MessageHandler cannot work again even you start a new player.
should we move this wait block to another place when we call method mReadyForPlaybackIndicator.notifyAll()?
In VideoPlayerView start method, object mReadyForPlaybackIndicator may wait all the time,
try { mReadyForPlaybackIndicator.wait(); } catch (InterruptedException e) { throw new RuntimeException(e); }
but sometimes the player may occur error while playing and no error callback,then the method may blocked forever. And this will cause MessagesHandlerThread blocked too.if (SHOW_LOGS) Logger.v(TAG, "run, mLastMessage " + mLastMessage); mLastMessage.runMessage(); if (SHOW_LOGS) Logger.v(TAG, "run, mLastMessage finished");
this make start method in VideoPlayerView becomes synchronized,so MessageHandler cannot work again even you start a new player. should we move this wait block to another place when we call method mReadyForPlaybackIndicator.notifyAll()?