Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 989039 of RTCIceCandidate

  • Revision slug: Web/API/RTCIceCandidate
  • Revision title: RTCIceCandidate
  • Revision id: 989039
  • Created:
  • Creator: jpmedley
  • Is current revision? No
  • Comment Update compatibility table.

Revision Content

{{APIRef("WebRTC")}}{{SeeCompatTable}}

The RTCIceCandidate interface of the the WebRTC API represents a candidate internet connectivity establishment (ICE) server for establishing an {{domxref("RTCPeerConnection")}}.

Constructors

{{domxref("RTCIceCandidate.RTCIceCandidate()","RTCIceCandidate()")}}
Creates an RTCIceCandidate object.

Properties

{{domxref("RTCIceCandidate.candidate")}} {{readonlyInline}}
Returns a transport address for the candidate that can be used for connectivity checks. The format of this address is a candidate-attribute as defined in RTC 5245.
{{domxref("RTCIceCandidate.foundation")}} {{readonlyInline}}
Returns a unique identifier that allows ICE to correlate candidates that appear on multiple {{domxref("RTCIceTransport")}} objects.
{{domxref("RTCIceCandidate.ip")}} {{readonlyInline}}
Returns the IP address of the candidate.
{{domxref("RTCIceCandidate.port")}} {{readonlyInline}}
Returns the port of the candidate.
{{domxref("RTCIceCandidate.priority")}} {{readonlyInline}}
Returns the assigned priority of the candidate.
{{domxref("RTCIceCandidate.protocol")}} {{readonlyInline}}
Returns the protocol used by the candidate, either udp or tcp.
{{domxref("RTCIceCandidate.relatedAddress")}} {{readonlyInline}}
For a candidate that is derived from another, such as a relay or reflexive candidate, the relatedAddress is the IP address of the candidate that it is derived from. For host candidates, the relatedAddress is null.
{{domxref("RTCIceCandidate.relatedPort")}} {{readonlyInline}}
For a candidate that is derived from another, such as a relay or reflexive candidate, the relatedPort is the port of the candidate that it is derived from. For host candidates, the relatedPort is null.
{{domxref("RTCIceCandidate.sdpMid")}} {{readonlyInline}}
If not null, this contains the identifier of the "media stream identification" (as defined in RFC 5888) for the media component this candidate is associated with.
{{domxref("RTCIceCandidate.sdpMLineIndex")}} {{readonlyInline}}
If not null, this indicates the index (starting at zero) of the media description (as defined in RFC 4566) in the SDP this candidate is associated with.
{{domxref("RTCIceCandidate.tcpType")}} {{readonlyInline}}
If protocol is tcptcpType represents the type of TCP candidate. Otherwise, tcpType is null.
{{domxref("RTCIceCandidate.type")}} {{readonlyInline}}
One of host, srflx, prflx, or relay.

Specifications

Specification Status Comment
{{SpecName('WebRTC 1.0')}} {{Spec2('WebRTC 1.0')}} Initial definition.

Browser compatibility

{{CompatibilityTable}}
Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support {{CompatVersionUnknown}}        
Feature Android Android Webview Firefox Mobile (Gecko) Firefox OS IE Mobile Opera Mobile Safari Mobile Chrome for Android
Basic support {{CompatUnknown}} {{CompatVersionUnknown}}           {{CompatVersionUnknown}}

Revision Source

<p>{{APIRef("WebRTC")}}{{SeeCompatTable}}</p>

<p>The <strong><code>RTCIceCandidate</code></strong> interface of the the <a href="/en-US/docs/Web/API/WebRTC_API">WebRTC API</a> represents a candidate internet connectivity establishment (ICE) server for establishing an {{domxref("RTCPeerConnection")}}.</p>

<h2 id="Constructors">Constructors</h2>

<dl>
 <dt>{{domxref("RTCIceCandidate.RTCIceCandidate()","RTCIceCandidate()")}}</dt>
 <dd>Creates an <code>RTCIceCandidate</code> object.</dd>
</dl>

<h2 id="Properties">Properties</h2>

<dl>
 <dt>{{domxref("RTCIceCandidate.candidate")}}&nbsp;{{readonlyInline}}</dt>
 <dd>Returns a transport address for the&nbsp;candidate that can be used for connectivity checks. The format of this address is a <code>candidate-attribute</code> as defined in <a href="https://tools.ietf.org/html/rfc5245">RTC 5245</a>.</dd>
 <dt>{{domxref("RTCIceCandidate.foundation")}}&nbsp;{{readonlyInline}}</dt>
 <dd>Returns a unique identifier that allows ICE to correlate candidates that appear on multiple {{domxref("RTCIceTransport")}} objects.</dd>
 <dt>{{domxref("RTCIceCandidate.ip")}}&nbsp;{{readonlyInline}}</dt>
 <dd>Returns the IP address of the candidate.</dd>
 <dt>{{domxref("RTCIceCandidate.port")}}&nbsp;{{readonlyInline}}</dt>
 <dd>Returns the port of the candidate.</dd>
 <dt>{{domxref("RTCIceCandidate.priority")}}&nbsp;{{readonlyInline}}</dt>
 <dd>Returns the assigned priority of the candidate.</dd>
 <dt>{{domxref("RTCIceCandidate.protocol")}}&nbsp;{{readonlyInline}}</dt>
 <dd>Returns the protocol used by the candidate, either udp or tcp.</dd>
 <dt>{{domxref("RTCIceCandidate.relatedAddress")}}&nbsp;{{readonlyInline}}</dt>
 <dd>For a candidate that is derived from another, such as a relay or reflexive candidate, the&nbsp;<dfn data-dfn-type="dfn" id="dfn-relatedaddress"><code>relatedAddress</code>&nbsp;</dfn>is the IP address of the candidate that it is derived from. For host candidates, the&nbsp;<code>relatedAddress</code>&nbsp;is&nbsp;<code>null</code>.</dd>
 <dt>{{domxref("RTCIceCandidate.relatedPort")}}&nbsp;{{readonlyInline}}</dt>
 <dd>For a candidate that is derived from another, such as a relay or reflexive candidate, the&nbsp;<code><dfn data-dfn-type="dfn" id="dfn-relatedport">relatedPort</dfn></code>&nbsp;is the port of the candidate that it is derived from. For host candidates, the&nbsp;<code>relatedPort</code>&nbsp;is&nbsp;<code>null</code>.</dd>
 <dt>{{domxref("RTCIceCandidate.sdpMid")}}&nbsp;{{readonlyInline}}</dt>
 <dd>If not&nbsp;<code>null</code>, this contains the identifier of the "media stream identification" (as defined in <cite><a href="https://tools.ietf.org/html/rfc5888">RFC 5888</a>)</cite>&nbsp;for the media component this candidate is associated with.</dd>
 <dt>{{domxref("RTCIceCandidate.sdpMLineIndex")}}&nbsp;{{readonlyInline}}</dt>
 <dd>If not&nbsp;<code>null</code>, this indicates the index (starting at zero) of the&nbsp;media description&nbsp;(as defined in <a href="https://tools.ietf.org/html/rfc4566">RFC 4566</a>) in the SDP this candidate is associated with.</dd>
 <dt>{{domxref("RTCIceCandidate.tcpType")}}&nbsp;{{readonlyInline}}</dt>
 <dd>If&nbsp;<code>protocol</code>&nbsp;is&nbsp;<code>tcp</code>,&nbsp;<code>tcpType</code>&nbsp;represents the type of TCP candidate. Otherwise,&nbsp;<code>tcpType</code>&nbsp;is&nbsp;<code>null</code>.</dd>
 <dt>{{domxref("RTCIceCandidate.type")}}&nbsp;{{readonlyInline}}</dt>
 <dd>One of <code>host</code>, <code>srflx</code>, <code>prflx</code>, or <code>relay</code>.</dd>
</dl>

<h2 id="Specifications">Specifications</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
  <tr>
   <td>{{SpecName('WebRTC 1.0')}}</td>
   <td>{{Spec2('WebRTC 1.0')}}</td>
   <td>Initial definition.</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility">Browser compatibility</h2>

<div>{{CompatibilityTable}}</div>

<div id="compat-desktop">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Chrome</th>
   <th>Firefox (Gecko)</th>
   <th>Internet Explorer</th>
   <th>Opera</th>
   <th>Safari (WebKit)</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>&nbsp;</td>
   <td>&nbsp;</td>
   <td>&nbsp;</td>
   <td>&nbsp;</td>
  </tr>
 </tbody>
</table>
</div>

<div id="compat-mobile">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Android</th>
   <th>Android Webview</th>
   <th>Firefox Mobile (Gecko)</th>
   <th>Firefox OS</th>
   <th>IE Mobile</th>
   <th>Opera Mobile</th>
   <th>Safari Mobile</th>
   <th>Chrome for Android</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>&nbsp;</td>
   <td>&nbsp;</td>
   <td>&nbsp;</td>
   <td>&nbsp;</td>
   <td>&nbsp;</td>
   <td>{{CompatVersionUnknown}}</td>
  </tr>
 </tbody>
</table>
</div>
Revert to this revision