Javascript: Start recording audio at the same time as another

0

This is my code currently. This works, the only problem is that the resulting recording is left with a small defacement and that's what I need to fix.

function startRecording(button) {

  document.getElementById('audio_01').play();
  recorder && recorder.record();

  document.getElementById("recorrrd").style.color = "red";
  document.getElementById("stttop").style.cursor = "pointer";
  document.getElementById("gifff").style.visibility = "visible";

  button.disabled = true;
  button.nextElementSibling.disabled = false;
  __log('Recording...');

}

PS: I already tried to put recorder & & amp; recorder.record (); first than document.getElementById ('audio_01'). play ();

UPDATE: I will explain the problem better. The first audio, which is the one that is played, should be a guide for what you are recording, suppose it is a pulse ... then based on what you hear, you start making other sounds in the recording. When it finishes recording and I put to reproduce the original audio and the engraving just do not remain as it should, it is desfazado. Probably because the record starts some milliseconds before or after the reproduction.

    
asked by mab 24.04.2017 в 23:43
source

0 answers