RtcPeerConnection class

Inheritance
Annotations
  • @DomName('RTCPeerConnection')
  • @SupportedBrowser(SupportedBrowser.CHROME)
  • @Experimental()

Constants

addStreamEventEventStreamProvider<MediaStreamEvent>
@DocsEditable(), @DomName('RTCPeerConnection.addstreamEvent')

Static factory designed to expose addstream events to event handlers that are not necessarily instances of RtcPeerConnection.

dataChannelEventEventStreamProvider<RtcDataChannelEvent>
@DocsEditable(), @DomName('RTCPeerConnection.datachannelEvent')

Static factory designed to expose datachannel events to event handlers that are not necessarily instances of RtcPeerConnection.

iceCandidateEventEventStreamProvider<RtcIceCandidateEvent>
@DocsEditable(), @DomName('RTCPeerConnection.icecandidateEvent')

Static factory designed to expose icecandidate events to event handlers that are not necessarily instances of RtcPeerConnection.

const EventStreamProvider<RtcIceCandidateEvent>('icecandidate…
iceConnectionStateChangeEventEventStreamProvider<Event>
@DocsEditable(), @DomName('RTCPeerConnection.iceconnectionstatechangeEvent')

Static factory designed to expose iceconnectionstatechange events to event handlers that are not necessarily instances of RtcPeerConnection.

const EventStreamProvider<Event>('iceconnectionstatechange')
negotiationNeededEventEventStreamProvider<Event>
@DocsEditable(), @DomName('RTCPeerConnection.negotiationneededEvent')

Static factory designed to expose negotiationneeded events to event handlers that are not necessarily instances of RtcPeerConnection.

const EventStreamProvider<Event>('negotiationneeded')
removeStreamEventEventStreamProvider<MediaStreamEvent>
@DocsEditable(), @DomName('RTCPeerConnection.removestreamEvent')

Static factory designed to expose removestream events to event handlers that are not necessarily instances of RtcPeerConnection.

const EventStreamProvider<MediaStreamEvent>('removestream')
signalingStateChangeEventEventStreamProvider<Event>
@DocsEditable(), @DomName('RTCPeerConnection.signalingstatechangeEvent')

Static factory designed to expose signalingstatechange events to event handlers that are not necessarily instances of RtcPeerConnection.

const EventStreamProvider<Event>('signalingstatechange')

Static Properties

instanceRuntimeTypeType
@Deprecated("Internal Use Only"), read-only
supportedbool
read-only

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

Static Methods

generateCertificate(keygenAlgorithm) → Future
@DocsEditable(), @DomName('RTCPeerConnection.generateCertificate'), @Experimental()

Constructors

RtcPeerConnection(Map rtcConfiguration, [ Map mediaConstraints ])
factory
RtcPeerConnection.internal_()

Properties

iceConnectionStateString
@DocsEditable(), @DomName('RTCPeerConnection.iceConnectionState'), read-only
iceGatheringStateString
@DocsEditable(), @DomName('RTCPeerConnection.iceGatheringState'), read-only
localDescriptionRtcSessionDescription
@DocsEditable(), @DomName('RTCPeerConnection.localDescription'), read-only
onAddStreamStream<MediaStreamEvent>
@DocsEditable(), @DomName('RTCPeerConnection.onaddstream'), read-only

Stream of addstream events handled by this RtcPeerConnection.

onDataChannelStream<RtcDataChannelEvent>
@DocsEditable(), @DomName('RTCPeerConnection.ondatachannel'), read-only

Stream of datachannel events handled by this RtcPeerConnection.

onIceCandidateStream<RtcIceCandidateEvent>
@DocsEditable(), @DomName('RTCPeerConnection.onicecandidate'), read-only

Stream of icecandidate events handled by this RtcPeerConnection.

onIceConnectionStateChangeStream<Event>
@DocsEditable(), @DomName('RTCPeerConnection.oniceconnectionstatechange'), read-only

Stream of iceconnectionstatechange events handled by this RtcPeerConnection.

onNegotiationNeededStream<Event>
@DocsEditable(), @DomName('RTCPeerConnection.onnegotiationneeded'), read-only

Stream of negotiationneeded events handled by this RtcPeerConnection.

onRemoveStreamStream<MediaStreamEvent>
@DocsEditable(), @DomName('RTCPeerConnection.onremovestream'), read-only

Stream of removestream events handled by this RtcPeerConnection.

onSignalingStateChangeStream<Event>
@DocsEditable(), @DomName('RTCPeerConnection.onsignalingstatechange'), read-only

Stream of signalingstatechange events handled by this RtcPeerConnection.

remoteDescriptionRtcSessionDescription
@DocsEditable(), @DomName('RTCPeerConnection.remoteDescription'), read-only
signalingStateString
@DocsEditable(), @DomName('RTCPeerConnection.signalingState'), read-only
hashCodeint
read-only, inherited
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.

Operators

operator ==(other) → bool
inherited

The equality operator.

Methods

addIceCandidate(candidate, [ VoidCallback successCallback, RtcPeerConnectionErrorCallback failureCallback ]) → Future
addStream(MediaStream stream, [ Map mediaConstraints ]) → void
close() → void
@DocsEditable(), @DomName('RTCPeerConnection.close')
createAnswer([Map mediaConstraints ]) → Future<RtcSessionDescription>
createDataChannel(String label, [ Map options ]) → RtcDataChannel
createDtmfSender(MediaStreamTrack track) → RtcDtmfSender
@DocsEditable(), @DomName('RTCPeerConnection.createDTMFSender')
createOffer([Map mediaConstraints ]) → Future<RtcSessionDescription>
getLocalStreams() → List<MediaStream>
@DocsEditable(), @DomName('RTCPeerConnection.getLocalStreams')
getRemoteStreams() → List<MediaStream>
@DocsEditable(), @DomName('RTCPeerConnection.getRemoteStreams')
getStats(MediaStreamTrack selector) → Future<RtcStatsResponse>
@DomName('RTCPeerConnection.getStats')
getStreamById(String streamId) → MediaStream
@DocsEditable(), @DomName('RTCPeerConnection.getStreamById')
removeStream(MediaStream stream) → void
@DocsEditable(), @DomName('RTCPeerConnection.removeStream')
setLocalDescription(RtcSessionDescription description) → Future
setRemoteDescription(RtcSessionDescription description) → Future
updateIce([Map configuration, Map mediaConstraints ]) → void
addEventListener(String type, EventListener listener, [ bool useCapture ]) → void
inherited
dispatchEvent(Event event) → bool
@DocsEditable(), @DomName('EventTarget.dispatchEvent'), 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 the result of the JavaScript objects toString method.

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