I've been trying to use this library to create a playlist that plays in the background and ducks other sounds.
I was able to implement ducking just fine. However, the only way I could get it to play as a playlist was to "cheat" by looping an inaudible sound and then, through JS, loading the next file after the currently playing one finishes. The looped inaudible sound keeps my in control of the system audio. If I do not loop the inaudible sound then the current file will continue playing in the background, but the app will not advance to the next item on the playlist.
This can't be the right way to do it. Music players (Spotify etc.) are easily able to advance to the next sound while in the background.
Any ideas how this should be done with react-native sound?
Thanks
How did you implement ducking? You manually lowered the system sounds?
I've been trying to use this library to create a playlist that plays in the background and ducks other sounds.
I was able to implement ducking just fine. However, the only way I could get it to play as a playlist was to "cheat" by looping an inaudible sound and then, through JS, loading the next file after the currently playing one finishes. The looped inaudible sound keeps my in control of the system audio. If I do not loop the inaudible sound then the current file will continue playing in the background, but the app will not advance to the next item on the playlist.
This can't be the right way to do it. Music players (Spotify etc.) are easily able to advance to the next sound while in the background.
Any ideas how this should be done with react-native sound?
Thanks
You said you were able to implement ducking. I tried multiple solutions with :
Sound.setCategory('Playback');
Sound.setMode('SpokenAudio');
However the duck is not working and the audios are at the same volume.
Do you have the solution ?
Thx.
Most helpful comment
How did you implement ducking? You manually lowered the system sounds?