sdkVersion: 30
isDetach: true
// code snippet
Audio.setAudioModeAsync({
playsInSilentModeIOS: true,
allowsRecordingIOS: false,
interruptionModeIOS: Audio.INTERRUPTION_MODE_IOS_DO_NOT_MIX,
interruptionModeAndroid: Audio.INTERRUPTION_MODE_ANDROID_DO_NOT_MIX,
shouldDuckAndroid: false,
playThroughEarpieceAndroid: false
})
Issue: Even though I set playsInSilentModeIOS to true, Expo Audio is mute in silence mode.
Actually, before playing the sound, I recognize my voice using iOS speech recognizer(using react-native-speech-to-text-ios). If I don’t activate speech recognizer, then this issue is never happened.
Please check the below scenario. Step 6 is problem.
- Recognize the voice through the microphone.
- Finish and stop this module after recognizing.
- start play the sound with above audio mode.
- Firstly, the sound is played well in silence mode.
- Step 1 and 2 again
- In Second, the sound is muted in silence mode.( when I toggle the silence switch on iPhone, the sound is played well)
Any idea or suggestion?
Thanks!