react-native-sound-player icon indicating copy to clipboard operation
react-native-sound-player copied to clipboard

iOS music from other app stopped when playSoundFile is triggered

Open ansoncsh opened this issue 5 years ago • 2 comments

Hi, I am using this library for playing sound track SoundPlayer.playSoundFile() in my app. Once a sound track is played, the music running by other apps would be stopped. Is there any configuration to prevent it?

Thank you for help!

ansoncsh avatar Aug 30 '19 07:08 ansoncsh

Yes, it should be possible with so native code change. More specifically, we need to change Audio Session Category. I can look into this when I'm free but you can also try tackling it! A PR is greatly appreciated!

johnsonsu avatar Oct 02 '19 14:10 johnsonsu

@johnsonsu thank you for this package 🙌 I'm having the same issue, so took a stab at it in #127. I'm a native noob so all feedback is welcome. Can you take a look when you have a chance please?

BrianH2 avatar Jul 06 '21 20:07 BrianH2