w3c / webrtc-extensions

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

Describe a match algorithm for two RTCIceCandidates #186

Closed sam-vi closed 10 months ago

sam-vi commented 1 year 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.