sipsorcery
sipsorcery copied to clipboard
Add support for WebRTC session re-negotation
As per the Session Negotiation Model.
Also see https://blog.mozilla.org/webrtc/perfect-negotiation-in-webrtc/ for additional context.
Hi,
Are there any plans to support re-negotiation? One of our projects switched to a model where re-negotiations do happen and, after a few hours of debugging, I found this post :)
In my case, I have a dotnet client where I'm using the sipsorcery lib. This client is establishing a WebRTC session with a remote party. That remote party is responsible with creating the original offer. I take that offer, set it to my local RtcPeerConnection as a remote description and then generate an answer.
A few seconds later, a new offer is being generated (for the same peer connection) and I'm going throught the same flow.
Thank you, Cristian
It's certainly a desired feature and is on the radar. As far as a likely timeframe I don't have one at the moment.
ok, thank you!
Hey @cristianmad
Did you have a go at implementing the re-negotation? I'll be trying myself soon so just want to check if it was possible.
Thanks, Denny
Hi Denny,
I did not. In the end I had to switch to using the Mixed Reality WebRTC lib. I think that someone has already imlemented some support for media re-negotiation for sipsorcery, however the part that is missing is the ability to have multiple tracks of the same kind in one session. For example, in my case, I need to be able to add/remove audio and video tracks (more than 1 for each type) without having to tear down and re-establish the RTCPeerConnection.
Unless it has recently been added, as far as I could tell, sipsorcery only supports a single track of each type per connection (up to 1 audio and 1 video track). The re-negotiation might work if you want to update those existing tracks, but not add new ones (in order to have more than 1 audio track for example).
Hi @dennybm , Hi @cristianmad ,
Please take a look to this thread #708 and this branch Use_Multi_AudioStream_or_VideoStream
I have added support of Multi-Audio Stream and Multi-Video Stream. I detailed in #708 how I managed it.
@ChristopheI Is there any docs on how to do re-negotiation or is it still not supported? I get the onnegotiationneeded raised when I add a track, just not sure how to do re-negotiation.
Thanks!