Re: [webrtc-pc] Connection establishment should be "failed" even without candidates (#2698)

> Hmm. Just because we have received no candidates from the other end does not mean we're sunk. If the other side is able to get an ICE check to land on us, that gives us a peer reflexive candidate to work with, and ICE can then succeed.

@docfaraday Interesting, that undermines my "UA knows nothing more can happen" rationale above for sure.

The spec nonetheless appears to say we're sunk unless this happens before end-of-candidates. But since nobody implements that, it's not too late to change of course. But to what? A timeout? What's the plausible use case?

> This might be different because `end-of-candidates` is explicit.

@lgrahl It's actually implicit, because the [spec mandates](https://w3c.github.io/webrtc-pc/#rtcicetransport) browsers emit an `icecandiate` event with a candidate whose member _"candidate is set to an empty string"_. Most JS signaling will blindly shuffle this Trojan marker to  [addIceCandidate](https://w3c.github.io/webrtc-pc/#dom-peerconnection-addicecandidate) where it indicates _"the end of remote candidates when called with an empty string for the candidate member"_. 

Firefox implements this. See the second-to-last line in this output from https://jsfiddle.net/jib1/agjcdm4k/
```js
candidate.candidate = "candidate:0 1 UDP 2122252543 192.168.1.XXX 64950 typ host"
candidate.candidate = "candidate:2 1 TCP 2105524479 192.168.1.XXX 9 typ host tcptype active"
candidate.candidate = "candidate:0 2 UDP 2122252542 192.168.1.XXX 63094 typ host"
candidate.candidate = "candidate:2 2 TCP 2105524478 192.168.1.XXX 9 typ host tcptype active"
candidate.candidate = "candidate:1 1 UDP 1686052863 XXX.XXX.XXX.XXX 64950 typ srflx raddr 192.168.1.XXX rport 64950"
candidate.candidate = "candidate:1 2 UDP 1686052862 XXX.XXX.XXX.XXX 63094 typ srflx raddr 192.168.1.XXX rport 63094"
candidate.candidate = ""
candidate = null
```
OTOH, it's explicit in the sense that JS has the ability to override this by delaying end-of-candidates. But I hope I've shown above that we must assume it is signaled by default.

-- 
GitHub Notification of comment by jan-ivar
Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/2698#issuecomment-982177135 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 30 November 2021 00:50:56 UTC