w3c / webrtc-extensions

A repository for experimental additions to the WebRTC API
https://w3c.github.io/webrtc-extensions/
Other
58 stars 19 forks source link

Describe a match algorithm for two RTCIceCandidates #186

Closed sam-vi closed 8 months ago

sam-vi commented 10 months ago

Matching of RTCIceCandidates is used by operations that take one or more RTCIceCandidatePair dictionaries as inputs, validate the input, and instruct the ICE agent to perform some action on the respective candidate pairs (eg. setSelectedCandidatePair).

There are two options for match RTCIceCandidates:

  1. An instance match
  2. A comparison of the candidate, sdpMid, sdpMLineIndex, and usernameFragment attributes of RTCIceCandidate

Option 2 may be preferable since the RTCIceCandidate is JSON-stringifiable with those 4 attributes.