RTCPeerConnection class
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.
- Implemented types
- Available extensions
- Annotations
-
- @JS()
- @staticInterop
Constructors
- RTCPeerConnection([RTCConfiguration? configuration])
-
factory
Properties
-
addEventListener
→ ({void Function<
K$>(RTCPeerConnectionEventMap< $1, void Function(String type, Object listener, [Object? options]) $2})K$> type, dynamic listener(K$), [Object? options]) -
Available on RTCPeerConnection, provided by the RTCPeerConnection$Typings extension
Overload accessor: $1, $2no setter - addEventListener ↔ void Function(String, [Object?, Object?])
-
Available on EventTarget, provided by the EventTarget$Typings extension
getter/setter pair -
addIceCandidate
→ ({Future<
void> Function([RTCIceCandidateInit? candidate]) $1, Future<void> Function(RTCIceCandidateInit candidate, VoidFunction successCallback, RTCPeerConnectionErrorCallback failureCallback) $2}) -
Available on RTCPeerConnection, provided by the RTCPeerConnection$Typings extension
Overload accessor: $1, $2no setter - addTrack ↔ RTCRtpSender Function(MediaStreamTrack, [Iterable?])
-
Available on RTCPeerConnection, provided by the RTCPeerConnection$Typings extension
getter/setter pair - addTransceiver ↔ RTCRtpTransceiver Function(Object, [RTCRtpTransceiverInit?])
-
Available on RTCPeerConnection, provided by the RTCPeerConnection$Typings extension
getter/setter pair - canTrickleIceCandidates → bool?
-
Available on RTCPeerConnection, provided by the RTCPeerConnection$Typings extension
MDN Referenceno setter - close ↔ void Function()
-
Available on RTCPeerConnection, provided by the RTCPeerConnection$Typings extension
getter/setter pair - connectionState → RTCPeerConnectionState
-
Available on RTCPeerConnection, provided by the RTCPeerConnection$Typings extension
MDN Referenceno setter -
createAnswer
→ ({Future<
RTCSessionDescriptionInit> Function([RTCAnswerOptions? options]) $1, Future<void> Function(RTCSessionDescriptionCallback successCallback, RTCPeerConnectionErrorCallback failureCallback) $2}) -
Available on RTCPeerConnection, provided by the RTCPeerConnection$Typings extension
Overload accessor: $1, $2no setter - createDataChannel ↔ RTCDataChannel Function(String, [RTCDataChannelInit?])
-
Available on RTCPeerConnection, provided by the RTCPeerConnection$Typings extension
getter/setter pair -
createOffer
→ ({Future<
RTCSessionDescriptionInit> Function([RTCOfferOptions? options]) $1, Future<void> Function(RTCSessionDescriptionCallback successCallback, RTCPeerConnectionErrorCallback failureCallback, [RTCOfferOptions? options]) $2}) -
Available on RTCPeerConnection, provided by the RTCPeerConnection$Typings extension
Overload accessor: $1, $2no setter - currentLocalDescription → RTCSessionDescription?
-
Available on RTCPeerConnection, provided by the RTCPeerConnection$Typings extension
MDN Referenceno setter - currentRemoteDescription → RTCSessionDescription?
-
Available on RTCPeerConnection, provided by the RTCPeerConnection$Typings extension
MDN Referenceno setter - dispatchEvent ↔ bool Function(Event)
-
Available on EventTarget, provided by the EventTarget$Typings extension
getter/setter pair - getConfiguration ↔ RTCConfiguration Function()
-
Available on RTCPeerConnection, provided by the RTCPeerConnection$Typings extension
getter/setter pair -
getReceivers
↔ List<
RTCRtpReceiver> Function() -
Available on RTCPeerConnection, provided by the RTCPeerConnection$Typings extension
getter/setter pair -
getSenders
↔ List<
RTCRtpSender> Function() -
Available on RTCPeerConnection, provided by the RTCPeerConnection$Typings extension
getter/setter pair -
getStats
↔ Future<
RTCStatsReport> Function([MediaStreamTrack?]) -
Available on RTCPeerConnection, provided by the RTCPeerConnection$Typings extension
getter/setter pair -
getTransceivers
↔ List<
RTCRtpTransceiver> Function() -
Available on RTCPeerConnection, provided by the RTCPeerConnection$Typings extension
getter/setter pair - hashCode → int
-
The hash code for this object.
no setterinherited
- iceConnectionState → RTCIceConnectionState
-
Available on RTCPeerConnection, provided by the RTCPeerConnection$Typings extension
MDN Referenceno setter - iceGatheringState → RTCIceGatheringState
-
Available on RTCPeerConnection, provided by the RTCPeerConnection$Typings extension
MDN Referenceno setter - localDescription → RTCSessionDescription?
-
Available on RTCPeerConnection, provided by the RTCPeerConnection$Typings extension
MDN Referenceno setter - onconnectionstatechange ↔ dynamic Function(Event)?
-
Available on RTCPeerConnection, provided by the RTCPeerConnection$Typings extension
MDN Referencegetter/setter pair - ondatachannel ↔ dynamic Function(RTCDataChannelEvent)?
-
Available on RTCPeerConnection, provided by the RTCPeerConnection$Typings extension
MDN Referencegetter/setter pair - onicecandidate ↔ dynamic Function(RTCPeerConnectionIceEvent)?
-
Available on RTCPeerConnection, provided by the RTCPeerConnection$Typings extension
MDN Referencegetter/setter pair - onicecandidateerror ↔ dynamic Function(Event)?
-
Available on RTCPeerConnection, provided by the RTCPeerConnection$Typings extension
MDN Referencegetter/setter pair - oniceconnectionstatechange ↔ dynamic Function(Event)?
-
Available on RTCPeerConnection, provided by the RTCPeerConnection$Typings extension
MDN Referencegetter/setter pair - onicegatheringstatechange ↔ dynamic Function(Event)?
-
Available on RTCPeerConnection, provided by the RTCPeerConnection$Typings extension
MDN Referencegetter/setter pair - onnegotiationneeded ↔ dynamic Function(Event)?
-
Available on RTCPeerConnection, provided by the RTCPeerConnection$Typings extension
MDN Referencegetter/setter pair - onsignalingstatechange ↔ dynamic Function(Event)?
-
Available on RTCPeerConnection, provided by the RTCPeerConnection$Typings extension
MDN Referencegetter/setter pair - ontrack ↔ dynamic Function(RTCTrackEvent)?
-
Available on RTCPeerConnection, provided by the RTCPeerConnection$Typings extension
MDN Referencegetter/setter pair - pendingLocalDescription → RTCSessionDescription?
-
Available on RTCPeerConnection, provided by the RTCPeerConnection$Typings extension
MDN Referenceno setter - pendingRemoteDescription → RTCSessionDescription?
-
Available on RTCPeerConnection, provided by the RTCPeerConnection$Typings extension
MDN Referenceno setter - remoteDescription → RTCSessionDescription?
-
Available on RTCPeerConnection, provided by the RTCPeerConnection$Typings extension
MDN Referenceno setter - removeEventListener ↔ void Function(String, [Object?, Object?])
-
Available on EventTarget, provided by the EventTarget$Typings extension
getter/setter pair -
removeEventListener
→ ({void Function<
K$>(RTCPeerConnectionEventMap< $1, void Function(String type, Object listener, [Object? options]) $2})K$> type, dynamic listener(K$), [Object? options]) -
Available on RTCPeerConnection, provided by the RTCPeerConnection$Typings extension
Overload accessor: $1, $2no setter - removeTrack ↔ void Function(RTCRtpSender)
-
Available on RTCPeerConnection, provided by the RTCPeerConnection$Typings extension
getter/setter pair - restartIce ↔ void Function()
-
Available on RTCPeerConnection, provided by the RTCPeerConnection$Typings extension
getter/setter pair - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sctp → RTCSctpTransport?
-
Available on RTCPeerConnection, provided by the RTCPeerConnection$Typings extension
MDN Referenceno setter - setConfiguration ↔ void Function([RTCConfiguration?])
-
Available on RTCPeerConnection, provided by the RTCPeerConnection$Typings extension
getter/setter pair -
setLocalDescription
→ ({Future<
void> Function([RTCLocalSessionDescriptionInit? description]) $1, Future<void> Function(RTCLocalSessionDescriptionInit description, VoidFunction successCallback, RTCPeerConnectionErrorCallback failureCallback) $2}) -
Available on RTCPeerConnection, provided by the RTCPeerConnection$Typings extension
Overload accessor: $1, $2no setter -
setRemoteDescription
→ ({Future<
void> Function(RTCSessionDescriptionInit description) $1, Future<void> Function(RTCSessionDescriptionInit description, VoidFunction successCallback, RTCPeerConnectionErrorCallback failureCallback) $2}) -
Available on RTCPeerConnection, provided by the RTCPeerConnection$Typings extension
Overload accessor: $1, $2no setter - signalingState → RTCSignalingState
-
Available on RTCPeerConnection, provided by the RTCPeerConnection$Typings extension
MDN Referenceno setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
-
generateCertificate
↔ Future<
RTCCertificate> Function(Object) -
getter/setter pair