RTCPeerConnection class
The 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.
EventTarget
RTCPeerConnection
- Implemented types
- Available extensions
- Annotations
-
- @JS()
- @staticInterop
Constructors
- RTCPeerConnection([RTCConfiguration? configuration])
-
factory
Properties
- canTrickleIceCandidates → bool?
-
Available on RTCPeerConnection, provided by the PropsRTCPeerConnection extension
no setter - connectionState → RTCPeerConnectionState
-
Available on RTCPeerConnection, provided by the PropsRTCPeerConnection extension
no setter - currentLocalDescription → RTCSessionDescription?
-
Available on RTCPeerConnection, provided by the PropsRTCPeerConnection extension
no setter - currentRemoteDescription → RTCSessionDescription?
-
Available on RTCPeerConnection, provided by the PropsRTCPeerConnection extension
no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- iceConnectionState → RTCIceConnectionState
-
Available on RTCPeerConnection, provided by the PropsRTCPeerConnection extension
no setter - iceGatheringState → RTCIceGatheringState
-
Available on RTCPeerConnection, provided by the PropsRTCPeerConnection extension
no setter - idpErrorInfo → String?
-
Available on RTCPeerConnection, provided by the PropsRTCPeerConnection extension
no setter - idpLoginUrl → String?
-
Available on RTCPeerConnection, provided by the PropsRTCPeerConnection extension
no setter - localDescription → RTCSessionDescription?
-
Available on RTCPeerConnection, provided by the PropsRTCPeerConnection extension
no setter -
onconnectionstatechange
↔ EventHandlerNonNull<
Event> ? -
Available on RTCPeerConnection, provided by the PropsRTCPeerConnection extension
getter/setter pair -
ondatachannel
↔ EventHandlerNonNull<
Event> ? -
Available on RTCPeerConnection, provided by the PropsRTCPeerConnection extension
getter/setter pair -
onicecandidate
↔ EventHandlerNonNull<
Event> ? -
Available on RTCPeerConnection, provided by the PropsRTCPeerConnection extension
getter/setter pair -
onicecandidateerror
↔ EventHandlerNonNull<
Event> ? -
Available on RTCPeerConnection, provided by the PropsRTCPeerConnection extension
getter/setter pair -
oniceconnectionstatechange
↔ EventHandlerNonNull<
Event> ? -
Available on RTCPeerConnection, provided by the PropsRTCPeerConnection extension
getter/setter pair -
onicegatheringstatechange
↔ EventHandlerNonNull<
Event> ? -
Available on RTCPeerConnection, provided by the PropsRTCPeerConnection extension
getter/setter pair -
onnegotiationneeded
↔ EventHandlerNonNull<
Event> ? -
Available on RTCPeerConnection, provided by the PropsRTCPeerConnection extension
getter/setter pair -
onsignalingstatechange
↔ EventHandlerNonNull<
Event> ? -
Available on RTCPeerConnection, provided by the PropsRTCPeerConnection extension
getter/setter pair -
ontrack
↔ EventHandlerNonNull<
Event> ? -
Available on RTCPeerConnection, provided by the PropsRTCPeerConnection extension
getter/setter pair -
peerIdentity
→ Future<
RTCIdentityAssertion> -
Available on RTCPeerConnection, provided by the PropsRTCPeerConnection extension
no setter - pendingLocalDescription → RTCSessionDescription?
-
Available on RTCPeerConnection, provided by the PropsRTCPeerConnection extension
no setter - pendingRemoteDescription → RTCSessionDescription?
-
Available on RTCPeerConnection, provided by the PropsRTCPeerConnection extension
no setter - remoteDescription → RTCSessionDescription?
-
Available on RTCPeerConnection, provided by the PropsRTCPeerConnection extension
no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sctp → RTCSctpTransport?
-
Available on RTCPeerConnection, provided by the PropsRTCPeerConnection extension
no setter - signalingState → RTCSignalingState
-
Available on RTCPeerConnection, provided by the PropsRTCPeerConnection extension
no setter
Methods
-
addEventListener(
String type, EventListener? callback, [dynamic options]) → void -
Available on EventTarget, provided by the PropsEventTarget extension
-
addIceCandidate(
[RTCIceCandidateInit? candidate, VoidFunction? successCallback, RTCPeerConnectionErrorCallback? failureCallback]) → Future< void> -
Available on RTCPeerConnection, provided by the PropsRTCPeerConnection extension
-
addTrack(
MediaStreamTrack track, [MediaStream? streams1, MediaStream? streams2, MediaStream? streams3]) → RTCRtpSender -
Available on RTCPeerConnection, provided by the PropsRTCPeerConnection extension
-
addTransceiver(
dynamic trackOrKind, [RTCRtpTransceiverInit? init]) → RTCRtpTransceiver -
Available on RTCPeerConnection, provided by the PropsRTCPeerConnection extension
-
close(
) → void -
Available on RTCPeerConnection, provided by the PropsRTCPeerConnection extension
-
createAnswer(
[RTCSessionDescriptionCallback? successCallback, RTCPeerConnectionErrorCallback? failureCallback]) → Future< void> -
Available on RTCPeerConnection, provided by the PropsRTCPeerConnection extension
-
createDataChannel(
String label, [RTCDataChannelInit? dataChannelDict]) → RTCDataChannel -
Available on RTCPeerConnection, provided by the PropsRTCPeerConnection extension
-
createOffer(
[RTCSessionDescriptionCallback? successCallback, RTCPeerConnectionErrorCallback? failureCallback, RTCOfferOptions? options]) → Future< void> -
Available on RTCPeerConnection, provided by the PropsRTCPeerConnection extension
-
dispatchEvent(
Event event) → bool -
Available on EventTarget, provided by the PropsEventTarget extension
-
getConfiguration(
) → RTCConfiguration -
Available on RTCPeerConnection, provided by the PropsRTCPeerConnection extension
-
getIdentityAssertion(
) → Future< String> -
Available on RTCPeerConnection, provided by the PropsRTCPeerConnection extension
-
getReceivers(
) → Iterable< RTCRtpReceiver> -
Available on RTCPeerConnection, provided by the PropsRTCPeerConnection extension
-
getSenders(
) → Iterable< RTCRtpSender> -
Available on RTCPeerConnection, provided by the PropsRTCPeerConnection extension
-
getStats(
[MediaStreamTrack? selector]) → Future< RTCStatsReport> -
Available on RTCPeerConnection, provided by the PropsRTCPeerConnection extension
-
getTransceivers(
) → Iterable< RTCRtpTransceiver> -
Available on RTCPeerConnection, provided by the PropsRTCPeerConnection extension
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeEventListener(
String type, EventListener? callback, [dynamic options]) → void -
Available on EventTarget, provided by the PropsEventTarget extension
-
removeTrack(
RTCRtpSender sender) → void -
Available on RTCPeerConnection, provided by the PropsRTCPeerConnection extension
-
restartIce(
) → void -
Available on RTCPeerConnection, provided by the PropsRTCPeerConnection extension
-
setConfiguration(
[RTCConfiguration? configuration]) → void -
Available on RTCPeerConnection, provided by the PropsRTCPeerConnection extension
-
setIdentityProvider(
String provider, [RTCIdentityProviderOptions? options]) → void -
Available on RTCPeerConnection, provided by the PropsRTCPeerConnection extension
-
setLocalDescription(
[RTCLocalSessionDescriptionInit? description, VoidFunction? successCallback, RTCPeerConnectionErrorCallback? failureCallback]) → Future< void> -
Available on RTCPeerConnection, provided by the PropsRTCPeerConnection extension
-
setRemoteDescription(
[RTCSessionDescriptionInit? description, VoidFunction? successCallback, RTCPeerConnectionErrorCallback? failureCallback]) → Future< void> -
Available on RTCPeerConnection, provided by the PropsRTCPeerConnection extension
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
generateCertificate(
dynamic keygenAlgorithm) → Future< RTCCertificate>