rxlabz / audioplayer

A flutter plugin to play audio files iOS / Android / MacOS / Web ( Swift/Java )

Home Page:https://pub.dartlang.org/packages/audioplayer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Background mode

anusha6666 opened this issue · comments

background play is not working properly,in debug mode it is working fine but in release mode it is not working,do we need to add any permissions?

Is it an iOS specific case, if so please do add the audio background permissions.

I have not yet seen this problem on Android unless you are stopping the player in the onStop() event.

For android is there any particular permissions we need to add to work it in background??

You should probably share your failing code so that we can reproduce the bug and see what we can do about it.
Because I didn't notice any of those problems on Android.

It is not showing any error,In debug mode it is working fine and after release build it got stopped when navigating to another page.

For me background mode in android is working but if the phone is not connected to power, when the screen is off after 1 minutes the audio will stop. If the screen is back on it will play again. I assume it is something related with wifilock and wakelock. I've tried to add wifilock manually in the android code but it didn't fixed the issue. Maybe it required to use Service instead for background mode to fully work.

how did you play in background ?