PeerConnection

package js.html.rtc

extends EventTarget

Available on js

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

read onlycanTrickleIceCandidates:Bool

read onlycurrentLocalDescription:SessionDescription

read onlycurrentRemoteDescription:SessionDescription

read onlyiceConnectionState:IceConnectionState

read onlyiceGatheringState:IceGatheringState

read onlyidpLoginUrl:String

read onlylocalDescription:SessionDescription

onaddstream:Function

onaddtrack:Function

ondatachannel:Function

onicecandidate:Function

oniceconnectionstatechange:Function

onicegatheringstatechange:Function

onnegotiationneeded:Function

onremovestream:Function

onsignalingstatechange:Function

ontrack:Function

read onlypeerIdentity:Promise<IdentityAssertion>

read onlypendingLocalDescription:SessionDescription

read onlypendingRemoteDescription:SessionDescription

read onlyremoteDescription:SessionDescription

read onlysignalingState:SignalingState

Methods

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

addIceCandidate(candidate:IceCandidate):Promise<Void>

addIceCandidate(candidate:IceCandidateInit):Promise<Void>

addStream(stream:MediaStream):Void

addTrack(track:MediaStreamTrack, stream:MediaStream, moreStreams:Rest<MediaStream>):RtpSender

addTransceiver(trackOrKind:MediaStreamTrack, ?init:Null<RtpTransceiverInit>):RtpTransceiver

addTransceiver(trackOrKind:String, ?init:Null<RtpTransceiverInit>):RtpTransceiver

close():Void

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

createAnswer(?options:Null<AnswerOptions>):Promise<SessionDescriptionInit>

createDataChannel(label:String, ?dataChannelDict:Null<DataChannelInit>):DataChannel

createOffer(successCallback:SessionDescriptionInit ‑> Void, failureCallback:DOMException ‑> Void, ?options:Null<OfferOptions>):Promise<Void>

createOffer(?options:Null<OfferOptions>):Promise<SessionDescriptionInit>

getConfiguration():Configuration

getIdentityAssertion():Promise<String>

getLocalStreams():Array<MediaStream>

getReceivers():Array<RtpReceiver>

getRemoteStreams():Array<MediaStream>

getSenders():Array<RtpSender>

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

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

getTransceivers():Array<RtpTransceiver>

removeTrack(sender:RtpSender):Void

setIdentityProvider(provider:String, ?options:Null<IdentityProviderOptions>):Void

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>

© 2005–2020 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/rtc/PeerConnection.html