Skip to content

Commit

Permalink
Merge pull request #2961 from sam-vi/2930-candidatepair-interface
Browse files Browse the repository at this point in the history
Convert RTCIceCandidatePair dictionary to an interface
  • Loading branch information
alvestrand authored May 30, 2024
2 parents 456549e + 04d7574 commit 39360d4
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 13 deletions.
9 changes: 9 additions & 0 deletions amendments.json
Original file line number Diff line number Diff line change
Expand Up @@ -934,5 +934,14 @@
"id": 46,
"testUpdates": "already-tested"
}
],
"rtcicecandidatepair": [
{
"description": "Convert RTCIceCandidatePair dictionary to an interface",
"pr": 2961,
"type": "addition",
"status": "candidate",
"id": 45
}
]
}
45 changes: 32 additions & 13 deletions webrtc.html
Original file line number Diff line number Diff line change
Expand Up @@ -12343,9 +12343,7 @@ <h3>
<ol>
<li>
<p>
Let <var>newCandidatePair</var> be a newly created
{{RTCIceCandidatePair}} representing the indicated pair if
one is selected, and <code>null</code> otherwise.
Let <var>newCandidatePair</var> be the result of [= creating an RTCIceCandidatePair =] with |local:RTCIceCandidate| and |remote:RTCIceCandidate|, representing the local and remote candidates of the indicated pair if one is selected, and <code>null</code> otherwise.
</p>
</li>
<li data-tests="RTCIceTransport.html">
Expand Down Expand Up @@ -12669,35 +12667,56 @@ <h2>
</section>
<section id="rtcicecandidatepair">
<h3>
<dfn>RTCIceCandidatePair</dfn> Dictionary
<dfn>RTCIceCandidatePair</dfn> Interface
</h3>
<p>
This interface represents an ICE candidate pair, described in Section 4 in [[RFC8445]]. An {{RTCIceCandidatePair}} is a pairing of a local and a remote {{RTCIceCandidate}}.
</p>
<p>
To <dfn class="abstract-op" data-lt="creating an RTCIceCandidatePair">create an RTCIceCandidatePair</dfn> with {{RTCIceCandidate}} objects, |local:RTCIceCandidate| and |remote:RTCIceCandidate|, run the following steps:
</p>
<ol class="algorithm">
<li>
Let |candidatePair:RTCIceCandidatePair| be a newly created {{RTCIceCandidatePair}} object.
</li>
<li>
Let |candidatePair| have a <dfn data-dfn-for="RTCIceCandidatePair">[[\Local]]</dfn> internal slot, initialized to |local|.
</li>
<li>
Let |candidatePair| have a <dfn data-dfn-for="RTCIceCandidatePair">[[\Remote]]</dfn> internal slot, initialized to |remote|.
</li>
<li>
Return |candidatePair|.
</li>
</ol>
<div>
<pre class="idl">dictionary RTCIceCandidatePair {
required RTCIceCandidate local;
required RTCIceCandidate remote;
<pre class="idl">[Exposed=Window]
interface RTCIceCandidatePair {
[SameObject] readonly attribute RTCIceCandidate local;
[SameObject] readonly attribute RTCIceCandidate remote;
};</pre>
<section>
<h2>
Dictionary {{RTCIceCandidatePair}} Members
Attributes
</h2>
<dl data-link-for="RTCIceCandidatePair" data-dfn-for=
"RTCIceCandidatePair" class="dictionary-members">
"RTCIceCandidatePair" class="attributes">
<dt>
<dfn data-idl="">local</dfn> of type <span class=
"idlMemberType">{{RTCIceCandidate}}</span>
"idlAttrType">{{RTCIceCandidate}}</span>, readonly
</dt>
<dd>
<p>
The local ICE candidate.
The {{local}} attribute MUST, on getting, return the value of the {{RTCIceCandidatePair/[[Local]]}} internal slot.
</p>
</dd>
<dt>
<dfn data-idl="">remote</dfn> of type <span class=
"idlMemberType">{{RTCIceCandidate}}</span>
"idlAttrType">{{RTCIceCandidate}}</span>, readonly
</dt>
<dd>
<p>
The remote ICE candidate.
The {{remote}} attribute MUST, on getting, return the value of the {{RTCIceCandidatePair/[[Remote]]}} internal slot.
</p>
</dd>
</dl>
Expand Down

0 comments on commit 39360d4

Please sign in to comment.