bluefireteam / audioplayers

A Flutter package to play multiple audio files simultaneously (Android/iOS/web/Linux/Windows/macOS)
https://pub.dartlang.org/packages/audioplayers
MIT License
2k stars 845 forks source link

Audio playback will not recover from seeking #1690

Open exoad opened 11 months ago

exoad commented 11 months ago

Checklist

Current bug behaviour

When I am trying to seek using a slider on Flutter, there would be a certain amount of seeks before the AudioPlayer gives up playback and logs the following AudioEvents:

...
flutter: [AUDIO]: Event [AUDIOEVENT(EVENTTYPE: AUDIOEVENTTYPE.POSITION, DURATION: NULL, POSITION: 0:00:20.764000, LOGMESSAGE: NULL, ISPREPARED: NULL)]
flutter: [AUDIO]: Event [AUDIOEVENT(EVENTTYPE: AUDIOEVENTTYPE.POSITION, DURATION: NULL, POSITION: 0:00:20.764000, LOGMESSAGE: NULL, ISPREPARED: NULL)]
...

After that, it will never recover the playback. The only way to recover is to restart the application (AKA Flutter).

Expected behaviour

Either there should be some lag and then recover the playback (ie continue playing).

Steps to reproduce

  1. Execute flutter run on the code sample
  2. ...
  3. ...

Code sample

Code sample ```dart void main() { } ```

Affected platforms

Linux

Platform details

Manjaro 6.1.5-11

AudioPlayers Version

5.2.0

Build mode

debug, profile, release

Audio Files/URLs/Sources

No response

Screenshots

No response

Logs

my relevant logs
Full Logs ``` my full logs or a link to a gist ``` Flutter doctor: ``` Output of: flutter doctor -v ```

Related issues / more information

241

Working on PR

no way

Gustl22 commented 11 months ago

Thanks for the report. I'll have a look in a couple of weeks. Currently I'm bit busy. Feel free to work on a solution.

exoad commented 11 months ago

Thanks for the report. I'll have a look in a couple of weeks. Currently I'm bit busy. Feel free to work on a solution.

Got it! I will see what I can do.

tralph3 commented 10 months ago

I can confirm I'm facing the same issue on Arch Linux. Seek works fine for a couple of them, then starts not responding, or doing multiple seeks, and eventually the playback stops and doesn't recover at all.

exoad commented 10 months ago

I will test if this issue exists on Windows

Gustl22 commented 7 months ago

I experience the same on the Example app, but with only this error message:

flutter: AudioPlayers Log: Could not query current duration.
Source: UrlSource(url: https://luan.xyz/files/audio/ambient_c_motion.mp3)

Sometimes it does start the playback after a while, but not always. Not sure, what is going on here, probably too much traffic. If one resets the audio source, the playback continues without restarting the app.