Open amrfarid140 opened 2 years ago
As it stands, if you set MusicControl.handleAudioInterruptions(true); this means the android app is listening on audio focus changes.
MusicControl.handleAudioInterruptions(true);
When the app losses focus, the listener calls emitter.onStop which ends up stopping the foreground service.
emitter.onStop
However, not all apps want that. For example, you might want to pause the audio instead of killing the playback altogether.
I am happy to submit a PR for this just opening the issue to take opinions on
Platform ?
Description
As it stands, if you set
MusicControl.handleAudioInterruptions(true);
this means the android app is listening on audio focus changes.When the app losses focus, the listener calls
emitter.onStop
which ends up stopping the foreground service.However, not all apps want that. For example, you might want to pause the audio instead of killing the playback altogether.
I am happy to submit a PR for this just opening the issue to take opinions on
Platform ?