Play recorded audio files on both Android ans iOS

I am using the Audio.Recording class of AV to record sounds on my Chat App.
On Android when using the default audio preset config for LOW_QUALITY, it returns an audio file with the extension .3gp
And on iOS it returns an audio file with the extension.caf

The problem is that the Sound Player cannot play .caf files on Android and the same way, .3gp files cannot been played on iOS.

Is there any way to record audio files so that there can been played on both OS Platforms automatically ?

I have also try order customs recordingOptions, but nothing works for both OS.

1 Like

I’m facing the same issue this very moment

I noticed itunes on my mac wasn’t playing files recorded with android.
It started playing it when I just changed the extension of the file to .m4a!
That’s the format the high-quality format on android uses.
I just made the file I upload have a .m4a in the name and it started playing on iOS

I am having the same issue. I am using the Audio.Recording on expo SDK41 and I am able to record audio on IOS and Android. However, playing sounds is failing on Android for .caf files only. I am able to play both .caf and .m4a files on IOS.

I tried to play with the outputFormat for ios on RecordinOptions dictionary, however it did not work.

Any updates on this issue?.

It has been resolved in Expo-AV: Recorded sounds on Android cannot be played on iOS · Issue #11952 · expo/expo · GitHub

If the recorded audio files cannot be played, you may convert them to MP3 with the help of Avdshare Audio Converter.