Home

RTCSessionDescriptionInit

RTCSessionDescriptionInit is a WebRTC initialization dictionary used to create or configure a session description. A session description represents the parameters exchanged during the negotiation of media streams between peers, typically encapsulated as SDP data.

The RTCSessionDescriptionInit dictionary contains two main properties: type and sdp. The type property is a string

This dictionary is used as an input when constructing an RTCSessionDescription, for example via new RTCSessionDescription(init),

Compatibility and details: RTCSessionDescriptionInit is part of the WebRTC specification and helps standardize how session descriptions

See also: RTCSessionDescription, RTCSdpType, and SDP in WebRTC negotiation.

that
indicates
the
SDP
type,
commonly
values
such
as
"offer"
or
"answer"
as
defined
by
RTCSdpType.
The
sdp
property
is
a
string
containing
the
Session
Description
Protocol
data
that
describes
the
media
capabilities,
codecs,
timing,
and
related
session
information.
or
when
providing
initialization
data
to
methods
that
accept
an
initialization
object
(such
as
setLocalDescription
or
setRemoteDescription
in
certain
APIs).
In
practice,
you
create
an
object
with
type
and
sdp,
then
pass
it
to
the
constructor
or
relevant
API
to
produce
or
update
the
session
description
used
during
negotiation.
are
created
and
passed
between
peers.
The
sdp
field
must
contain
valid
SDP
text
corresponding
to
the
specified
type;
otherwise,
an
error
may
occur
during
creation
or
negotiation.