hyochan/react-native-audio-recorder-player

When I pause the audio, I want to stop the audio but i get error

Opened this issue · 0 comments

This my code
`

async function onStopRecord(): Promise {
if (!audio.recordSecs) return

const result = await audioRecorderPlayer.stopRecorder()
audioRecorderPlayer.removeRecordBackListener()
setAudio({
  ...audio,
  recordSecs: 0,
  recordTime: "00:00:00",
})

const file = await fetch(result).then((response) => {
  return response.blob()
})

const fileType = await new Promise<FileType>((ok, fail) => {
  const reader = new FileReader()
  reader.onload = () => {
    const dataUrl = reader.result as string
    const fileType: FileType = {
      id: CryptoUtils.sha256(dataUrl),
      name: "audio",
      size: file.size,
      mimeType: file.type,
      data: dataUrl,
      duration: audio.recordTime,
    }
    ok(fileType)
  }
  reader.onerror = fail
  reader.readAsDataURL(file)
})
onAudioReady(fileType)

}
` this is issue

WARN Sending rn-recordback with no listeners registered.
WARN Sending rn-recordback with no listeners registered.
WARN Sending rn-recordback with no listeners registered.
WARN Sending rn-recordback with no listeners registered.
WARN Sending rn-recordback with no listeners registered.
WARN Sending rn-recordback with no listeners registered.
WARN Sending rn-recordback with no listeners registered.
WARN Sending rn-recordback with no listeners registered.
WARN Sending rn-recordback with no listeners registered.
WARN Sending rn-recordback with no listeners registered.
WARN Sending rn-recordback with no listeners registered.
WARN Sending rn-recordback with no listeners registered.
WARN Sending rn-recordback with no listeners registered.
WARN Sending rn-recordback with no listeners registered.
WARN Sending rn-recordback with no listeners registered.
WARN Sending rn-recordback with no listeners registered.
WARN Sending rn-recordback with no listeners registered.
WARN Sending rn-recordback with no listeners registered.
WARN Sending rn-recordback with no listeners registered.

can you help me.Thaks