3

I'm trying to merge Audio & Video Streams. I'm using p5.js and am unable to figure out how to get a mediastream object from P5.js 's AudioIn Function?

Below is the code snippet :

audioRecorder = new p5.SoundRecorder();
audioRecorder.setInput(voiceStream);
voiceStream.start();
let ctx = new AudioContext();
let sourceNode2 = ctx.createMediaStreamSource(voiceStream);
let dest = ctx.createMediaStreamDestination();
//... connecting stream to dest code goes here
let audioTrack = dest.stream.getAudioTracks()[0];
NazimZeeshan
  • 615
  • 1
  • 7
  • 12

0 Answers0