Audiocache stops abruptly until the app restarts only on some devices #745
Replies: 1 comment
-
@Soham-Rakhunde We're experiencing this too. Our production app is run almost exclusively on iOS and users are reporting that everything is working fine and suddenly some random sound "crashes". That specific sound is not played and after that, no other sounds can be played until the user restarts the app. It seems very random and can occur after several hundred sounds are played or just after a few. We have try/catch logic around play(), stop() and we're listening to the "onPlayerError" Stream. We're also using a pool of players, so we have 20 AudioPlayers and every time we play a sound we use the next available AudioPlayer that isn't playing. The thing is that, when one sound crashes, nothing is played. It seems like play() is called on an existing file (mp3) but we never hear any sound, we never get any events on any of the streams (onPlayerStateChanged or onPlayerError). We're using version audioplayers: 0.16.1 with flutter stable (currently 1.22.6). Disk space isn't full on the devices. Audio is working in other apps. Restarting the app helps, but just navigating to ios home screen and back does not help - the "state" of the app is broken in some way and needs a restart. We tried upgrading to newer audioplayers version but after 0.16.2 we get this issue that is blocking us from upgrading: #671. @luanpotter do you have any idea on what's going on here? |
Beta Was this translation helpful? Give feedback.
-
Only on some devices in production app audiocache stops making sounds and it doesn't work until you restart the app.
This isn't reproducible and there are very less devices with this issue and that too it doesn't always occur. And it never occurs while testing.
But I would like a solution to make this consistent for all devices or do I need to form an isolate or different thread to load this? Please Help.
Beta Was this translation helpful? Give feedback.
All reactions