the update of audio-recording-example, this patch, make it crash…
I find that I just back to the old codes…, and everything is ok…
I can’t run the example without Audio.setIsEnabledAsync(true);
And I will get error with this function: const { sound, status } = await this.recording.createNewLoadedSound()
react-native-sound is a native module that isn’t included in Expo. We’ve developed our own audio APIs and include those (I see you’ve come across those). In any case, you won’t be able to use react-native-sound without detaching/ejecting to ExpoKit.
@liu_fanyi – I’m sorry to have let this slip and never followed up with you!
If you are still debugging this problem, try opening exp://exp.host/@community/record (which is just audio-recording-example) on your iPhone and let me know if the problem persists. audio-recording-example was developed on exp/XDE instead of CRNA, so it might be an idiosyncrasy on CRNA that is giving you this problem.
Also, as @ccheever mentioned, it’s not possible to use react-native-sound with Expo without detaching/ejecting.
@hongyuchen – to be precise, you are also hearing playback of recorded sounds as coming through the receiver instead of the speaker on iPhone 5S? Can you let me know if this also happens with the official examples of exp://exp.host/@community/record and exp://exp.host/@community/playlist on your device, and any more specifics so I can try to reproduce this problem?
It looks like both examples work. However, as liu mentions, even if I just copy the code over, it doesn’t seem to work. On Android, it’s fine, but on iOS it plays only on the receiver.
As I told @hongyuchen on Slack, I have investigated this and it turns out that the Audio mode allowsRecordingIOS sometimes routes audio output to the receiver instead of to the speaker. We will see if we can clarify this API, and plan to eventually provide a route API to select the output destination of your audio, but for now, I would do the following:
I’m curious if any progress has been made on this. I am having issue where sound only via headphones on ios while it works fine on android. I’m using vanilla example, i.e. https://snack.expo.io/Hy6CaPpHW. I’m using an iPhone 5s.
I tried adding this but of course is not part of Expo and I believe is plain react-native, so fails on exp publish
stupid error on my part - I wasn’t waiting for the async to return. eg, I had to change:
this Audio.setAudioModeAsync
to await Audio.setAudioModeAsync
Hey, here to document my issues and solution for Android.
I was having issues too with mega quiet recordings, whether through receiver or some other reason. The iOS solution above relative to allowsRecordingIOS solved my iOS issues, but not my android ones.Turns out that “playThroughEarpieceAndroid: false” plays a similar role for Android.
When preparing to record audio, the following configuration works well for me on both iOS and Android:
Hi, is it possible to BOTH record audio and playback from the main speaker at the same time? As mentioned in this thread, when allowsRecordingIOS: true the playback always seems to come from the headset. Is there anyway around this?
I understand the potential problem here is the microphone picking up speaker audio, but other apps like TikTok seem to not have an issue with this.