Open maulikvora opened 7 years ago
I am facing the same issue right now using RN 0.41.2 and react-native-audio 3.2.1. It would be really helpful if someone could identify the problem
In my code it was solved in JS this way: if (Platform.OS === 'ios') { Sound.enable(true); } before initializing the new sound. Hope this is helpful.
@BilalYazbek we are already doing this.
We can successfully play audio recorded in ioS. but if audio is recorded in Android, it won't play on iOS. we are using same library for both Android & iOS
Could you please provide the code you're using to play the recording on both android and ios ?
npm install --save react-native-sound@0.10.1
can solve this problem
+1
I got the same issue, but I'm in opposite. Record AAC from iOS but not able to play in Android. I found that the sample app AAC(pew2.aac) is MPEG ADTS, AAC, v4 LC, 44.1 kHz, stereo and the aac record in iOS is MPEG ADTS, AAC, v2 LC, 44.1 kHz, stereo
Hope that can help~
I have fixed this issue by adding option 'OutputFormat' like bellow:
AudioRecorder.prepareRecordingAtPath(newFilePath, {
SampleRate: 22050,
Channels: 1,
AudioQuality: 'Low',
AudioEncoding: 'aac',
OutputFormat: 'aac_adts',
})
I think the example code has missing information .
@minhtc i valued OutputFormat "aac_adts" but still not work , i found that iOS support AAC since iOS3, i also found someone set OutputFormat as "three_gpp" in Android native to make iOS play record well.
Same issue, nothing from above didn't help
I had a similar problem. Recording and playback were working on iOS simulator, but not on iOS device. Following @BilalYazbek and setting
if (Platform.OS === 'ios') { Sound.enable(true); }
solved the problem.
PS: Haven't tested on Android.
I am facing something similar but not the same. Can anyone help?
AAC audio recorded in Android is not playing in iOS devices. Here is the code example how we are recording the audio in Android device. When we try to play that audio in iOS device using react-native-sound, It won't play and shows error like this.
We are using RN 0.41 and react-native-audio 3.2.1
DId anyone face similar issue? let me know if there is any misconfiguration.