PeerConnection class abstract
RTCPeerConnection representation.
Constructors
Properties
Methods
-
addIceCandidate(
IceCandidate candidate) → Future< void> - Adds a new IceCandidate to the PeerConnection.
-
addTransceiver(
MediaKind mediaType, RtpTransceiverInit init) → Future< RtpTransceiver> -
Adds a new
RtpTransceiver
to this PeerConnection. -
close(
) → Future< void> - Closes this PeerConnection and all it's owned entities (for example, RtpTransceivers).
-
connectionState(
) → PeerConnectionState - Returns the current PeerConnectionState of this PeerConnection.
-
createAnswer(
) → Future< SessionDescription> -
Creates a new
SessionDescription
answer. -
createOffer(
) → Future< SessionDescription> -
Creates a new
SessionDescription
offer. -
getStats(
) → Future< List< RtcStats> > - Returns all the RtcStats of this PeerConnection.
-
getTransceivers(
) → Future< List< RtpTransceiver> > - Returns all the RtpTransceivers owned by this PeerConnection.
-
iceConnectionState(
) → IceConnectionState - Returns the current IceConnectionState of this PeerConnection.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onConnectionStateChange(
OnConnectionStateChangeCallback f) → void -
Subscribes the provided callback to the
on_connection_state_change
events of this PeerConnection. -
onIceCandidate(
OnIceCandidateCallback f) → void -
Subscribes the provided callback to the
on_ice_candidate
events of this PeerConnection. -
onIceCandidateError(
OnIceCandidateErrorCallback f) → void -
Subscribes the provided callback to the
on_ice_candidate_error
events of this PeerConnection. -
onIceConnectionStateChange(
OnIceConnectionStateChangeCallback f) → void -
Subscribes the provided callback to the
on_ice_connection_state_change
events of this PeerConnection. -
onIceGatheringStateChange(
OnIceGatheringStateChangeCallback f) → void -
Subscribes the provided callback to the
on_ice_gathering_state_change
events of this PeerConnection. -
onNegotiationNeeded(
OnNegotiationNeededCallback f) → void -
Subscribes the provided callback to the
on_negotiation_needed
events of this PeerConnection. -
onSignalingStateChange(
OnSignalingStateChangeCallback f) → void -
Subscribes the provided callback to the
on_signaling_state_change
events of this PeerConnection. -
onTrack(
OnTrackCallback f) → void -
Subscribes the provided callback to the
on_track
events of this PeerConnection. -
restartIce(
) → Future< void> - Requests the PeerConnection to redo IceCandidates gathering.
-
setLocalDescription(
SessionDescription description) → Future< void> - Sets the provided local SessionDescription to the PeerConnection.
-
setRemoteDescription(
SessionDescription description) → Future< void> - Sets the provided remote SessionDescription to the PeerConnection.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
create(
IceTransportType iceTransportType, List< IceServer> iceServers) → Future<PeerConnection> -
Creates a new
PeerConnection
with the provided IceTransportType and IceServers.