We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
return
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch [email protected] for the project I'm working on.
[email protected]
You seems to forget return from function when MediaRecorder can't prepare. This, probably, leads to a crash in recorder.start().
MediaRecorder
prepare
recorder.start()
Here is the diff that solved my problem:
diff --git a/node_modules/react-native-sound-level/android/src/main/java/com/punarinta/RNSoundLevel/RNSoundLevelModule.java b/node_modules/react-native-sound-level/android/src/main/java/com/punarinta/RNSoundLevel/RNSoundLevelModule.java index 35b3ac4..d788044 100644 --- a/node_modules/react-native-sound-level/android/src/main/java/com/punarinta/RNSoundLevel/RNSoundLevelModule.java +++ b/node_modules/react-native-sound-level/android/src/main/java/com/punarinta/RNSoundLevel/RNSoundLevelModule.java @@ -63,9 +63,15 @@ class RNSoundLevelModule extends ReactContextBaseJavaModule { recorder.prepare(); } catch (final Exception e) { logAndRejectPromise(promise, "COULDNT_PREPARE_RECORDING", e.getMessage()); + return; } - recorder.start(); + try { + recorder.start(); + } catch (final Exception e) { + logAndRejectPromise(promise, "COULDNT_START_RECORDING", e.getMessage()); + return; + } frameId = 0; isRecording = true;
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered:
start
No branches or pull requests
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
[email protected]
for the project I'm working on.You seems to forget return from function when
MediaRecorder
can'tprepare
. This, probably, leads to a crash inrecorder.start()
.Here is the diff that solved my problem:
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered: