From 44c10dd117c04db02bff37915871e3586af0b1b5 Mon Sep 17 00:00:00 2001 From: Jan-Ivar Bruaroey Date: Fri, 27 Oct 2023 15:57:06 -0400 Subject: [PATCH] Don't fire icecandidatepairadd if closed + avoid competing normative prose. --- index.html | 68 +++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 47 insertions(+), 21 deletions(-) diff --git a/index.html b/index.html index 752c2dd..2120166 100644 --- a/index.html +++ b/index.html @@ -74,6 +74,10 @@

Terminology

The terms [= event =], [= event handlers =] and [= event handler event types =] are defined in [[!HTML]].

+

+ The process of forming a candidate pair is defined in + [[RFC8445]] Section 6.1.2.2. +

The process of nominating a candidate pair is defined in [[RFC8445]] Section 8.1.1. @@ -717,6 +721,41 @@

Changing the selected candidate pair after a successful nomination requires an ICE restart.

+

+ When the [= ICE agent =] has [= formed =] a candidate pair, the [= user agent =] MUST [= queue a task =] to add a candidate pair: +

+
    +
  1. +

    + Let |connection:RTCPeerConnection| be the {{RTCPeerConnection}} object associated with this [= ICE agent =]. +

    +
  2. +
  3. +

    + If connection.{{RTCPeerConnection/[[IsClosed]]}} is + true, abort these steps. +

    +
  4. +
  5. +

    + Let |candidatePair:RTCIceCandidatePair| be the candidate pair that was [= formed =]. +

    +
  6. +
  7. +

    + Let |transport:RTCIceTransport| be the {{RTCIceTransport}} object associated with |candidatePair|. +

    +
  8. +
  9. +

    + [= Fire an event =] named + {{RTCIceTransport/icecandidatepairadd}} at |transport|, using {{RTCIceCandidatePairEvent}}, + with the {{RTCIceCandidatePairEvent/local}} and {{RTCIceCandidatePairEvent/remote}} attributes + initialized to the local and remote candidates, respectively, of |candidatePair|. +

    +
  10. +

When the [= ICE agent =] has picked a candidate pair to {{nominate}} as the selected candidate pair, the [= user agent =] @@ -856,12 +895,12 @@

  • - Let |transport:RTCIceTransport| be the {{RTCIceTransport}} object associated with this candidate pair. + Let |candidatePair:RTCIceCandidatePair| be the candidate pair which is being removed.

  • - Let |candidatePair:RTCIceCandidatePair| be the candidate pair which is being removed. + Let |transport:RTCIceTransport| be the {{RTCIceTransport}} object associated with |candidatePair|.

  • @@ -925,13 +964,8 @@

    Attributes

    - The event type of this event handler is {{icecandidatepairadd}}. -

    -

    - When the [= ICE agent =] has formed a candidate pair, the [= user agent =] MUST queue a task to [= fire an - event =] named {{icecandidatepairadd}} using the {{RTCIceCandidatePairEvent}} interface, with the - {{RTCIceCandidatePairEvent/local}} and {{RTCIceCandidatePairEvent/remote}} attributes set to the local and - remote candidates, respectively, of the formed candidate pair. + The event type of this event handler is {{icecandidatepairadd}}, and is fired as part of + the [= add a candidate pair =] algorithm.

    @@ -939,11 +973,8 @@

    Attributes

    - The event type of this event handler is {{icecandidatepairremove}}. -

    -

    - When the [= ICE agent =] has picked a candidate pair to remove, but before the removal has actually occurred, - the [= user agent =] MUST run the steps to [= remove a candidate pair =]. + The event type of this event handler is {{icecandidatepairremove}}, and is fired as part of + the [= remove a candidate pair =] algorithm.

    @@ -951,13 +982,8 @@

    Attributes

    - The event type of this event handler is {{icecandidatepairnominate}}. -

    -

    - When the [= ICE agent =] has picked a candidate pair to {{nominate}} as the selected candidate pair, but - before - the - nomination takes place, the [= user agent =] MUST run the steps to [= nominate a candidate pair =]. + The event type of this event handler is {{icecandidatepairnominate}}, and is fired as part + of the [= nominate a candidate pair =] algorithm.