[expo-av][sdk33]Audio.Recording won't work after updating to sdk33

I followed the step-by-step to upgrade to SDK33, including changing the imports from expo to the modular library, in the Audio case, importing from expo-av and running expo install expo-av and all that. But it simply doesn’t work.
To make sure, I downgraded to SDK32 (stashed all the changes, removed node_modules and ran npm install again) and everything works fine.

Any ideas? Anybody else running into similar issues with the Audio API?

Hey @esdrasevt,

Can you elaborate on what you mean by “it doesn’t work”? Is there an error presented?

Cheers,
Adam

2 Likes

I recently updated the “audio-recording-example” app (from SDK v27?) to SDK v34. I can’t remember exactly which changes were required for updating from v32 to v33, but off the top of my head, maybe you need to add a couple of keys to Audio.setAudioModeAsync()?

https://github.com/expo/audio-recording-example/commit/e3d693ec6effa424771c40c83608141fa7bc0f1d#diff-958f6f56cd42c904603d226cd36a57b6R146

1 Like

@wodin that did the trick! :clap:
The only thing I was missing was adding the key staysActiveInBackground to the object passed to Audio.setAudioModeAsync()
Thank you so much!

1 Like

No problem, but next time it will be easier for someone to help if you post details like error messages etc. :laughing:

You just got lucky this time because I ran into problems upgrading an audio app recently and thought they might have been similar to your problem.

1 Like

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