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:

Constructor

new (?configuration:Configuration, ?constraints:Dynamic)

Throws:

null

DOMError

Variables

Methods

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

addIceCandidate (candidate:IceCandidate):Promise<Void>

createOffer (successCallback:SessionDescription ‑> Void, failureCallback:DOMError ‑> Void, ?options:OfferOptions):Promise<Void>

createOffer (?options:OfferOptions):Promise<SessionDescription>

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

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

setIdentityProvider (provider:String, ?protocol:String, ?username:String):Void

setLocalDescription (description:SessionDescription, successCallback:Void ‑> Void, failureCallback:DOMError ‑> Void):Promise<Void>

setLocalDescription (description:SessionDescription):Promise<Void>

setRemoteDescription (description:SessionDescription, successCallback:Void ‑> Void, failureCallback:DOMError ‑> Void):Promise<Void>

setRemoteDescription (description:SessionDescription):Promise<Void>

Static methods

staticgenerateCertificate (keygenAlgorithm:EitherType<Dynamic, String>):Promise<Certificate>

Throws:

null

DOMError

Inherited Variables

Inherited Methods

Defined by EventTarget

addEventListener (type:String, listener:Function, capture:Bool = false):Void

addEventListener (type:String, listener:EventListener, capture:Bool = false, ?wantsUntrusted:Bool):Void

Throws:

null

DOMError

dispatchEvent (event:Event):Bool

Throws:

null

DOMError

removeEventListener (type:String, listener:Function, capture:Bool = false):Void

removeEventListener (type:String, listener:EventListener, capture:Bool = false):Void

Throws:

null

DOMError