W3cubDocs

/Dart 2

RtcPeerConnection class

Inheritance
Annotations
  • @SupportedBrowser(SupportedBrowser.CHROME)
  • @Native("RTCPeerConnection,webkitRTCPeerConnection,mozRTCPeerConnection")

Constructors

RtcPeerConnection(Map rtcIceServers, [ Map mediaConstraints ])
factory

Properties

iceConnectionStateString
final
iceGatheringStateString
final
localDescriptionRtcSessionDescription
final
onAddStreamStream<MediaStreamEvent>
read-only
Stream of addstream events handled by this RtcPeerConnection.
onDataChannelStream<RtcDataChannelEvent>
read-only
Stream of datachannel events handled by this RtcPeerConnection.
onIceCandidateStream<RtcPeerConnectionIceEvent>
read-only
Stream of icecandidate events handled by this RtcPeerConnection.
onIceConnectionStateChangeStream<Event>
read-only
Stream of iceconnectionstatechange events handled by this RtcPeerConnection.
onNegotiationNeededStream<Event>
read-only
Stream of negotiationneeded events handled by this RtcPeerConnection.
onRemoveStreamStream<MediaStreamEvent>
read-only
Stream of removestream events handled by this RtcPeerConnection.
onSignalingStateChangeStream<Event>
read-only
Stream of signalingstatechange events handled by this RtcPeerConnection.
remoteDescriptionRtcSessionDescription
final
signalingStateString
final
hashCodeint
read-only, inherited
The hash code for this object. [...]
onEvents
read-only, inherited
This is an ease-of-use accessor for event streams which should only be used when an explicit accessor is not available.
runtimeTypeType
read-only, inherited
A representation of the runtime type of the object.

Methods

addIceCandidate(Object candidate, [ VoidCallback successCallback, RtcPeerConnectionErrorCallback failureCallback ]) → Future
addStream(MediaStream stream, [ Map mediaConstraints ]) → void
addTrack(MediaStreamTrack track, MediaStream streams) → RtcRtpSender
close() → void
createAnswer([Map options ]) → Future<RtcSessionDescription>
createDataChannel(String label, [ Map dataChannelDict ]) → RtcDataChannel
createDtmfSender(MediaStreamTrack track) → RtcDtmfSender
@JSName('createDTMFSender')
createOffer([Map options ]) → Future<RtcSessionDescription>
getLegacyStats([MediaStreamTrack selector ]) → Future<RtcStatsResponse>
Temporarily exposes _getStats and old getStats as getLegacyStats until Chrome fully supports new getStats API.
getLocalStreams() → List<MediaStream>
getReceivers() → List<RtcRtpReceiver>
getRemoteStreams() → List<MediaStream>
getSenders() → List<RtcRtpSender>
getStats() → Future<RtcStatsReport>
removeStream(MediaStream stream) → void
removeTrack(RtcRtpSender sender) → void
setConfiguration(Map configuration) → void
setLocalDescription(Map description) → Future
setRemoteDescription(Map description) → Future
addEventListener(String type, EventListener listener, [ bool useCapture ]) → void
inherited
dispatchEvent(Event event) → bool
inherited
noSuchMethod(Invocation invocation) → dynamic
inherited
Invoked when a non-existent method or property is accessed. [...]
removeEventListener(String type, EventListener listener, [ bool useCapture ]) → void
inherited
toString() → String
inherited
Returns a string representation of this object.

Operators

operator ==(dynamic other) → bool
inherited
The equality operator. [...]

Static Properties

supportedbool
read-only
Checks if Real Time Communication (RTC) APIs are supported and enabled on the current platform.

Static Methods

generateCertificate(dynamic keygenAlgorithm) → Future

Constants

addStreamEvent → const EventStreamProvider<MediaStreamEvent>
Static factory designed to expose addstream events to event handlers that are not necessarily instances of RtcPeerConnection. [...]
const EventStreamProvider<MediaStreamEvent>('addstream')
dataChannelEvent → const EventStreamProvider<RtcDataChannelEvent>
Static factory designed to expose datachannel events to event handlers that are not necessarily instances of RtcPeerConnection. [...]
const EventStreamProvider<RtcDataChannelEvent>('datachannel')
iceCandidateEvent → const EventStreamProvider<RtcPeerConnectionIceEvent>
Static factory designed to expose icecandidate events to event handlers that are not necessarily instances of RtcPeerConnection. [...]
const EventStreamProvider<RtcPeerConnectionIceEvent>('icecandidate')
iceConnectionStateChangeEvent → const EventStreamProvider<Event>
Static factory designed to expose iceconnectionstatechange events to event handlers that are not necessarily instances of RtcPeerConnection. [...]
const EventStreamProvider<Event>('iceconnectionstatechange')
negotiationNeededEvent → const EventStreamProvider<Event>
Static factory designed to expose negotiationneeded events to event handlers that are not necessarily instances of RtcPeerConnection. [...]
const EventStreamProvider<Event>('negotiationneeded')
removeStreamEvent → const EventStreamProvider<MediaStreamEvent>
Static factory designed to expose removestream events to event handlers that are not necessarily instances of RtcPeerConnection. [...]
const EventStreamProvider<MediaStreamEvent>('removestream')
signalingStateChangeEvent → const EventStreamProvider<Event>
Static factory designed to expose signalingstatechange events to event handlers that are not necessarily instances of RtcPeerConnection. [...]
const EventStreamProvider<Event>('signalingstatechange')

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.5.0/dart-html/RtcPeerConnection-class.html