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 @@

Dictionary RTCIceCandidatePairEventInit Members

+

+ The candidate match algorithm given two {{RTCIceCandidate}} |first:RTCIceCandidate| and + |second:RTCIceCandidate| is as follows: +

+
    +
  1. +

    + If |first|.{{RTCIceCandidate/candidate}} is not [= string/identical to =] |second|.{{RTCIceCandidate/candidate}}, return false. +

    +
  2. +
  3. +

    + 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. +

    +
  4. +
  5. +

    + 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. +

    +
  6. +
  7. +

    + 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. +

    +
  8. +
  9. +

    + Return true. +

    +
  10. +

From ba8548b8b21323a013e155ddecfc4517c18babad Mon Sep 17 00:00:00 2001 From: Sameer Vijaykar <194338+sam-vi@users.noreply.github.com> Date: Wed, 10 Jan 2024 10:48:01 +0100 Subject: [PATCH 2/2] Simplify the wording of the candidate match algo. Break down long and complex lines into individual steps. --- index.html | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index e33be00..3cbda87 100644 --- a/index.html +++ b/index.html @@ -1113,21 +1113,36 @@

Dictionary RTCIceCandidatePairEventInit Members

  • 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.