The RTCPeerConnection interface represents a WebRTC connection between the local computer and a remote peer. It provides methods to connect to a remote peer, maintain and monitor the connection, and close the connection once it's no longer needed.

Documentation RTCPeerConnection by Mozilla Contributors, licensed under CC-BY-SA 2.5.

See also:

Static methods

staticgenerateCertificate(keygenAlgorithm:Dynamic):Promise<Certificate>

staticgenerateCertificate(keygenAlgorithm:String):Promise<Certificate>

Throws:

null

DOMError

Constructor

new(?configuration:Null<Configuration>, ?constraints:Dynamic)

Throws:

null

DOMError

Variables

Methods

addIceCandidate(candidate:IceCandidate, successCallback:() ‑> Void, failureCallback:DOMException ‑> Void):Promise<Void>

addIceCandidate(candidate:IceCandidate):Promise<Void>

addIceCandidate(candidate:IceCandidateInit):Promise<Void>

getStats(selector:MediaStreamTrack, successCallback:StatsReport ‑> Void, failureCallback:DOMException ‑> Void):Promise<Void>

getStats(?selector:MediaStreamTrack):Promise<StatsReport>

setLocalDescription(description:SessionDescriptionInit, successCallback:() ‑> Void, failureCallback:DOMException ‑> Void):Promise<Void>

setLocalDescription(description:SessionDescriptionInit):Promise<Void>

setRemoteDescription(description:SessionDescriptionInit, successCallback:() ‑> Void, failureCallback:DOMException ‑> Void):Promise<Void>

setRemoteDescription(description:SessionDescriptionInit):Promise<Void>

Inherited Variables

Inherited Methods

Defined by EventTarget

addEventListener(type:String, listener:Function, ?options:EitherType<AddEventListenerOptions, Bool>, ?wantsUntrusted:Bool):Void

addEventListener(type:String, listener:EventListener, ?options:EitherType<AddEventListenerOptions, Bool>, ?wantsUntrusted:Bool):Void

Register an event handler of a specific event type on the EventTarget.

Throws:

null

DOMError

dispatchEvent(event:Event):Bool

Dispatch an event to this EventTarget.

Throws:

null

DOMError

removeEventListener(type:String, listener:Function, ?options:EitherType<EventListenerOptions, Bool>):Void

removeEventListener(type:String, listener:EventListener, ?options:EitherType<EventListenerOptions, Bool>):Void

Removes an event listener from the EventTarget.

Throws:

null

DOMError