diff --git a/index.html b/index.html index 752c2dd..db7785c 100644 --- a/index.html +++ b/index.html @@ -916,6 +916,7 @@

attribute EventHandler onicecandidatepairremove; attribute EventHandler onicecandidatepairnominate; undefined setSelectedCandidatePair(RTCIceCandidatePair candidatePair); + undefined removeCandidatePairs(sequence<RTCIceCandidatePair> candidatePairs); };

Attributes

@@ -975,6 +976,67 @@

Methods

selected candidate pair =].

+
+ removeCandidatePairs +
+
+

+ The {{removeCandidatePairs}} method immediately removes the provided candidate pairs, making them unavailable to use + for transport. The [= ICE agent =] may free up candidates once all the associated candidate pairs have been removed. +

+

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

+
    +
  1. +

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

    +
  2. +
  3. +

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

    +
  4. +
  5. +

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

    +
  6. +
  7. +

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

    +
  8. +
  9. +

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

    +
  10. +
  11. +

    + Instruct the [= ICE agent =] to remove the candidate pairs indicated by |candidatePairs|, ignoring any unknown + or invalid candidate pairs. +

    +
  12. +
  13. +

    + For each valid |removedPair| in |candidatePairs| that was removed by the [= ICE agent =], [= 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 local and remote candidates, respectively, + of |removedPair|. +

    +
  14. +
+