audioplayers icon indicating copy to clipboard operation
audioplayers copied to clipboard

Incorrect playback status when using other media apps

Open FrankyLee-dev opened this issue 2 years ago • 4 comments

Checklist

Current bug behaviour

When I use audiolayers to play audio, I open other media applications (such as Apple music), and the audiolayers stop playing. When I switch back to my own application and get the playing status through audioPlayer.state, it is still PlayerState.playing.

Expected behaviour

The current status should be PlayerState.paused

Steps to reproduce

  1. use audiolayers to play audio;
  2. open other media playing applications. At this time, audiolayers play has been paused.
  3. return to audiolayers to query the playing status

Environment information

  • audioplayers version: 1.2.0
  • OS name and version: iOS 16.1.2
  • Device: iPhone11
  • build mode: debug

FrankyLee-dev avatar Jan 07 '23 10:01 FrankyLee-dev

In version 5.1.0, I am also experiencing the same issue. Is there any way to restore the playback state?

DongDian455 avatar Sep 20 '23 08:09 DongDian455

I think we didn't consider or test this use case. Ideally the native platform should send a pause event or some of that kind.

Gustl22 avatar Sep 26 '23 10:09 Gustl22

use audio_servicesync status

FrankyLee-dev avatar Feb 19 '24 07:02 FrankyLee-dev

We should fix this in our lib anyways. I'll keep it open.

Gustl22 avatar Feb 19 '24 07:02 Gustl22