setLocalDescription
setLocalDescription is a method of the RTCPeerConnection interface in the WebRTC API. It sets the local session description for the connection, typically an SDP offer or answer produced by createOffer or createAnswer. The local description defines the parameters for the local endpoint and is used during signaling to negotiate media capabilities with the remote peer.
Usage generally follows the offer/answer flow. You create an offer with createOffer, then set it as the
The call is asynchronous. In modern browsers it returns a Promise that resolves once the local description
The description argument is an RTCSessionDescriptionInit (or RTCSessionDescription) object and must include a type ('offer' or
See also: setRemoteDescription, createOffer, createAnswer, RTCPeerConnection.