SDK 45 - expo-av - interruptionModeIOS

Hello. I’m upgrading to SDK 45, and I’m getting this error:

“[Unhandled promise rejection: Error: “interruptionModeIOS” was set to an invalid value.]”

To date, my app has been happily running with this code:

const setAudioSettings = async () =>
			await Audio.setAudioModeAsync({
				playsInSilentModeIOS: true,
				staysActiveInBackground: true,
				interruptionModeIOS: Audio.INTERRUPTION_MODE_IOS_DO_NOT_MIX,
				shouldDuckAndroid: false,
				interruptionModeAndroid: Audio.INTERRUPTION_MODE_ANDROID_DO_NOT_MIX
			});

If I take out the interruptionModeIOS and interruptionModeAndroid settings, the error goes away. But presumably this means the ‘interruption’ issue isn’t addressed.

Any ideas?

Hey @lpgm, it’s always a good practice to reference the CHANGELOG when upgrading SDK versions. Here you’ll find that those interruption mode values were changed to new enums.

Whoops. Indeed. Thanks for pointing that out. Simek has now explained exactly what I need to do on that GitHub thread.

1 Like

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