dimanche 5 avril 2020

JavaScript (WebClient) - recording and playing audio streams at the the same time?

I am trying to create a webapp which:

  1. records an audio stream from the microphone
  2. plays the recorded audio stream and records at the same time a second stream from the microphone
  3. merge both streams together ..

For (1) I am using new MediaRecorder(stream) etc.

For (2) I am using new Audio(audio1.audioUrl).play() + new MediaRecorder(secondStream)

For (3) I am using new OfflineAudioContext(..)

Step (2) works some times, some times not. It seems thatAudio.play() and MediaRecorder.start() at the same time interfere with each other. Any ideas?

Thanks.




Aucun commentaire:

Enregistrer un commentaire