diff --git a/index.html b/index.html index 3cbda87..9ef9c31 100644 --- a/index.html +++ b/index.html @@ -82,6 +82,9 @@

Terminology

The process of nominating a candidate pair is defined in [[RFC8445]] Section 8.1.1.

+

+ The process of freeing a candidate is defined in [[RFC8445]] Section 8.3. +

@@ -845,7 +848,8 @@

  • - Let |cancelable:boolean| be true if the candidate pair is being removed in order to free an unused candidate, and + Let |cancelable:boolean| be true if the candidate pair is being removed in order to [= free =] an unused + candidate, and false otherwise.

  • @@ -895,6 +899,7 @@

    attribute EventHandler onicecandidatepairremove; attribute EventHandler onicecandidatepairnominate; Promise<undefined> selectCandidatePair(RTCIceCandidatePair candidatePair); + Promise<undefined> removeCandidatePair(RTCIceCandidatePair candidatePair); };

    Attributes

    @@ -1022,6 +1027,89 @@

    Methods

    candidate pair.

    +
    + removeCandidatePair +
    +
    +

    + The {{removeCandidatePair}} method removes the provided candidate pair. The [= ICE agent =] will stop sending and + responding to ICE connectivity checks on the removed candidate pair, and it can no longer be used to send data for this + transport. This method is meant to be called when the application wants to allow the [= ICE agent =] to [= free =] + candidates that it no longer needs. +

    +

    + When this method is invoked, the [= user agent =] MUST run the following steps: +

    +
      +
    1. +

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

      +
    2. +
    3. +

      + If connection.{{RTCPeerConnection/[[IsClosed]]}} is + true, [= exception/throw =] an + {{InvalidStateError}}. +

      +
    4. +
    5. +

      + If [= this =].{{RTCIceTransport/[[ProposalPending]]}} is true, [= exception/throw =] an + {{InvalidStateError}}. +

      +
    6. +
    7. +

      + If [= this =].{{RTCIceTransport/[[IceTransportState]]}} is either of {{RTCIceTransportState/"new"}}, {{RTCIceTransportState/"failed"}} or {{RTCIceTransportState/"closed"}}, [= exception/throw =] an {{InvalidStateError}}. +

      +
    8. +
    9. +

      + Let |candidatePair:RTCIceCandidatePair| be the method's first argument. +

      +
    10. +
    11. +

      + If the {{RTCIceCandidatePair/local}} and {{RTCIceCandidatePair/remote}} attributes of candidatePair do not match a pairing of {{RTCIceCandidatePairEvent/local}} and {{RTCIceCandidatePairEvent/remote}} respectively sent in {{RTCIceTransport/onicecandidatepairadd}}, [= exception/throw =] a {{NotFoundError}}. +

      +
    12. +
    13. +

      + Let |p:Promise| be a new promise. +

      +
    14. +
    15. +

      + In parallel, instruct the [= ICE agent =] to remove the candidate pair indicated by candidatePair. +

      +
        +
      1. +

        + When the [= ICE agent =] has completed the removal, [= queue a task =] to run the following steps: +

        +
          +
        1. +

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

          +
        2. +
        3. +

          + Resolve p. +

          +
        4. +
        +
      2. +
      +
    16. +
    17. +

      + Return p. +

      +
    18. +
    +