diff --git a/webrtc.html b/webrtc.html index 74ab4fd2d..ebbaa62be 100644 --- a/webrtc.html +++ b/webrtc.html @@ -11898,16 +11898,11 @@
When the [= ICE Agent =] indicates that it began gathering a [= - generation =] of candidates for an {{RTCIceTransport}} transport, the user + generation =] of candidates for an {{RTCIceTransport}} transport + associated with an {{RTCPeerConnection}} connection, the user agent MUST queue a task that runs the following steps:
- Let connection be the {{RTCPeerConnection}} object - associated with transport. -
-If connection.{{RTCPeerConnection/[[IsClosed]]}} is @@ -11954,17 +11949,12 @@
When the [= ICE Agent =] is finished gathering a [= generation =] of - candidates for an {{RTCIceTransport}} transport, and those candidates have been - surfaced to the application, the user agent MUST queue a task that - runs the following steps: + candidates for an {{RTCIceTransport}} transport associated + with an {{RTCPeerConnection}} connection, and those candidates have been + surfaced to the application, the user agent MUST queue two tasks. + The first task MUST run the following steps:
- Let connection be the {{RTCPeerConnection}} object - associated with transport. -
-If connection.{{RTCPeerConnection/[[IsClosed]]}} is @@ -11973,24 +11963,39 @@
- Let emptyCandidate be the result of [= creating an + Let endOfGatheringCandidate be the result of [= creating an RTCIceCandidate =] with a new dictionary whose {{RTCIceCandidateInit/sdpMid}} and {{RTCIceCandidateInit/sdpMLineIndex}} are set to the values associated with this {{RTCIceTransport}}, {{RTCIceCandidateInit/usernameFragment}} is set to the username fragment of the [= generation =] of candidates for which - gathering finished, and {{RTCIceCandidateInit/candidate}} is set - to an empty string. + gathering finished, and {{RTCIceCandidateInit/candidate}} is set to `""`.
- If another [= generation =] of candidates is still being - gathered, [= fire an event =] named {{RTCPeerConnection/icecandidate}} using the + [= Fire an event =] named {{RTCPeerConnection/icecandidate}} using the {{RTCPeerConnectionIceEvent}} interface with the candidate - attribute set to emptyCandidate at - connection, and abort these steps. + attribute set to endOfGatheringCandidate at + connection. +
++ The second task MUST run the following steps: +
+
+ If connection.{{RTCPeerConnection/[[IsClosed]]}} is
+ true
, abort these steps.
+
+ If another [= generation =] of candidates is still being + gathered, abort these steps.
Do not read or modify state beyond this point.
- [= Fire an event =] named {{RTCPeerConnection/icecandidate}} using the - {{RTCPeerConnectionIceEvent}} interface with the candidate - attribute set to emptyCandidate at - connection. -
-[= Fire an event =] named {{RTCIceTransport/gatheringstatechange}} at