From 9d5bfc3fe426ecba9bb70dc96373a76ddf56b89d Mon Sep 17 00:00:00 2001 From: Sameer Vijaykar <194338+sam-vi@users.noreply.github.com> Date: Tue, 5 Sep 2023 14:04:24 +0200 Subject: [PATCH] Add removeCandidatePairs method. --- index.html | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/index.html b/index.html index 752c2dd..db7785c 100644 --- a/index.html +++ b/index.html @@ -916,6 +916,7 @@
+ 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: +
++ Let |connection:RTCPeerConnection| be the {{RTCPeerConnection}} object associated with this [= ICE agent =]. +
+
+ If connection.{{RTCPeerConnection/[[IsClosed]]}} is
+ true
, [= exception/throw =] an
+ {{InvalidStateError}}.
+
+ Let |transport:RTCIceTransport| be the associated {{RTCIceTransport}} object. +
++ If |transport|.{{RTCIceTransport/[[IceTransportState]]}} is either of + {{RTCIceTransportState/"new"}}, {{RTCIceTransportState/"failed"}} or {{RTCIceTransportState/"closed"}}, [= + exception/throw =] + an {{InvalidStateError}}. +
+
+ If |transport|.{{RTCIceTransport/[[ProposalPending]]}} is true
, [= exception/throw =] an
+ {{InvalidStateError}}.
+
+ Instruct the [= ICE agent =] to remove the candidate pairs indicated by |candidatePairs|, ignoring any unknown + or invalid candidate pairs. +
+
+ 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|.
+