RtcPeerConnection class

Annotations
  • DomName('RTCPeerConnection')
  • SupportedBrowser(SupportedBrowser.CHROME)
  • Experimental()
Extends

Constructors

RtcPeerConnection(Map rtcConfiguration, [Map mediaConstraints])

Constants

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

Static Properties

supported bool
read-only

Instance Properties

iceConnectionState String
read-only
iceGatheringState String
read-only
localDescription RtcSessionDescription
read-only
remoteDescription RtcSessionDescription
read-only
signalingState String
read-only
onAddStream Stream<MediaStreamEvent>
read-only
onDataChannel Stream<RtcDataChannelEvent>
read-only
onIceCandidate Stream<RtcIceCandidateEvent>
read-only
onIceConnectionStateChange Stream<Event>
read-only
onNegotiationNeeded Stream<Event>
read-only
onRemoveStream Stream<MediaStreamEvent>
read-only
onSignalingStateChange Stream<Event>
read-only
on Events Inherited
read-only

Instance Methods

createOffer([Map mediaConstraints]) → Future<RtcSessionDescription>
createAnswer([Map mediaConstraints]) → Future<RtcSessionDescription>
getStats(MediaStreamTrack selector) → Future<RtcStatsResponse>
addIceCandidate(RtcIceCandidate candidate, void successCallback(), void failureCallback(String errorInformation)) → void
addStream(MediaStream stream, [Map mediaConstraints]) → void
close() → void
createDtmfSender(MediaStreamTrack track) → RtcDtmfSender
createDataChannel(String label, [Map options]) → RtcDataChannel
getLocalStreams() → List<MediaStream>
getRemoteStreams() → List<MediaStream>
getStreamById(String streamId) → MediaStream
removeStream(MediaStream stream) → void
setLocalDescription(RtcSessionDescription description) → Future
setRemoteDescription(RtcSessionDescription description) → Future
updateIce([Map configuration, Map mediaConstraints]) → void
addEventListener(String type, dynamic listener(Event event), [bool useCapture]) → void Inherited
removeEventListener(String type, dynamic listener(Event event), [bool useCapture]) → void Inherited
dispatchEvent(Event event) → bool Inherited