Play audio in silent mode on iOS

This commit is contained in:
Hanjiang Yu 2022-11-25 22:31:49 +08:00
parent bd750da9d5
commit 0e9ef0ec40
1 changed files with 1 additions and 0 deletions

View File

@ -6,6 +6,7 @@ const audio = () => {
Audio.setAudioModeAsync({ Audio.setAudioModeAsync({
interruptionModeIOS: InterruptionModeIOS.MixWithOthers, interruptionModeIOS: InterruptionModeIOS.MixWithOthers,
interruptionModeAndroid: InterruptionModeAndroid.DuckOthers, interruptionModeAndroid: InterruptionModeAndroid.DuckOthers,
playsInSilentModeIOS: true,
staysActiveInBackground: false staysActiveInBackground: false
}) })
} }