Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix premature collection of MediaPlayer on Android
If the MediaPlayer takes a while to prepare, it's possible that a GC will cause the MediaPlayer to be collected between the time that `prepareAsync` is called and the time that the `OnPreparedListener` is invoked. By moving the assignment of the `playerPool` reference to immediately following the instantiation of the MediaPlayer, we eliminate the risk of premature collection.
- Loading branch information