diff --git a/index.html b/index.html index 3cbda87..9ef9c31 100644 --- a/index.html +++ b/index.html @@ -82,6 +82,9 @@
+ The process of freeing a candidate is defined in [[RFC8445]] Section 8.3. +
- 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.
+ 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: +
++ Let |connection:RTCPeerConnection| be the {{RTCPeerConnection}} object associated with [= this =]. +
+
+ If connection.{{RTCPeerConnection/[[IsClosed]]}} is
+ true
, [= exception/throw =] an
+ {{InvalidStateError}}.
+
+ If [= this =].{{RTCIceTransport/[[ProposalPending]]}} is true
, [= exception/throw =] an
+ {{InvalidStateError}}.
+
+ If [= this =].{{RTCIceTransport/[[IceTransportState]]}} is either of {{RTCIceTransportState/"new"}}, {{RTCIceTransportState/"failed"}} or {{RTCIceTransportState/"closed"}}, [= exception/throw =] an {{InvalidStateError}}. +
++ Let |candidatePair:RTCIceCandidatePair| be the method's first argument. +
++ 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}}. +
++ Let |p:Promise| be a new promise. +
++ In parallel, instruct the [= ICE agent =] to remove the candidate pair indicated by candidatePair. +
++ When the [= ICE agent =] has completed the removal, [= queue a task =] to run the following steps: +
+
+ [= 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.
+
+ Resolve p. +
++ Return p. +
+