Open Linoa65 opened 5 years ago
I think I'm having a similar issue, I'm not able to play any sounds in some devices, but a soon as a play a video, all the sounds start playing as expected.
Check out the solution in https://github.com/zmxv/react-native-sound/issues/788, I layed out the steps of how I solved playing background and foreground audio over music streaming with the OP's help
It would also be good to set your app capability to have background sound Don't forget to actively set your Sound Module category to Playback and make sure Setactive(true) is called Just once after you set your category.
Having a setup method you call once would be helpful
:beetle: Description
Hi !
I have an issue with playing background sound on IOS. After hard testing, I think we are unable to play sound in background only if we have not already played a sound before. For my case, I receive VoIP notification, then I want to play a sound in Playback mode and no sound is played. My functions are called correctly with no error, but there is just no sound.
If just before my notification I open my app, play a sound, then send it to background, I'm able to play a sound in background.
:beetle: What is the observed behavior?
No sound played in background on IOS, in Playback mode, if it is "first" sound played since some minutes after sending app to background.
:beetle: What is the expected behavior?
Sound get play in all cases when app is in background.
:beetle: Please post your code:
Call of method :
Play sound method :
:bulb: Does the problem have a test case?
:bulb: **Possible solution**:bulb: Is there a workaround?
:bulb: If the bug is confirmed, would you be willing to create a pull request?
Is your issue with...
Are you using...
Which versions are you using?
Does the problem occur on...
If your problem is happening on a device, which device?