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

796
Visualizações
Failed to load resource: net::ERR_REQUEST_RANGE_NOT_SATISFIABLE - Audio recorder API Error

My recording application is giving me the following error:

blob:https://theharnishes.com/f86f14a7-53cf-4d21-a137-deb145c95b73:1 Failed to load resource: net::ERR_REQUEST_RANGE_NOT_SATISFIABLE

You can see three buttons. PLAY, RECORD, and STOP RECORDING. From its context, we should know what button does what. When I clicked the RECORD button, nothing is displayed in the console. When I clicked the STOPPING RECORDING, first, the console logs my array of audio chunk and then the error message. Finally when I clicked the PLAY button, another strange error appeared:

Uncaught (in promise) DOMException: The element has no supported sources.

This error I understand. Because I have requested the video device rather than the audio device. I later changed navigator.mediaDevices.getUserMedia({video:true}) to {audio:true}. I went back to my webpage and the last error didn't go away. I want the application to play the recorded audio when the PLAY button is clicked.

Live example (be sure to allow the use of your microphone). It is outsourced, because Stack Snippets don't allow the use of getUserMedia.

var recordedChunck = [];
var audio_play;
var audioRecorder;

function record() {
  document.getElementById("record_message").innerHTML = "Recording...";
  navigator.mediaDevices.getUserMedia({
      audio: true
    })
    .then(function(data) {
      audioRecorder = new MediaRecorder(data);
      audioRecorder.start();
      audioRecorder.addEventListener('dataavailable', function(event) {
        recordedChunck.push(event.data);
        console.log(recordedChunck);
      });
    }).catch(function(error) {
      console.log(error);
    });
}

function Stop() {
  audioRecorder.stop();
  var blob = new Blob(recordedChunck);
  var audioUrl = URL.createObjectURL(blob);
  audio_play = new Audio(audioUrl);
}

function play() {
  audio_play.play();
}
<p id="record_message">
</p>
<button onclick="record()" style="color:blue; font-size:16px;">
RECORD
</button>
<button onclick="Stop()" style="color:blue; font-size: 16px;">
STOP RECORDING
</button>
<button onclick="play()">
PLAY
</button>
about 4 years ago · Juan Pablo Isaza
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