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

Define an RTCIceCandidate match algorithm. #192

Closed sam-vi closed 8 months ago

sam-vi commented 9 months ago

Fixes: #186.

The algorithm matches the (non-derived) candidate, sdpMid, sdpMLineIndex, and usernameFragment attributes of RTCIceCandidate.

The candidate match algorithm will be used in the candidate pair match algorithm (#187), which will, in turn, be used in validation steps for RTCIceTransport methods (#188).


Preview | Diff

sam-vi commented 8 months ago

This algorithm is referenced by the candidate-pair match algorithm (#193), which will be used in validation steps for various RTCIceTransport algorithms (#194).

This algorithm is a more lenient approach to candidate matching as compared to object equality, as suggested by w3c/webrtc-pc#2906. If various RTCIceCandidate values are indeed made object-comparable, this PR is unnecessary and the candidate-pair match algorithm can simply test object equality instead.

The wording of the algorithm is based on the codec match algorithm.

Separate steps are needed in the algo for checking null values of sdpMid, sdpMLineIndex, and usernameFragment because null is not a value of type DOMString or of integer types.