Skip to content
New issue

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

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

Open
Abdullo-0901 opened this issue Nov 4, 2024 · 0 comments
Open

Comments

@Abdullo-0901
Copy link

Abdullo-0901 commented Nov 4, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant