Pacman-Flutter icon indicating copy to clipboard operation
Pacman-Flutter copied to clipboard

Audio is not Paused when App is Closed

Open canewsin opened this issue 2 years ago • 4 comments

Tested on Android.

canewsin avatar Jun 02 '22 10:06 canewsin

Yeah, I am aware of that. If you completely close the app from background applications, then only the audio stops. Otherwise if you just dismiss it, the audio continues

Raj2503 avatar Jun 02 '22 10:06 Raj2503

A suggestion would be to make the audio player a Flutter Background Service. It will reduce the load on the foreground processing, helping with the frame rates.

Plus it will be easier to control and pause the audio in case of the app is dismissed by using AppLifeCycle.

Raj2503 avatar Jun 02 '22 10:06 Raj2503

There is AppLifeCycle Widget, didn't remember the name, this may help to manage app state and audio control.

canewsin avatar Jun 02 '22 10:06 canewsin

I guess this is what you are referring to AppLifecycleState

Raj2503 avatar Jun 02 '22 10:06 Raj2503