P2PSession class

Implemented types

Constructors

P2PSession(dynamic client, CubeRTCSessionDescription cubeSdp, {bool startScreenSharing = false, DesktopCapturerSource? desktopCapturerSource, bool useIOSBroadcasting = false, bool requestAudioForScreenSharing = false, String? selectedAudioInputDevice, String? selectedVideoInputDevice})

Properties

callerId int
no setteroverride
callType int
getter/setter pairoverride-setter
channels Map<int, PeerConnection>
getter/setter pairinherited
client P2PClient
finalinherited
cubeSdp ↔ CubeRTCSessionDescription
getter/setter pair
desktopCapturerSource DesktopCapturerSource?
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
localStream MediaStream?
getter/setter pairinherited
onCallAcceptedByUser UserActionCallback<P2PSession>?
getter/setter pairoverride
onCallRejectedByUser UserActionCallback<P2PSession>?
getter/setter pairoverride
onLocalStreamReceived LocalStreamCallback?
getter/setter pairinherited
onReceiveHungUpFromUser UserActionCallback<P2PSession>?
getter/setter pairoverride
onRemoteStreamReceived RemoteStreamCallback<BaseSession<dynamic, PeerConnection>>?
getter/setter pair
onRemoteStreamRemoved RemoteStreamCallback<BaseSession<dynamic, PeerConnection>>?
getter/setter pairinherited
onSessionClosed SessionClosedCallback<BaseSession<dynamic, PeerConnection>>?
getter/setter pairinherited
onUserNoAnswer UserConnectionStateCallback<P2PSession>?
getter/setter pairoverride
opponentsIds Set<int>
no setteroverride
requestAudioForScreenSharing bool
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedAudioInputDevice String?
getter/setter pairinherited
selectedVideoInputDevice String?
getter/setter pairinherited
sessionId String
no setteroverride
startScreenSharing bool
getter/setter pairinherited
state RTCSessionState?
getter/setter pairinherited
statsReports Stream<CubeStatsReport>
no setterinherited
statsReportsStreamController StreamController<CubeStatsReport>
getter/setter pairinherited
useIOSBroadcasting bool
getter/setter pairinherited

Methods

acceptCall([Map<String, String>? userInfo]) Future<void>
override
addMediaTrack(MediaStreamTrack track) Future<MediaStream>
inherited
closeConnectionForOpponent(int opponentId, dynamic callback(int opponentId)?) → void
inherited
closeCurrentSession() Future<void>
inherited
enableScreenSharing(bool enable, {DesktopCapturerSource? desktopCapturerSource, bool useIOSBroadcasting = false, bool requestAudioForScreenSharing = false}) Future<void>
Enables/disables the Screen Sharing feature. enable - true - for enabling Screen Sharing or false - for disabling. desktopCapturerSource - the desktop capturer source, if it is null the default Window/Screen will be captured. Use only for desktop platforms. Use ScreenSelectDialog to give the user a choice of the shared Window/Screen. useIOSBroadcasting - set true if the Broadcast Upload Extension was added to your iOS project for implementation Screen Sharing feature, otherwise set false and in-app Screen Sharing will be started. Used for iOS platform only. See our step-by-step guide on how to integrate the Screen Broadcasting feature into your iOS app. requestAudioForScreenSharing - set true if need to request the audio stream from your Audio input device, otherwise the Screen Sharing will be requested without an audio
inherited
enableSpeakerphone(bool enable) → void
Set speakerphone enable/disable for iOS/Android only. For other platforms use the selectAudioOutput
inherited
getAudioInputs() Future<List<MediaDeviceInfo>>
Return the available audioinputs
inherited
getAudioOutputs() Future<List<MediaDeviceInfo>>
Return the available audiooutputs
inherited
getCameras() Future<List<MediaDeviceInfo>>
Return the available cameras
inherited
getLocalMediaStream(int userId) Future<MediaStream?>
inherited
getUserIdForStream(String? trackId, String? trackIdentifier, int defaultId) int
override
hungUp([Map<String, String>? userInfo]) → void
override
initLocalMediaStream() Future<MediaStream>
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifySessionClosed() → void
onIceGatheringStateChanged(int userId, RTCIceGatheringState state) → void
inherited
onPeerConnectionStateChanged(int userId, PeerConnectionState state) → void
onRemoteStreamReceive(int userId, MediaStream remoteMediaStream, {RTCRtpTransceiver? transceiver, MediaStreamTrack? track}) → void
onRemoteStreamRemove(int userId, MediaStream remoteMediaStream, {String? trackId}) → void
inherited
onSendAnswer(int userId, RTCSessionDescription sdp) → void
onSendIceCandidate(int userId, RTCIceCandidate iceCandidate) → void
onSendIceCandidates(int userId, List<RTCIceCandidate>? iceCandidates) → void
onSendOffer(int userId, RTCSessionDescription sdp) → void
onSendUpdateCall(int userId, RTCSessionDescription sdp) → void
onStatsReceived(int userId, List<StatsReport> stats) → void
inherited
processAcceptCall(CubeRTCSessionDescription cubeRtcSdp, int opponentId, RTCSessionDescription sdp) Future<void>
processCallUpdated(int opponentId, RTCSessionDescription sdp) → void
processHungUpFromUser(CubeRTCSessionDescription cubeRtcSdp, int opponentId) → void
processIceCandidates(List<RTCIceCandidate?> candidates, int opponentId) → void
processNewCall(int opponentId, RTCSessionDescription sdp) → void
processRejectFromUser(CubeRTCSessionDescription cubeRtcSdp, int opponentId) → void
reject([Map<String, String>? userInfo]) → void
override
removeMediaTrack(String trackId) Future<MediaStream>
inherited
removeSessionCallbacksListener() → dynamic
inherited
replaceMediaStream(MediaStream mediaStream) Future<void>
inherited
selectAudioInput(String deviceId) Future<void>
Sets the selected device as the audio input device. Use getAudioInputs for getting the list of available audio input devices
inherited
selectAudioOutput(String deviceId) Future<void>
Used to select a specific audio output device.
inherited
setMaxBandwidth(int? bandwidth) → void
Sets maximum bandwidth for the local media stream bandwidth - the bandwidth in kbps, set to 0 or null for disabling the limitation
inherited
setMicrophoneMute(bool mute) → void
inherited
setSessionCallbacksListener(RTCSessionStateCallback<BaseSession<dynamic, PeerConnection>> callback) → dynamic
inherited
setState(RTCSessionState state) → void
inherited
setTorchEnabled(bool enabled) Future<void>
inherited
setVideoEnabled(bool enabled) → void
inherited
startCall([Map<String, String>? userInfo]) Future<void>
override
switchCamera({String? deviceId}) Future<bool>
For web implementation, make sure to pass the target deviceId
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

TAG → const String