Skip to content

Commit

Permalink
fix: add try catch block on mediaRecorder.stop() (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
vitorverasm authored Sep 5, 2020
1 parent 25608cc commit 3225d9a
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,12 @@ public void stopRecorder(Promise promise) {
promise.reject("stopRecord", "recorder is null.");
return;
}
mediaRecorder.stop();
try {
mediaRecorder.stop();
} catch(RuntimeException stopException) {
Log.d(TAG, stopException.getMessage());
}

mediaRecorder.release();
mediaRecorder = null;

Expand Down

0 comments on commit 3225d9a

Please sign in to comment.