Skip to content

Commit

Permalink
More fixes in #559 (#560)
Browse files Browse the repository at this point in the history
Android Recorder Reset on Stop
Refactor: Eliminate Redundant Release Command

---------

Co-authored-by: Efstathios Ntonas <stathis@hikiapp.com>
Co-authored-by: hyochan <dooboolab@gmail.com>
  • Loading branch information
3 people committed Oct 31, 2023
1 parent 2dd7017 commit 4a62afd
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,14 @@ class RNAudioRecorderPlayerModule(private val reactContext: ReactApplicationCont

try {
mediaRecorder!!.stop()
mediaRecorder!!.reset()
mediaRecorder!!.release()
mediaRecorder = null
promise.resolve("file:///$audioFileURL")
} catch (stopException: RuntimeException) {
stopException.message?.let { Log.d(tag,"" + it) }
promise.reject("stopRecord", stopException.message)
}

mediaRecorder!!.release()
mediaRecorder = null
promise.resolve("file:///$audioFileURL")
}

@ReactMethod
Expand Down

0 comments on commit 4a62afd

Please sign in to comment.