Class RTCSessionDescription
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
The RTCSessionDescription interface describes one end of a connection—or potential connection—and how it's configured. Each RTCSessionDescription consists of a description Type indicating which part of the offer/answer negotiation process it describes and of the {{Glossary("SDP")}} descriptor of the session.
[Value("RTCSessionDescription")]
public class RTCSessionDescription
- Inheritance
-
RTCSessionDescription
- Inherited Members
Remarks
The process of negotiating a connection between two peers involves exchanging RTCSessionDescription objects back and forth, with each description suggesting one combination of connection configuration options that the sender of the description supports. Once the two peers agree upon a configuration for the connection, negotiation is complete.
-WebRTC
-SetLocalDescription(RTCLocalSessionDescriptionInit) and SetRemoteDescription(RTCSessionDescriptionInit)
Constructors
RTCSessionDescription()
public RTCSessionDescription()
RTCSessionDescription(RTCSessionDescriptionInit)
IMPORTANT
DeprecatedRTCSessionDescription() constructor creates a newRTCSessionDescription with its properties initialized as described in the
specified object.
public RTCSessionDescription(RTCSessionDescriptionInit descriptionInitDict)
Parameters
descriptionInitDictRTCSessionDescriptionInit
Remarks
NOTE
This constructor has been deprecated because
SetLocalDescription(RTCLocalSessionDescriptionInit) and other methods which take
SDP as input now directly accept an object containing the Type and Sdp properties, so you don't have to instantiate anRTCSessionDescriptionyourself.
Properties
Sdp
The property RTCSessionDescription.sdp is a read-only
string containing the SDP which describes the session.
[Value("sdp")]
public string Sdp { get; }
Property Value
- string
The value is a string containing an SDP message like this one:
Remarks
-WebRTC
-The standard for using SDP in an offer/answer protocol {{rfc("3264")}}.
Type
The property RTCSessionDescription.type is a read-only
string value which describes the description's type.
[Value("type")]
public RTCSdpType Type { get; }
Property Value
- RTCSdpType
The possible values are:
Remarks
Methods
ToJSON()
The RTCSessionDescription.toJSON() method generates a
JSON description of the object. Both properties,
Type and
Sdp, are contained in the generated JSON.
[Value("toJSON")]
public RTCSessionDescriptionInit ToJSON()
Returns
- RTCSessionDescriptionInit
A JSON object containing the following properties: