ryanheise / just_audio

Audio Player
1.06k stars 681 forks source link

Audio playback interruption on Android devices #1363

Open yelkamel opened 2 weeks ago

yelkamel commented 2 weeks ago

Which API doesn't behave as documented, and how does it misbehave? The just_audio package for Flutter is not behaving as expected on Android devices. Specifically, the audio playback is unexpectedly stopping for some users, even though the progress bar continues to move. This behavior is not documented and appears to be a bug.

Minimal reproduction project Unfortunately, we cannot provide a minimal reproduction project at this time as the issue is not consistently reproducible in development or release environments. It only occurs for some users in production.

To Reproduce (i.e. user steps, not code) Steps to reproduce the behavior:

  1. Start playing an audio file (meditation or sleep music) using the just_audio package
  2. Let the audio play for an indeterminate amount of time
  3. Audio playback stops unexpectedly, but the progress bar continues to move
  4. Attempting to restart playback results in the progress bar moving without audio

Error messages We don't have any error in crashanalytics.

Expected behavior The audio should play continuously without interruption for the entire duration of the audio file.

Screenshots No screenshots are available at this time as the issue occurs randomly for users.

Desktop (please complete the following information): N/A - This issue is specific to Android devices.

Smartphone (please complete the following information):

Flutter SDK version

Additional context

We're seeking assistance in identifying potential causes or additional debugging steps we can take to resolve this issue.

Chaphasilor commented 1 week ago

We are seeing similar reports for Finamp. Related issue: https://github.com/jmshrv/finamp/issues/956
Users report playback stopping a few seconds or minutes after leaving the app or locking the screen (which could be exactly the buffer duration).