diff --git a/index.html b/index.html index 5435267..752c2dd 100644 --- a/index.html +++ b/index.html @@ -74,6 +74,10 @@
The terms [= event =], [= event handlers =] and [= event handler event types =] are defined in [[!HTML]].
++ The process of nominating a candidate pair is defined in + [[RFC8445]] Section 8.1.1. +
For each setParameterOptions.encodingOptions indexed by i,
- if setParameterOptions.encodingOptions[i].keyFrame
is set to true,
+ if setParameterOptions.encodingOptions[i].keyFrame
is set to true
,
request that the encoder associated with parameters.encodings[i]
generates a key frame.
- When the [= ICE agent =] has picked a candidate pair to remove, the [= user agent =] MUST [= queue a task =] to remove a candidate pair: + The [= ICE agent =] performs connectivity checks to identify valid candidate pairs on which it is possible to send + and receive media and data. In order to conclude ICE processing, the [= ICE agent =] {{nominates}} a valid candidate + pair as the selected candidate pair. Prior to nomination, any valid candidate pair may be used to send and receive data. + Once + a candidate pair is nominated successfully, only the selected candidate pair will be used to send and receive data. + Changing + the selected candidate pair after a successful nomination requires an ICE restart. +
++ When the [= ICE agent =] has picked a candidate pair to {{nominate}} as the selected candidate pair, the [= user + agent =] + MUST [= queue a task =] to nominate 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 |transport:RTCIceTransport| be the {{RTCIceTransport}} object associated with this candidate pair. +
++ Let |candidatePair:RTCIceCandidatePair| be the candidate pair which is being {{nominated}}. +
+
+ Set |transport|.{{RTCIceTransport/[[ProposalPending]]}} to true
.
+
+ Let |accepted:boolean| be the result of [= fire an event | firing an event =] named
+ {{RTCIceTransport/icecandidatepairnominate}} at |transport|, using {{RTCIceCandidatePairEvent}}, with the
+ {{Event/cancelable}} attribute initialized to true
, and the {{RTCIceCandidatePairEvent/local}} and
+ {{RTCIceCandidatePairEvent/remote}} attributes initialized to the local and remote candidates, respectively, of
+ |candidatePair|.
+
+ Set |transport|.{{RTCIceTransport/[[ProposalPending]]}} to false
.
+
+ If |accepted| is false
, instruct the [= ICE agent =] to not {{nominate}} |candidatePair|, and instead to
+ continue to perform connectivity checks. The [= ICE agent =] may continue to send data using the candidate pair
+ indicated by |candidatePair| unless instructed to use another candidate pair with
+ {{RTCIceTransport/setSelectedCandidatePair}}.
+
+ Otherwise, instruct the [= ICE agent =] to {{nominate}} the candidate pair indicated by |candidatePair|. +
++ If the application defers the {{nomination}} of a candidate pair by cancelling the + {{RTCIceTransport/icecandidatepairnominate}} event, it may select a different candidate pair to send data by calling + {{RTCIceTransport/setSelectedCandidatePair}}. When the method is called, the [= user agent =] MUST run the steps to change the selected candidate pair: +
++ 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 {{RTCIceTransport}} object associated with this candidate pair. +
+
+ If |transport|.{{RTCIceTransport/[[ProposalPending]]}} is true
, [= exception/throw =] an {{InvalidStateError}}.
+
+ If |transport|.{{RTCIceTransport/[[IceTransportState]]}} is either of + {{RTCIceTransportState/"new"}}, {{RTCIceTransportState/"failed"}} or {{RTCIceTransportState/"closed"}}, [= + exception/throw =] + an {{InvalidStateError}}. +
++ Let |candidatePair:RTCIceCandidatePair| be the candidate pair which is being set as the selected candidate pair. +
++ If |candidatePair| does not describe a candidate pair formed for this {{RTCIceTransport}} and sent in + {{RTCIceTransport/onicecandidatepairadd}}, [= exception/throw =] a {{NotFoundError}}. +
++ Instruct the [= ICE agent =] to use |candidatePair| to send data, and continue to the steps for a change in the selected + candidate pair (leading up to {{RTCIceTransport/onselectedcandidatepairchange}}). +
++ After changing the selected candidate pair, the controlling [= ICE agent =] may attempt to [= nominate the candidate + pair =] as + well to conclude ICE processing. The application may cancel the nomination to allow further changes to the selected + candidate pair. +
++ When the [= ICE agent =] has picked a candidate pair to remove, the [= user agent =] MUST [= queue a task =] to remove a candidate pair:
- Let |cancelable:boolean| be true
if the candidate pair is being removed in order to free an unused candidate, and false
otherwise.
+ Let |cancelable:boolean| be true
if the candidate pair is being removed in order to free an unused candidate, and
+ false
otherwise.
+
+ Set |transport|.{{RTCIceTransport/[[ProposalPending]]}} to true
.
Let |accepted:boolean| be the result of [= fire an event | firing an event =] named {{RTCIceTransport/icecandidatepairremove}} at |transport|, using {{RTCIceCandidatePairEvent}}, with the - {{Event/cancelable}} attribute initialized to cancelable, and the {{RTCIceCandidatePairEvent/local}} and {{RTCIceCandidatePairEvent/remote}} attributes initialized to the local and remote candidates, respectively, of |candidatePair|. + {{Event/cancelable}} attribute initialized to cancelable, and the {{RTCIceCandidatePairEvent/local}} + and {{RTCIceCandidatePairEvent/remote}} attributes initialized to the local and remote candidates, respectively, + of |candidatePair|. +
+
+ Set |transport|.{{RTCIceTransport/[[ProposalPending]]}} to false
.
- If |accepted| is false
, instruct the [= ICE agent =] to not remove the candidate pair indicated by |candidatePair|, and instead continue to send and respond to ICE connectivity checks on the candidate pair as before.
+ If |accepted| is false
, instruct the [= ICE agent =] to not remove the candidate pair indicated by
+ |candidatePair|, and instead continue to send and respond to ICE connectivity checks on the candidate pair as
+ before.
+ The {{RTCIceTransport}} object is extended by adding the following internal slot: +
+false
.
+ - partial interface RTCIceTransport { - attribute EventHandler onicecandidatepairadd; - attribute EventHandler onicecandidatepairremove; - };-
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. + {{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 {{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 {{setSelectedCandidatePair}} method attempts to change the selected candidate pair. If successful, data will be sent + on the provided candidate pair. When this method is invoked, the [= user agent =] MUST run the steps to [= change the + selected candidate pair =]. +
+- The {{RTCIceTransport/icecandidatepairadd}} and {{RTCIceTransport/icecandidatepairremove}} events use the {{RTCIceCandidatePairEvent}} interface. + The {{RTCIceTransport/icecandidatepairadd}} and {{RTCIceTransport/icecandidatepairremove}} events use the + {{RTCIceCandidatePairEvent}} interface.
[Exposed=Window] -interface RTCIceCandidatePairEvent : Event { - constructor(DOMString type, RTCIceCandidatePairEventInit eventInitDict); - readonly attribute RTCIceCandidate local; - readonly attribute RTCIceCandidate remote; -};-
- The {{local}} attribute represents the local {{RTCIceCandidate}} of the candidate pair associated with the event. + The {{local}} attribute represents the local {{RTCIceCandidate}} of the candidate pair associated with the + event.
- The {{remote}} attribute represents the remote {{RTCIceCandidate}} of the candidate pair associated with the event. + The {{remote}} attribute represents the remote {{RTCIceCandidate}} of the candidate pair associated with + the event.
-dictionary RTCIceCandidatePairEventInit : EventInit { - required RTCIceCandidate local; - required RTCIceCandidate remote; -};+ dictionary RTCIceCandidatePairEventInit : EventInit { + required RTCIceCandidate local; + required RTCIceCandidate remote; + };
preventDefault()
method on the event, it will be removed.
+ preventDefault()
method on the event, it will be {{nominated}}.
+