From 44c10dd117c04db02bff37915871e3586af0b1b5 Mon Sep 17 00:00:00 2001
From: Jan-Ivar Bruaroey
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 @@ Terminology
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: +
++ Let |connection:RTCPeerConnection| be the {{RTCPeerConnection}} object associated with this [= ICE agent =]. +
+
+ If connection.{{RTCPeerConnection/[[IsClosed]]}} is
+ true
, abort these steps.
+
+ Let |candidatePair:RTCIceCandidatePair| be the candidate pair that was [= formed =]. +
++ Let |transport:RTCIceTransport| be the {{RTCIceTransport}} object associated with |candidatePair|. +
++ [= 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|. +
+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|.
- 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.
- 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.
- 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.