Dart SDK
dart:html
RtcPeerConnection
class
RtcPeerConnection
Constants
Static Properties
Properties
Constructors
Methods
Constants
addStreamEvent
dataChannelEvent
iceCandidateEvent
iceConnectionStateChangeEvent
negotiationNeededEvent
removeStreamEvent
signalingStateChangeEvent
Static properties
supported
Properties
iceConnectionState
iceGatheringState
localDescription
remoteDescription
signalingState
onAddStream
onDataChannel
onIceCandidate
onIceConnectionStateChange
onNegotiationNeeded
onRemoveStream
onSignalingStateChange
on
Constructors
RtcPeerConnection
Methods
createOffer
createAnswer
getStats
addIceCandidate
addStream
close
createDtmfSender
createDataChannel
getLocalStreams
getRemoteStreams
getStreamById
removeStream
setLocalDescription
setRemoteDescription
updateIce
addEventListener
removeEventListener
dispatchEvent
(Not documented.)
Annotations
DomName('RTCPeerConnection')
SupportedBrowser(SupportedBrowser.CHROME)
Experimental()
Extends
Object
EventTarget
RtcPeerConnection
Constants
EventStreamProvider
<
MediaStreamEvent
>
addStreamEvent
=
const
EventStreamProvider
<
MediaStreamEvent
>
('addstream')
const
Static factory designed to expose addstream events to event handlers that are not necessarily instances of
RtcPeerConnection
.
EventStreamProvider
<
RtcDataChannelEvent
>
dataChannelEvent
=
const
EventStreamProvider
<
RtcDataChannelEvent
>
('datachannel')
const
Static factory designed to expose datachannel events to event handlers that are not necessarily instances of
RtcPeerConnection
.
EventStreamProvider
<
RtcIceCandidateEvent
>
iceCandidateEvent
=
const
EventStreamProvider
<
RtcIceCandidateEvent
>
('icecandidate')
const
Static factory designed to expose icecandidate events to event handlers that are not necessarily instances of
RtcPeerConnection
.
EventStreamProvider
<
Event
>
iceConnectionStateChangeEvent
=
const
EventStreamProvider
<
Event
>
('iceconnectionstatechange')
const
Static factory designed to expose iceconnectionstatechange events to event handlers that are not necessarily instances of
RtcPeerConnection
.
EventStreamProvider
<
Event
>
negotiationNeededEvent
=
const
EventStreamProvider
<
Event
>
('negotiationneeded')
const
Static factory designed to expose negotiationneeded events to event handlers that are not necessarily instances of
RtcPeerConnection
.
EventStreamProvider
<
MediaStreamEvent
>
removeStreamEvent
=
const
EventStreamProvider
<
MediaStreamEvent
>
('removestream')
const
Static factory designed to expose removestream events to event handlers that are not necessarily instances of
RtcPeerConnection
.
EventStreamProvider
<
Event
>
signalingStateChangeEvent
=
const
EventStreamProvider
<
Event
>
('signalingstatechange')
const
Static factory designed to expose signalingstatechange events to event handlers that are not necessarily instances of
RtcPeerConnection
.
Static Properties
bool
supported
read-only
Checks if Real Time Communication (RTC) APIs are supported and enabled on the current platform.
Properties
String
iceConnectionState
read-only
String
iceGatheringState
read-only
RtcSessionDescription
localDescription
read-only
RtcSessionDescription
remoteDescription
read-only
String
signalingState
read-only
Stream
<
MediaStreamEvent
>
onAddStream
read-only
Stream of addstream events handled by this [RtcPeerConnection].
Stream
<
RtcDataChannelEvent
>
onDataChannel
read-only
Stream of datachannel events handled by this [RtcPeerConnection].
Stream
<
RtcIceCandidateEvent
>
onIceCandidate
read-only
Stream of icecandidate events handled by this [RtcPeerConnection].
Stream
<
Event
>
onIceConnectionStateChange
read-only
Stream of iceconnectionstatechange events handled by this [RtcPeerConnection].
Stream
<
Event
>
onNegotiationNeeded
read-only
Stream of negotiationneeded events handled by this [RtcPeerConnection].
Stream
<
MediaStreamEvent
>
onRemoveStream
read-only
Stream of removestream events handled by this [RtcPeerConnection].
Stream
<
Event
>
onSignalingStateChange
read-only
Stream of signalingstatechange events handled by this [RtcPeerConnection].
Events
on
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.
Constructors
RtcPeerConnection
(
Map
rtcConfiguration
, [
Map
mediaConstraints
])
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