Share via


setLocalDescription method

[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]

The setLocalDescription method updates the local description of the connection.

Syntax

var retval = RTCPeerConnection.setLocalDescription(description, successCallback, failureCallback);

Parameters

  • description
    Type: RTCSessionDescription

    An RTCSessionDescription object that represents the description of the connection.

  • successCallback
    Type: VoidFunction

    A function to call once the candidate has been successfully added.

  • failureCallback
    Type: RTCPeerConnectionErrorCallback

    A function to call if adding a candidate fails.

Return value

Type: promise<void>

A promise that is fulfilled after a description has been set (or not set).

See also

RTCPeerConnection