Share via


createAnswer 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 createAnswer method creates an answer once an offer from a remote peer has been received. This occurs during the offer/answer negotiation of a connection.

Syntax

var retval = createAnswer.createAnswer(successCallback, failureCallback);

Parameters

  • successCallback
    Type: RTCSessionDescriptionCallback

    Optional. An RTCSessionDescription object that represents the description of the connection.

  • failureCallback
    Type: RTCPeerConnectionErrorCallback

    Optional. A function to call if adding a candidate fails.

Return value

Type: promise<RTCSessionDescription>

A promise that resolves to an RTCSessionDescription object that is to be delivered to the other peer.

See also

createAnswer