zmxv / react-native-sound

React Native module for playing sound clips
MIT License
2.78k stars 749 forks source link

SetActive doesn't work #689

Open Inomezi opened 4 years ago

Inomezi commented 4 years ago

:beetle: Description I'm want to pause music from another app, play own sound, then unpaused it.

Sound.setCategory("Playback")
this.sound = new Sound(`${ringtone}.mp3`, Sound.MAIN_BUNDLE, () => {
 Sound.setActive(true)
 this.sound.play( () => {
     Sound.setActive(false) // doesn't work
  })
})

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?

ben-wright commented 3 years ago

hey @Inomezi did you manage to resolve this? I'm facing the same issue.