Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

121
Visualizações
Create a voice record reactJS

I am trying to add voice record feature in a chat application ,I have tried this package react-mic it work fine and it give me this data when I stopped the record enter image description here

I want now to send this as a binary file to the backend I have tried this

  let name = `test.ogg`
  let lastModified = new Date()
  let file = new File([{...audioData.blob,name,lastModified}],name,{
    type:"audio/ogg"
  })

but it didn't work as expected It change it to binary but it is not a valid file because when I try to change it and played it in the browser it didn't work ,I have read alot of articles but nothing help

and for the method I used I have follow this article https://pqina.nl/blog/convert-a-blob-to-a-file-with-javascript/

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

I will put this here in case someone want to do the same thing

After trying alot with different packages I used the MediaStream Recording api it is really easy to use and it give me the result I want

This is the url for the documentation https://developer.mozilla.org/en-US/docs/Web/API/MediaStream_Recording_API/Using_the_MediaStream_Recording_API

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda