Closed alehel closed 4 years ago
This library simply forwards the options to the MediaRecorder:
Hmm, strange. Even when I don't supply an options object, I still don't get the "default" values from the Android code you posted. It states a bitrate of 64000 (64 kbs), but I'm getting much lower than that. More like 5kbs according to the program MediaInfo. I'll try a different phone and see if it affects anything. For some reason selecting 4 for format which according to googles docs is AAC_HE (https://developer.android.com/reference/kotlin/android/media/MediaRecorder.AudioEncoder#AAC:kotlin.Int) causes the app to crash, despite that 4 is supposed to be supported since API 16. So perhaps this is an issue with my phone specifically rather than the code.
By the way. The readme specifies that the option property for bitrate is called bitRate, but based on the Java code on line 27 in the file RNSoundRecorderModule.java it seems like it is supposed to be encodingBitRate. Is this an error in the Readme?
it seems like it is supposed to be encodingBitRate. Is this an error in the Readme?
yeah looks like an oversight
Ok, thanks. I'll update here if I figure out what the issue is.
Nice work on the package by the way, its made my life easier 👍
Probably we can close this issue. We have 2 ways:
bitRate
for android in encodingBitRate
bitRate
to have the same ios name. But this is a breaking change.
I have an app which records environmental sounds and uploads them to an S3 bucket on AWS. I'm trying to set the options for the sound recording, but the options object seems to have no affect on the output file. The code I have for performing the recording is as follow.
The result is an AAC file at 8000 Hz with, according to QuickTime, a bitrate of 12,8 kbps. Am I defining the options object incorrectly? Am I applying it to the wrong function?