Hi thank you for this. I'm encountering this error on the saveToPhoneLibrary function: media library save asset err [Error: This file type is not supported yet]
I'm using EXPO-AV to record and call this function as soon as the recording ends on the phone. How did you go around resolving this?
Hey William, are you developing for Android or iOS? You may have trouble with the iOS audio filetype because the extensions are different and iOS file/simulator isn't available yet, a very unfortunate nuance.
Thank you for replying. I'm writing react native app, currently using iOS. I used Expo-AV to record the audio and the file recorded as .caf, which cannot be stored in the album ( at least I don't think). I then tried to record it as a MP4 file with MPEG4AAC encoding. Then the error for saveToPhoneLibrary() became "[Error: Asset couldn't be saved to photo library]".
Did you encounter the same problem? Sounds like you were developing on Android so there's no issue for you.
Thats exactly the case William, my team and I discovered this issue when testing our app on both an android and iphone. We were able to save and retrieve our Android audio files at will for our audio recording app, but not for an iPhone, and thats when we discovered .caf is an incompatible file type. As far as I know, Expo hasnt had an update that supports iOS file types, which is a bummer.
I'm sorry, I'm not sure, I havent looked into the Expo docs recently
Edit:
My curiosity got the better of me and y'all questions have inspired me to bring this project back to life so I will continue to keep this updated. As of 07/24/2020, Expo's Audio recording feature is still incompatible with the iOS Simulator so essentially, this still only works for Android audio files. Check out the Audio Recording Docs for more insight
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi thank you for this. I'm encountering this error on the saveToPhoneLibrary function: media library save asset err [Error: This file type is not supported yet]
I'm using EXPO-AV to record and call this function as soon as the recording ends on the phone. How did you go around resolving this?
Hey William, are you developing for Android or iOS? You may have trouble with the iOS audio filetype because the extensions are different and iOS file/simulator isn't available yet, a very unfortunate nuance.
Thank you for replying. I'm writing react native app, currently using iOS. I used Expo-AV to record the audio and the file recorded as .caf, which cannot be stored in the album ( at least I don't think). I then tried to record it as a MP4 file with MPEG4AAC encoding. Then the error for saveToPhoneLibrary() became "[Error: Asset couldn't be saved to photo library]".
Did you encounter the same problem? Sounds like you were developing on Android so there's no issue for you.
Thats exactly the case William, my team and I discovered this issue when testing our app on both an android and iphone. We were able to save and retrieve our Android audio files at will for our audio recording app, but not for an iPhone, and thats when we discovered .caf is an incompatible file type. As far as I know, Expo hasnt had an update that supports iOS file types, which is a bummer.
Hi. Do you know if they support it now?
I'm sorry, I'm not sure, I havent looked into the Expo docs recently
Edit:
My curiosity got the better of me and y'all questions have inspired me to bring this project back to life so I will continue to keep this updated. As of 07/24/2020, Expo's Audio recording feature is still incompatible with the iOS Simulator so essentially, this still only works for Android audio files. Check out the Audio Recording Docs for more insight