audioplayers icon indicating copy to clipboard operation
audioplayers copied to clipboard

Audio playback will not recover from seeking

Open exoad opened this issue 2 years ago • 5 comments

Checklist

  • [X] I read the troubleshooting guide before raising this issue
  • [X] I made sure that the issue I am raising doesn't already exist

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
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

exoad avatar Nov 04 '23 23:11 exoad

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.

Gustl22 avatar Nov 07 '23 15:11 Gustl22

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.

exoad avatar Nov 07 '23 20:11 exoad

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.

tralph3 avatar Dec 11 '23 04:12 tralph3

I will test if this issue exists on Windows

exoad avatar Dec 11 '23 12:12 exoad

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.

Gustl22 avatar Mar 02 '24 16:03 Gustl22