Re: [webrtc-pc] Specify when a data channel's ID is assigned, and what the `id` attribute returns when no ID is assigned.

#746 deals with calling `createDataChannel` with an invalid ID. This 
issue deals with calling `createDataChannel` with *no* ID (letting the
 browser choose the ID). Maybe an example will clear things up:

```
pc = new RTCPeerConnection();
dc = pc.createDataChannel("foo");
// What is dc.id? 65535 or null?
// ...
pc.setLocalDescription(offer);
// ...
pc.setRemoteDescription(answer_with_active_role);
// Now we know the DTLS role. An odd value (1) is chosen for dc.id.
```

I think it would be pretty uncontroversial to say the DTLS role (and 
thus the data channel ID) is chosen when applying an answer. So the 
main question is what the `id` attribute returns when no ID is chosen 
yet.

-- 
GitHub Notification of comment by taylor-b
Please view or discuss this issue at 
https://github.com/w3c/webrtc-pc/issues/795#issuecomment-275531573 
using your GitHub account

Received on Thursday, 26 January 2017 22:17:18 UTC