tv-samples
tv-samples copied to clipboard
Refactor: enhance player architecture and fix background playback issue
Here is a list of Improvements this PR Tends to Fix.
- Scoped ExoPlayer to ViewModel to prevent reuse after release
- Removed singleton usage to avoid dead thread crashes
- Ensured ExoPlayer releases on screen exit via onCleared()
- Fixed bug where video continued playing after user left the app
- Improved separation of concerns via VideoPlayerManager abstraction
Closes #206
Previous Behavior
- Initiating a new play, previous play continue and and they play concurrently.
- When user Quits the Jetstream app, the video continues playing in background as Audio.
- User is unable to tell where to stop it whenever it continues to play after app is quit.
Expected behavior
- Player instance is one. One single play at a time. Initiating another play, disposes previous and begins another correctly.
- Player releases whenever user quits app and does not continue playing in the background.
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.