{{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 aRTCSessionDescriptionInit
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 tonull
. - {{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() }} |