Search code examples
google-chromewebrtcgetusermedianavigatorsdp

Is it possible to combine media tracks/streams in WebRtc


I have two webcams that I would like to share, but I do not want to have to negotiate two sets of the signaling process (SDP, ICE, all that jazz). Is there any way for me to combine these two stream into one before it goes to another user, or I am stuck with making double negotiations for any other stream device I would like to add. Also I am working with chrome if that is important.


Solution

  • you can add multiple streams to the peerconnection, just call pc.addStream with each stream.

    Note that the way this is currently signaled in SDP is not compatible between Chrome and Firefox.