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.
09-27 18:52:35.740 14366-14408/linchaolong.test V/VideoPlayerView@12627773: 857 setDataSource, path http://download.cnettv.com.edgesuite.net/21923/2016/04/28/675720771781/DL_Free-FreeToTry_820512_740.mp4, this VideoPlayerView@12627773 09-27 18:52:35.740 14366-14408/linchaolong.test V/MediaPlayerWrapperImpl@100443387: 857 setDataSource, filePath http://download.cnettv.com.edgesuite.net/21923/2016/04/28/675720771781/DL_Free-FreeToTry_820512_740.mp4, mState IDLE 09-27 18:52:35.743 14366-14408/linchaolong.test E/MediaPlayer: Unable to create media player 09-27 18:52:35.744 14366-14408/linchaolong.test D/VideoPlayerView@12627773: 857 setDataSource failed.: status=0x80000000 09-27 18:52:35.746 14366-14408/linchaolong.test E/AndroidRuntime: FATAL EXCEPTION: pool-1-thread-1 Process: linchaolong.test, PID: 14366 java.lang.RuntimeException: java.io.IOException: setDataSource failed.: status=0x80000000 at com.volokh.danylo.video_player_manager.ui.VideoPlayerView.setDataSource(VideoPlayerView.java:263) at com.volokh.danylo.video_player_manager.player_messages.SetUrlDataSourceMessage.performAction(SetUrlDataSourceMessage.java:24) at com.volokh.danylo.video_player_manager.player_messages.PlayerMessage.runMessage(PlayerMessage.java:40) at com.volokh.danylo.video_player_manager.MessagesHandlerThread$1.run(MessagesHandlerThread.java:61) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818) Caused by: java.io.IOException: setDataSource failed.: status=0x80000000 at android.media.MediaPlayer.nativeSetDataSource(Native Method) at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1071) at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1032) at com.volokh.danylo.video_player_manager.ui.MediaPlayerWrapper.setDataSource(MediaPlayerWrapper.java:164) at com.volokh.danylo.video_player_manager.ui.VideoPlayerView.setDataSource(VideoPlayerView.java:259) at com.volokh.danylo.video_player_manager.player_messages.SetUrlDataSourceMessage.performAction(SetUrlDataSourceMessage.java:24) at com.volokh.danylo.video_player_manager.player_messages.PlayerMessage.runMessage(PlayerMessage.java:40) at com.volokh.danylo.video_player_manager.MessagesHandlerThread$1.run(MessagesHandlerThread.java:61) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818) 09-27 18:52:35.970 14366-14366/linchaolong.test V/VideoPlayerView@12627773: 1 onSurfaceTextureDestroyed, surface android.graphics.SurfaceTexture@1bf8e918 09-27 18:52:35.971 14366-14366/linchaolong.test V/HandlerThreadExtension: post, successfullyAddedToQueue true 09-27 18:52:35.971 14366-14416/linchaolong.test D/ufoEGL: Surface destroy: ANDROID_NATIVE_WINDOW_MAGIC