Hi there!
I’m currently having an issue with video + external audio where the video, upon clicking “Play” after it’s paused, causes background audio to pause.
Example Situation:
- I have Spotify open in the background playing music
- I open my app (Spotify still playing in background)
- I play a video in my app (Spotify still playing in background)
- I pause the video in my app (Spotify still playing in the background)
- I continue the video by clicking play again in my app (Spotify music pauses)
This only happens in the Built version of the app. It works perfectly fine when run through the Expo client. Would anyone have any ideas on what might need to be added to our build (assuming that’s where the issue lies) to resolve this?
More Info:
The AVAudioSession is set to Ambient in our AppDelegate.m:
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryAmbient error:nil];
Also using this on componentDidMount():
Audio.setAudioModeAsync({
allowsRecordingIOS: false,
interruptionModeIOS: Audio.INTERRUPTION_MODE_IOS_MIX_WITH_OTHERS,
playsInSilentModeIOS: true,
shouldDuckAndroid: true,
interruptionModeAndroid: Audio.INTERRUPTION_MODE_ANDROID_DUCK_OTHERS,
});
Thanks in advance!
- J