Closed chakflying closed 3 years ago
This is not correct. You are not supposed to pass the name of the constants to the API.
I am getting the same error. What @chakflying said is true.
As I said, this is caused by a wrong use of the API.
Instead of SoundRecorder.start(path, {quality: 'QUALITY_MAX'})
you should write SoundRecorder.start(path, {quality: SoundRecorder.QUALITY_MAX})
@kevinresol I saw it as "FORMAT_" in the README.md document so I guess I'm confused and thought we would define it as this string. Now fixed to {source: SoundRecorder.SOURCE_MIC} and it works. Thank you
I'm on react-native 0.63.4, and kept getting native error "Cannot cast String to Double". I think either getConstants() is not getting used correctly, or something is different in the way NativeMap works. Either way this commit should fix the error.