Re: [webrtc-pc] Accept relayProtocol and url in RTCIceCandidate constructor (#3038)

> The test asserts the presence of "relayProtocol" on candidates gathered from a stun server?

They're testing the constructor, which is garbage in garbage out.

> ```
>       assert_equals(candidate.relayProtocol, 'udp', 'relayProtocol');
>       assert_equals(candidate.url, 'stun:stun.example.org', 'url');
> ```
> 
> How is that not violating https://w3c.github.io/webrtc-pc/#dom-rtcicecandidate-relayprotocol?

The WebRTC spec has a habit of writing normative prose in property descriptions, which is inaccurate. In this case, the prose on interface members describes the invariants guaranteed by the ICE agent's [surface a candidate](https://w3c.github.io/webrtc-pc/#dfn-surface-the-candidate) agorithm. This breaks down since it's not the sole source of ice candidate interfaces.

No spec is violated by these tests AFAICT.

> And how is
> 
> ```
>       relayProtocol: 'tls',
>       url: 'turn:turn.example.net'
> ```
> 
> gathering a tls relay candidate from a `turn:` url?

No gathering is happening here.

That said, I'm all for having more realistic candidates portrayed in WPT, so feel free to update the examples to make more sense!

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


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

Received on Thursday, 27 March 2025 01:21:12 UTC