Renegotiating streams?

68 views
Skip to first unread message

Erik Goldman

unread,
Jul 16, 2020, 12:06:16 AM7/16/20
to medooze
Hello! I'm building an application that receives a WebRTC connection from a browser client and then may need to add or remove streams after the connection has been established. In particular, it's a chat room where people can join/leave, so I want to create a stream per user and have it show up on everyone's browser.

Initially, the browser sends an offer (its camera + microphone feed) and medooze sends an answer (receiving that data but not sending anything). As more participants join, however, they'll perform the same handshake and I'd like medooze to add additional tracks to the original connection for these new participants.

Is the best way to do this to have medooze send an offer to an existing connection when a new participant joins? If so, how do I do that? I'm not sure how to create the proper SDP for that renegotiation.

Thank you!

Sergio Garcia Murillo

unread,
Jul 16, 2020, 8:06:30 AM7/16/20
to med...@googlegroups.com
Hi!

You can use the SDPManager to handle the renegotiation server side:

You can find an example of usage on the demo sfu:

You can also use the peerconnection client lib to do it on client side:

Best regards
Sergio
--
You received this message because you are subscribed to the Google Groups "medooze" group.
To unsubscribe from this group and stop receiving emails from it, send an email to medooze+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/medooze/bd75a516-a414-4b3a-842f-0e841d8c75c7o%40googlegroups.com.


Erik Goldman

unread,
Jul 16, 2020, 5:48:26 PM7/16/20
to medooze
Oh great, this helped a lot. Thank you so much!

On Thursday, July 16, 2020 at 5:06:30 AM UTC-7, Sergio Garcia Murillo wrote:
Hi!

You can use the SDPManager to handle the renegotiation server side:

You can find an example of usage on the demo sfu:

You can also use the peerconnection client lib to do it on client side:

Best regards
Sergio
On 16/07/2020 6:06, Erik Goldman wrote:
Hello! I'm building an application that receives a WebRTC connection from a browser client and then may need to add or remove streams after the connection has been established. In particular, it's a chat room where people can join/leave, so I want to create a stream per user and have it show up on everyone's browser.

Initially, the browser sends an offer (its camera + microphone feed) and medooze sends an answer (receiving that data but not sending anything). As more participants join, however, they'll perform the same handshake and I'd like medooze to add additional tracks to the original connection for these new participants.

Is the best way to do this to have medooze send an offer to an existing connection when a new participant joins? If so, how do I do that? I'm not sure how to create the proper SDP for that renegotiation.

Thank you!
--
You received this message because you are subscribed to the Google Groups "medooze" group.
To unsubscribe from this group and stop receiving emails from it, send an email to med...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages