0

I am just concerned with audio, and I'd like to send two audio streams to be synced on the receiver's side.

Now, for audio and video, the local stream can be obtained via

getUserMedia({'audio':true, 'video':constraints}, onUserMediaSuccess,
               onUserMediaError);

Assuming I have two microphones, how do I get access to the two audio streams, and further, synchronize them at the receiver?

cggaurav
  • 565
  • 5
  • 20

1 Answers1

1

I think it will be possible soon.

var audio1 = new AudioStreamTrack(constraints1);
var audio2 = new AudioStreamTrack(constraints2);
var stream = new MediaStream([audio1, audio2]);
navigator.getUserMedia(stream, successCb, errorCb);

You'll be able to track both audio/video streams and combine them in a single stream.

Muaz Khan
  • 7,138
  • 9
  • 41
  • 77