merge two audio tracks into one track

I was able to do this by using Web Audio API. I fetched the audio tracks from both the streams and joined them into one using audio context.

var OutgoingAudioMediaStream = new MediaStream();

var IncomingAudioMediaStream = new MediaStream();

const audioContext = new AudioContext();

audioIn_01 = audioContext.createMediaStreamSource(OutgoingAudioMediaStream);
audioIn_02 = audioContext.createMediaStreamSource(IncomingAudioMediaStream);

dest = audioContext.createMediaStreamDestination();


var FinalStream =;

This worked perfectly.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top