Table of Contents

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)

See also on MDN

Constructors

RTCSessionDescription()

public RTCSessionDescription()

RTCSessionDescription(RTCSessionDescriptionInit)

IMPORTANT
Deprecated
The RTCSessionDescription() constructor creates a new
RTCSessionDescription with its properties initialized as described in the
specified object.
public RTCSessionDescription(RTCSessionDescriptionInit descriptionInitDict)

Parameters

descriptionInitDict RTCSessionDescriptionInit

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 an
RTCSessionDescription yourself.

-WebRTC API
-RTCSessionDescription

See also on MDN

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")}}.

See also on MDN

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:

Remarks