Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 838
user1634494 Avatar asked Nov 08 '25 00:11

user1634494


1 Answers

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.

like image 121
Philipp Hancke Avatar answered Nov 11 '25 12:11

Philipp Hancke



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!