Closed henrylearn2rock closed 6 years ago
The default works, but not format: SoundRecorder.FORMAT_MPEGLayer3 Also, .mp4 is essential, a .mp3 in path will also yield the same error
I think ios doesn't support mp3 recording: https://stackoverflow.com/a/10553363/3212365
This library only exposes the relevant API but won't magically makes unsupported features work.
React Native 0.55.4 Debug build on actual device: iPhone 6SE (ios 11.4)
const path = SoundRecorder.PATH_CACHE + "/temp.mp3" Recorder.start(path)
and it throws:
Possible Unhandled Promise Rejection (id: 0): Error: { } Error: { } at createErrorFromErrorData (blob:http://192.168.43.172:8081/93554b83-96f3-4bee-b15f-642f4675953b:2054:17) at blob:http://192.168.43.172:8081/93554b83-96f3-4bee-b15f-642f4675953b:2006:27 at MessageQueue.invokeCallback (blob:http://192.168.43.172:8081/93554b83-96f3-4bee-b15f-642f4675953b:2448:18) at blob:http://192.168.43.172:8081/93554b83-96f3-4bee-b15f-642f4675953b:2193:18 at MessageQueue.guardSafe (blob:http://192.168.43.172:8081/93554b83-96f3-4bee-b15f-642f4675953b:2361:11) at MessageQueue.invokeCallbackAndReturnFlushedQueue (blob:http://192.168.43.172:8081/93554b83-96f3-4bee-b15f-642f4675953b:2192:14) at http://192.168.43.172:8081/debugger-ui/debuggerWorker.js:70:58 console.warn @ YellowBox.js:80 onUnhandled @ Promise.js:42 onUnhandled @ rejection-tracking.js:71 (anonymous) @ JSTimers.js:256 _callTimer @ JSTimers.js:152 callTimers @ JSTimers.js:405 callFunction @ MessageQueue.js:351 (anonymous) @ MessageQueue.js:116 guardSafe @ MessageQueue.js:314 callFunctionReturnFlushedQueue @ MessageQueue.js:115 (anonymous) @ debuggerWorker.js:70