Re: [webrtc-pc] Default ufrag for addIceCandidate when there are different ufrags in SDP

Thanks for clarifying. The description for the terms "ICE generation" and "ICE session" are pretty short so I wasn't very sure if different ufrags, e.g. `video_ufrag_1` and `audio_ufrag_1`, implies different ICE generation.

The thing that isn't very clear in the spec is that the following call to `addIceCandidate` would have been invalid because the ufrag and sdpMid mismatch:

```javascript
addIceCandidate({
  candidate: '...',
  sdpMid: 'video',
  ufrag: 'audio_ufrag_1'
});
```

However if the ufrag is left empty, it is not clear how the implementation figure that the correct ufrag for `sdpMid: video` is `video_ufrag_1` and not `audio_ufrag_1`.

This issue don't usually arose because current browsers generate the same ufrag for all media streams in an SDP. So it is not very clear how they should behave if they receive remote SDP containing different ufrags.

I think to fix this, we just need to update step 6 of `addIceCandidate` from:

> Use candidate.ufrag to identify the ICE generation; if the ufrag is null, process the candidate for the most recent ICE generation. If candidate.candidate is an empty string, process candidate as an end-of-candidates indication for the corresponding media description and ICE candidate generation.

to:

> Use candidate.ufrag to identify the the corresponding media description and ICE generation; if the ufrag is null, process the candidate for the corresponding media description and the most recent ICE generation. If candidate.candidate is an empty string, process candidate as an end-of-candidates indication for the corresponding media description and ICE candidate generation.

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

Received on Thursday, 18 May 2017 03:32:52 UTC