Closed OxleyS closed 4 months ago
Nice find!
That documentation about panic seems wrong. I can't see any reason this would panic. However changing the controlling after starting to form pairs of local-remote candidates would be wrong (since it affects candidate prio).
I think this is a simple fix, we can change the controlling mode given the response from the remote. So if we are ice-lite
and remote answers ice-lite
, we change controlling to true, since we were the offerer.
Ah, okay, I wasn't sure if it was okay to change the controlling mode at the point of receiving the answer, but I can see how it is. I might take a stab at this next week.
We currently set str0m unconditionally as the ICE controller when it is the initial offerer. However, according to RFC 5245 Section 5.2:
Assuming the other end is a full agent, str0m in lite mode must set itself as controlled, even as the initial offerer. If that's all there was to it, I'd just go straight to opening a PR 🙂 However, the RFC also says:
So in this instance, str0m would be doing the right thing, but it's not clear how we're supposed to tell whether the other side is ICE lite or not if we're the initial offerer (and thus have no remote
ice-lite
attribute to base it on). We would have to switch our role based on the answer, I think, but that might be too late?Not entirely clear what the best approach here may be (other than utilizing direct API, of course). While I decided against using ICE Lite in my project, since I found this I thought it might be good to file anyway, at least.