react-native-audio-recorder-player
react-native-audio-recorder-player copied to clipboard
Setting recorder to AAC on iOS results in M4A file
Version of react-native-audio-recorder-player
3.1.2
Version of React Native
0.64.2
Platforms you faced the error (IOS or Android or both?)
iOS
Expected behavior
File recorded has mime type audio/aac
Actual behavior
File recorded has mime type audio/x-m4a
Steps to reproduce the behavior
const audioSet = {
AVFormatIDKeyIOS: AVEncodingOption.aac,
};
const uri = await player.startRecorder(null, audioSet);
Then upload the file to a server and check the media type.
In this case, you get audio/x-m4a
On Android if you set AudioEncoderAndroid: AudioEncoderAndroidType.AAC then you get audio/aac as expected.
@hyochan would you be able to check on this for me? I'm very keen to begin using your excellent library :) Thanks
@gavrichards When aac is provided the avFormat for iOS is kAudioFormatMPEG4AAC.
Could you kindly find out the correct format for iOS if you think this is a wrong value?
That does appear to be correct. I can't understand why it's coming through with the type audio/x-m4a, when if you use React Native Audio Toolkit, you get audio/aac as expected.
same issue ?