Skip to content

Commit

Permalink
Convert RTCIceCandidatePair dictionary to an interface.
Browse files Browse the repository at this point in the history
Addresses: #2930.

This commit changes the dictionary to an interface and required
dictionary members to readonly attributes backed by internal slots.

No constructor is described in the IDL, since RTCIceCandidatePair is
only created by the user agent as a result of the ICE agent forming an
ICE candidate pair. The application cannot construct arbitrary candidate
pairs.
  • Loading branch information
sam-vi committed Apr 18, 2024
1 parent 9a4d778 commit f1c0561
Showing 1 changed file with 31 additions and 10 deletions.
41 changes: 31 additions & 10 deletions webrtc.html
Original file line number Diff line number Diff line change
Expand Up @@ -12670,35 +12670,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">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 f1c0561

Please sign in to comment.