I get a MediaStream containing audio data from WebRTC. Let's call this stream srcStream.
If I have my HTML
<audio id="audio" controls autoplay></audio>
And I run
audioEl = document.querySelector("#audio")
audioEl.srcObject = srcStream
I can hear the audio, and I can see the audio element starting to count the number of seconds.
However, I get multiple audio streams, so I would like to do something more general and join all these streams to a single stream. If I run
audioCtx = new AudioContext()
dst = audioCtx.createMediaStreamDestination()
audioEl.srcObject = dst.stream
src = audioCtx.createMediaStreamSource(srcStream);
src.connect(dst)
The audio shows as playing, but I can't hear any audio played.
Is there a problem with how I create my destination?