From cd26c2a88a5d082423f6a5b5f9b0f3e5ff908b7e Mon Sep 17 00:00:00 2001 From: Sameer Vijaykar <194338+sam-vi@users.noreply.github.com> Date: Thu, 18 Apr 2024 16:28:13 +0200 Subject: [PATCH] Modify the change of selected pair algo in RTCIceTransport. This ensures that each candidate pair has a unique identity, simplifying the validation of RTCIceCandidatePair arguments to RTCIceTransport methods. --- index.html | 115 +++++++++++++++++++++++++++++------------------------ 1 file changed, 63 insertions(+), 52 deletions(-) diff --git a/index.html b/index.html index 94adcfa..e8cbd34 100644 --- a/index.html +++ b/index.html @@ -1043,58 +1043,69 @@

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, return false. -

    -
  4. -
  5. -

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

    -
  6. -
  7. -

    - If either (but not both) of |first|.{{RTCIceCandidate/sdpMLineIndex}} and |second|.{{RTCIceCandidate/sdpMLineIndex}} is - null, return false. -

    -
  8. -
  9. -

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

    -
  10. -
  11. -

    - If either (but not both) of |first|.{{RTCIceCandidate/usernameFragment}} and |second|.{{RTCIceCandidate/usernameFragment}} is - null, return false. -

    -
  12. -
  13. -

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

    -
  14. -
  15. -

    - Return true. -

    -
  16. -
+
+

Modifications to existing procedures

+

+ In the steps to [=RTCIceTransport/change the selected candidate pair and state=], if the selected candidate pair was changed, modify the first step to the following: +

+
    +
  1. + Let newCandidatePair be the [= list/item =] [= list/contained =] in |this|.{{RTCIceTransport/[[CandidatePairs]]}} whose {{RTCIceCandidatePair/local}} and {{RTCIceCandidatePair/remote}} attributes respectively [= candidate match | match =] the local and remote candidates of the indicated pair if one is selected, and null otherwise. +
  2. +
+

+ 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, return false. +

    +
  4. +
  5. +

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

    +
  6. +
  7. +

    + If either (but not both) of |first|.{{RTCIceCandidate/sdpMLineIndex}} and |second|.{{RTCIceCandidate/sdpMLineIndex}} is + null, return false. +

    +
  8. +
  9. +

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

    +
  10. +
  11. +

    + If either (but not both) of |first|.{{RTCIceCandidate/usernameFragment}} and |second|.{{RTCIceCandidate/usernameFragment}} is + null, return false. +

    +
  12. +
  13. +

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

    +
  14. +
  15. +

    + Return true. +

    +
  16. +
+