Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 17663

React Native audio toolkit - iOS stop playing sound issues

$
0
0

We are using react-native-audio-toolkit and it is working fine for Android. However, we are having some weird issue on iOS.

Our setup is that we have over 30 screens and each page will have a player. Different screens will play different sound files from network / local files. The app would be working fine but in random places, the player will stop playing. Once the player stops playing in a page, we won't be able to play audio in any other pages too. After investigation, prepare() function just failed without returning any error after the issue. Anyone has faced this issue?

My player setup is as following:

_player.current = new Player(`file:///${RNFetchBlob.fs.dirs.CacheDir}/voice/1.mp3}`, {      autoDestroy: true,      continuesToPlayInBackground: false,      category: "Ambient",      mixWithOthers: true,    });

After more investigation, it looks like the issue happens a few seconds after a notification comes in from other app. Thanks.


Viewing all articles
Browse latest Browse all 17663

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>