Description
openedon Mar 11, 2022
This is a follow up of the issue 8728
We encounter the same issue in our application. The context is that we are a feed application where we may play several videos at the same time in the feed. We can also play full screen video from time to time. We try to keep reusing the players that have already been created.
There are several circumstances where we will release a player:
- To treat the system memory nicely, we also release all players if the application goes to the background.
- We will release a player if the cache pool already has enough players, for example, 4. We do this check after the video is scrolled off the screen.
Since we have quite a lot videos in our feed, we try to keep using the players and at the same time, we would release players periodically. There are some pages with lots of videos and we could suddenly release lots of players. I think the current implementation of the defaultAudioLink.flush() would lead to too many threads created in some cases in our application.
This is an example of the crash:
So it would be great to offer something like this
- ExoPlayer version number: 2.14.2
- Android version: OS 10 (this seems only happen on OS 10)
- Android device: many