prscX / react-native-voice-recorder

React Native: Native Audio Recorder View
Apache License 2.0
93 stars 14 forks source link

How to start/top the recording? #25

Open enigmablue opened 3 years ago

enigmablue commented 3 years ago

I'm trying to let users record their voice to send a voice a message.

I'm trying to do a recording and I am triggering this record function below. But then I don't see a way to stop the recording? Could someone help share some tips on how this package works?

I don't see this part documented in the readme.

  RNVoiceRecorder.Record({
          format: 'wav',
          onDone: (path) => {
            console.log('record done: ' + path)

            recordingPath = path;
          },
          onCancel: () => {
            console.log('on cancel')
          }
        });