Open data-retriever opened 2 years ago
Not on the roadmap at the moment, but part of what you mentioned is implemented i.e. you can pass an argument to set_local_description
with an empty sdp
field and it will re-use the last offer but it will not detect the need to generate a new offer.
If anyone wishes to implement support for this the details are available here:
https://w3c.github.io/webrtc-pc/#dom-peerconnection-setlocaldescription
I've managed to achieve a connection using "perfect negotiation" scheme using my implementation: https://github.com/zduny/webrtc/commit/5ceff6ad826c37bd751ba9dc7104fbbc0e5fad33#diff-7df0115dc6a55f713e6ad5ede4c7808165f5f0f12e2447091ca989dbbf11dbeb
But TBH have no idea if it is fully compliant with the specs...
~EDIT: The text below is just a partial solution. I think it was only working because my dummy_sdp
value was being parsed. I'm going to continue working on this. It's just one of many changes that needs to be had to make rollbacks work, :crying_cat_face:~
EDIT (2): Added another patch at the end of this comment that includes the changes necessary to omit the dummy_sdp
value by introducing a new RTCSessionDescription::rollback()
function.
EDIT (3): See new patch below
Is there any update on this? Perfect negotiation seems to be the standard pattern for making robust connections, so would be great if it could be supported out of the box. While the patches look useful for webrtc-rs devs they're not practical for average users who want to depend on stable releases, e.g. the nice rollback
function shared above requires private visibility
Update to the patch from this answer for the latest changes (desc.sdp.clone_from
function usage).
The Perfect Negotiation document says that the set local description method shouldn't receive a argument for a perfect negotiation.
Is this feature already on the roadmap?