Video interrupts audio in other apps

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:

  1. I have Spotify open in the background playing music
  2. I open my app (Spotify still playing in background)
  3. I play a video in my app (Spotify still playing in background)
  4. I pause the video in my app (Spotify still playing in the background)
  5. 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():

	allowsRecordingIOS: false,
	playsInSilentModeIOS: true,
	shouldDuckAndroid: true,

Thanks in advance!

  • J

Hi! Does this issue still occur if you serve the app to the Expo Client with development mode turned off? If it does still happen, can you upload an MCVE we can use to reproduce the issue?

Hi @dikaiosune! I haven’t tried out development mode on/off when running on the Expo Client yet, but I’ll see if that has any effect on it!

To clarify though, the issue doesn’t happen on the Expo Client (I believe I last tested in development mode).
The issue only happens to the built-out app (TestFlight / App Store version).

Thanks for the pointers though and I’ll post back on the results of the test and if it doesn’t end up working I will post a MCVE for it! :smiley:

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.