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 646239 of RTCSessionDescription

  • Revision slug: Web/API/RTCSessionDescription
  • Revision title: RTCSessionDescription
  • Revision id: 646239
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment typo

Revision Content

{{APIRef}}{{SeeCompatTable}}

The RTCSessionDescription interface represents the parameters of a session. It consists of the kind of description, which part of a offer/answer negotiation it describes and of the {{Glossary("SDP")}} descriptor of the session.

Properties

The RTCSessionDescription doesn't inherit any property.

{{domxref("RTCSessionDescription.type")}}
Is an enum of type RTCSdpType describing the type of the description. It can be one of the following values:
  • "offer", the description is the initial proposal in an offer/answer exchange.
  • "answer", the description is the definitive choice in an offer/answer exchange.
  • "pranswer", the description is a provisional answer and may be changed when the definitive choice will be given.
{{domxref("RTCSessionDescription.sdp")}}
Is a {{domxref("DOMString")}} containing the {{Glossary("SDP")}} format describing the session.

Methods

The RTCSessionDescription doesn't inherit any method.

{{domxref("RTCSessionDescription.RTCSessionDescription", "RTCSessionDescription()")}}
Returns a new RTCSessionDescription. The parameter is a RTCSessionDescriptionInit dictionary containing the (optional) values for the two properties. If one of these value, or the whole parameter, is not given, the relevant property will be initiated to null.
{{domxref("RTCSessionDescription.toJSON()")}}
Is a jsonifier, that is a method generating a {{Glossary("JSON")}} description of the object. Both properties, {{domxref("RTCSessionDescription.type", "type")}} and {domxref("RTCSessionDescription.sdp", "sdp")}}, are contained in the generated JSON.

Example

 

Specifications

Specification Status Comment
{{ SpecName('WebRTC 1.0', '#rtcsessiondescription-class', 'RTCSessionDescription') }} {{Spec2('WebRTC 1.0')}} Initial definition.

Browser compatibility

{{ CompatibilityTable() }}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support {{ CompatVersionUnknown() }} {{ CompatVersionUnknown }} {{property_prefix("-moz-")}} {{ CompatNo() }} {{ CompatVersionUnknown() }} {{ CompatUnknown() }}
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatNo() }} {{ CompatUnknown() }} {{ CompatUnknown() }}

See also

Revision Source

<p>{{APIRef}}{{SeeCompatTable}}</p>
<p>The <strong><code>RTCSessionDescription</code></strong> interface represents the parameters of a session. It consists of the kind of description, which part of a offer/answer negotiation it describes and of the {{Glossary("SDP")}} descriptor of the session.</p>
<h2 id="Properties">Properties</h2>
<p><em>The <code>RTCSessionDescription</code> doesn't inherit any property.</em></p>
<dl>
 <dt>
  {{domxref("RTCSessionDescription.type")}}</dt>
 <dd>
  Is an enum of type <code>RTCSdpType</code> describing the type of the description. It can be one of the following values:
  <ul>
   <li><code>"offer"</code>, the description is the initial proposal in an offer/answer exchange.</li>
   <li><code>"answer"</code>, the description is the definitive choice in an offer/answer exchange.</li>
   <li><code>"pranswer"</code>, the description is a provisional answer and may be changed when the definitive choice will be given.</li>
  </ul>
 </dd>
</dl>
<dl>
 <dt>
  {{domxref("RTCSessionDescription.sdp")}}</dt>
 <dd>
  Is a {{domxref("DOMString")}} containing the {{Glossary("SDP")}} format describing the session.</dd>
</dl>
<h2 id="Methods">Methods</h2>
<p><em>The <code>RTCSessionDescription</code> doesn't inherit any method.</em></p>
<dl>
 <dt>
  {{domxref("RTCSessionDescription.RTCSessionDescription", "RTCSessionDescription()")}}</dt>
 <dd>
  Returns a new <code>RTCSessionDescription</code>. The parameter is a <code>RTCSessionDescriptionInit</code> dictionary containing the (optional) values for the two properties. If one of these value, or the whole parameter, is not given, the relevant property will be initiated to <code>null</code>.</dd>
 <dt>
  {{domxref("RTCSessionDescription.toJSON()")}}</dt>
 <dd>
  Is a jsonifier, that is a method generating a {{Glossary("JSON")}} description of the object. Both properties, {{domxref("RTCSessionDescription.type", "type")}} and {domxref("RTCSessionDescription.sdp", "sdp")}}, are contained in the generated JSON.</dd>
</dl>
<h2 id="Example.C2.A0">Example<span id="cke_bm_72C" style="display: none;">&nbsp;</span></h2>
<p>&nbsp;</p>
<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', '#rtcsessiondescription-class', 'RTCSessionDescription') }}</td>
   <td>{{Spec2('WebRTC 1.0')}}</td>
   <td>Initial definition.</td>
  </tr>
 </tbody>
</table>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<p>{{ CompatibilityTable() }}</p>
<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</th>
   </tr>
   <tr>
    <td>Basic support</td>
    <td>{{ CompatVersionUnknown() }}</td>
    <td>{{ CompatVersionUnknown }} {{property_prefix("-moz-")}}</td>
    <td>{{ CompatNo() }}</td>
    <td>{{ CompatVersionUnknown() }}</td>
    <td>{{ CompatUnknown() }}</td>
   </tr>
  </tbody>
 </table>
</div>
<div id="compat-mobile">
 <table class="compat-table">
  <tbody>
   <tr>
    <th>Feature</th>
    <th>Android</th>
    <th>Chrome for Android</th>
    <th>Firefox Mobile (Gecko)</th>
    <th>IE Mobile</th>
    <th>Opera Mobile</th>
    <th>Safari Mobile</th>
   </tr>
   <tr>
    <td>Basic support</td>
    <td>{{ CompatUnknown() }}</td>
    <td>{{ CompatUnknown() }}</td>
    <td>{{ CompatUnknown() }}</td>
    <td>{{ CompatNo() }}</td>
    <td>{{ CompatUnknown() }}</td>
    <td>{{ CompatUnknown() }}</td>
   </tr>
  </tbody>
 </table>
</div>
<h2 id="See_also">See also</h2>
<ul>
 <li><a href="/en-US/docs/Web/Guide/API/WebRTC" title="/en-US/docs/CSS/Using_CSS_animations">WebRTC</a></li>
</ul>
Revert to this revision