In my Angular Ion Capacitor app, On IOS, when I have Spotify music playing in the background and then my quiz app makes a sound, the Spotify music stops playing.
Both of these situations will happen:
HTMLAudioElement https://developer.mozilla.org/en-US/docs/Web/API/HTMLAudioElement
and Capacitor Community/Native Audio (source: https://github.com/Capacitor Community/Native Audio/issues/40)
Can anyone solve this problem?
Note: It works on Android
I just solved this problem myself using this package: https://github.com/Cap-go/native-audio
This fork is ahead of the packages you mentioned and is capable of mixing audio. Check out the fade and focus options mentioned in the readme.