What is the current recommended way to record audio in a non-expo ReactNative app?
Asked Answered
S

0

12

I have searched npm for "react native audio record" and have not found anything that seems to be maintained, used a lot, and growing in usage. So, how do we currently record audio in non-expo ReactNative apps?

I have used react-native-audio-record, but it had a precipitous decline about a year ago in weekly downloads, and has remained low. And, after recording, on iOS I cannot play any audio file until I restart my app. This issue exists whether I use react-native-sound or react-native-video to try to play an audio file.

I tried react-native-audio-recorder-player but after half a day of trying to follow the setup procedure, researching errors, etc., I gave up - I can't get my project to build for iOS with it.

How should I go about recording audio in a non-expo ReactNative app to be released for iOS and Android? I'm looking for a maintained, mainstream solution.

Sumer answered 11/4, 2023 at 19:22 Comment(3)
Try npmjs.com/package/expo-av It works on both expo and native apps, plus it is actively maintained.Hilarity
I'm using react-native-audio-recorder-player without any issues on both iOS and android, also the installation was very simple. Which kind of errors do you encounter? Also expo-av works flawlessly on bare react-native apps (you have to follow the "bare react native" steps tho). It would also be helpful if you share some code and the issues you encounter with it.Troublesome
@Troublesome thanks, you encouraged me to give it another try. react-native-audio-recorder-player is working well for me now, recording on both iOS and Android. I'm currently still using react-native-sound to play audio, but I expect I can switch to playing audio with rnarp when I need to.Sumer

© 2022 - 2024 — McMap. All rights reserved.