From e7fe0e6d7d9c65ab985061c814bf7c290832ccb3 Mon Sep 17 00:00:00 2001 From: Sameer Vijaykar <194338+sam-vi@users.noreply.github.com> Date: Wed, 20 Dec 2023 17:43:04 +0100 Subject: [PATCH 1/2] Define an RTCIceCandidate match algorithm. 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). --- index.html | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/index.html b/index.html index 346d0e2..e33be00 100644 --- a/index.html +++ b/index.html @@ -1100,6 +1100,43 @@
+ The candidate match algorithm given two {{RTCIceCandidate}} |first:RTCIceCandidate| and + |second:RTCIceCandidate| is as follows: +
+
+ If |first|.{{RTCIceCandidate/candidate}} is not [= string/identical to =] |second|.{{RTCIceCandidate/candidate}}, return false
.
+
+ If either (but not both) of |first|.{{RTCIceCandidate/sdpMid}} and |second|.{{RTCIceCandidate/sdpMid}} is
+ null
, or neither of them is null
and |first|.{{RTCIceCandidate/sdpMid}} is not [= string/identical to =]
+ |second|.{{RTCIceCandidate/sdpMid}}, return false
.
+
+ If either (but not both) of |first|.{{RTCIceCandidate/sdpMLineIndex}} and |second|.{{RTCIceCandidate/sdpMLineIndex}} is
+ null
, or neither of them is null
and |first|.{{RTCIceCandidate/sdpMLineIndex}} is not equal to
+ |second|.{{RTCIceCandidate/sdpMLineIndex}}, return false
.
+
+ If either (but not both) of |first|.{{RTCIceCandidate/usernameFragment}} and |second|.{{RTCIceCandidate/usernameFragment}} is
+ null
, or neither of them is null
and |first|.{{RTCIceCandidate/usernameFragment}} is not [= string/identical to =]
+ |second|.{{RTCIceCandidate/usernameFragment}}, return false
.
+
+ Return true
.
+
If either (but not both) of |first|.{{RTCIceCandidate/sdpMid}} and |second|.{{RTCIceCandidate/sdpMid}} is
- null
, or neither of them is null
and |first|.{{RTCIceCandidate/sdpMid}} is not [= string/identical to =]
+ null
, return false
.
+
+ If neither of |first|.{{RTCIceCandidate/sdpMid}} and |second|.{{RTCIceCandidate/sdpMid}} is null
, and |first|.{{RTCIceCandidate/sdpMid}} is not [= string/identical to =]
|second|.{{RTCIceCandidate/sdpMid}}, return false
.
If either (but not both) of |first|.{{RTCIceCandidate/sdpMLineIndex}} and |second|.{{RTCIceCandidate/sdpMLineIndex}} is
- null
, or neither of them is null
and |first|.{{RTCIceCandidate/sdpMLineIndex}} is not equal to
+ null
, return false
.
+
+ If neither of |first|.{{RTCIceCandidate/sdpMLineIndex}} and |second|.{{RTCIceCandidate/sdpMLineIndex}} is null
and |first|.{{RTCIceCandidate/sdpMLineIndex}} is not equal to
|second|.{{RTCIceCandidate/sdpMLineIndex}}, return false
.
If either (but not both) of |first|.{{RTCIceCandidate/usernameFragment}} and |second|.{{RTCIceCandidate/usernameFragment}} is
- null
, or neither of them is null
and |first|.{{RTCIceCandidate/usernameFragment}} is not [= string/identical to =]
+ null
, return false
.
+
+ If neither of |first|.{{RTCIceCandidate/usernameFragment}} and |second|.{{RTCIceCandidate/usernameFragment}} is null
and |first|.{{RTCIceCandidate/usernameFragment}} is not [= string/identical to =]
|second|.{{RTCIceCandidate/usernameFragment}}, return false
.