Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Advertising / Reading ICE trickle support #2898

Open
delthas opened this issue Sep 5, 2024 · 1 comment
Open

Advertising / Reading ICE trickle support #2898

delthas opened this issue Sep 5, 2024 · 1 comment

Comments

@delthas
Copy link

delthas commented Sep 5, 2024

TL;DR, this is the issue for tracking the TODO at https://github.com/pion/sdp/blob/master/jsep.go#L91

ICE trickling helps speed up the connection establishment. For it to work though, the receiving side should support it. If we send ICE candidates after the SDP payload for clients who do not support ICE trickling, these candidates would be ignored; we could even send an offer without any candidates and the call would fail entirely.

To know whether the other side supports ICE trickling:

  • The support can be advertised through the signaling channel (which will work without this ticket)
  • The support can be advertised through an SDP ICE option, a=ice-options:trickle

https://datatracker.ietf.org/doc/html/rfc8840#section-4 specifically mentions:

Trickle ICE Agents MUST indicate support for Trickle ICE by including the ice-option "trickle" within all SDP Offers and Answers in accordance to [RFC8838].


To do this, we probably need to add an "ICETricklingSupported" bool option to webrtc.OfferAnswerOptions that the user can set. If set, the a=ice-options:trickle attribute is added to the generated SDP payload.

In addition, we would need to be able to know if the remote side sent the attribute, corresponding to https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/canTrickleIceCandidates in the Web spec. This would probably be a method on SessionDescription?


As for the actual use case, I'd like to half ICE trickling optimistically to speed up connection establishment in an environment where I do not control the remote client so I do not know whether trickling is supported.

@Sean-Der
Copy link
Member

Sean-Der commented Oct 7, 2024

Hey @delthas, Sorry for the delay.

It would be trivial adding a=ice-options:trickle to the Offer/Answer (from Pion). Are you interested in doing that? We shouldn't just uncomment the line in jsep.go, but instead have pion/webrtc pass it in somehow.

We don't care if the remote trickles or not! I don't believe any logic needs to be added as a receiver.

If you aren't interested in contributing tell me and I can have this fixed in 30 minutes :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants