ConferenceSession class

Implemented types

Constructors

ConferenceSession(dynamic client, JanusSignaler _signaler, int conferenceType, {bool startScreenSharing = false, DesktopCapturerSource? desktopCapturerSource, bool useIOSBroadcasting = false, bool requestAudioForScreenSharing = false, String? selectedAudioInputDevice, String? selectedVideoInputDevice})

Properties

allActivePublishers Set<int>
getter/setter pair
allActiveSubscribers Set<int>
getter/setter pair
callType int
getter/setter pair
channels Map<int, ConferencePeerConnection>
getter/setter pairinherited
client ConferenceClient
finalinherited
creatingSubscription bool
getter/setter pair
currentUserId int
no setter
desktopCapturerSource DesktopCapturerSource?
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
joinedAsSubscriber bool
getter/setter pair
joinEventPublishers Set<int>
getter/setter pair
joinSenderId int?
getter/setter pair
localStream MediaStream?
getter/setter pairinherited
onError ↔ (void Function(WsException)?)
getter/setter pairoverride
onLayerChanged ↔ (void Function(int, int)?)
getter/setter pairoverride
onLocalStreamReceived LocalStreamCallback?
getter/setter pairinherited
onPublisherLeft ↔ (void Function(int?)?)
getter/setter pairoverride
onPublishersReceived ↔ (void Function(List<int?>)?)
The subscription on publisher now doing automatically by the SDK. Don't use it for subscription on publisher instead use for managing the publishers in your app.
getter/setter pairoverride
onRemoteStreamRemoved RemoteStreamCallback<BaseSession<dynamic, PeerConnection>>?
getter/setter pairinherited
onRemoteStreamTrackReceived RemoteStreamCallbackConference<ConferenceSession>?
getter/setter pair
onSessionClosed SessionClosedCallback<BaseSession<dynamic, PeerConnection>>?
getter/setter pairinherited
getter/setter pairoverride
onSubscribedOnPublisher ↔ (void Function(int)?)
getter/setter pairoverride
onSubscriberAttached ↔ (void Function(int)?)
getter/setter pairoverride
onSubStreamChanged ↔ (void Function(int, StreamType)?)
getter/setter pairoverride
publisherId int
no setter
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
sessionDescription ↔ CubeConferenceSessionDescription
getter/setter pair
startScreenSharing bool
getter/setter pairinherited
state RTCSessionState?
getter/setter pairinherited
statsReports Stream<CubeStatsReport>
no setterinherited
statsReportsStreamController StreamController<CubeStatsReport>
getter/setter pairinherited
subscriberId int
no setter
trackIdMid Map<String, String>
getter/setter pair
trackIdTrackIdentifier Map<String, String>
getter/setter pair
useIOSBroadcasting bool
getter/setter pairinherited

Methods

addMediaTrack(MediaStreamTrack track) Future<MediaStream>
autoSubscribeToPublisher(bool autoSubscribe) → void
closeConnectionForOpponent(int opponentId, dynamic callback(int opponentId)?) → void
inherited
closeCurrentSession() Future<void>
inherited
createAnswer(int? opponentId, String? sdp) → void
createOffer(int? opponentId) → void
disposeSession() → void
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?>
getUserIdForStream(String? trackId, String? trackIdentifier, int defaultId) int
override
initLocalMediaStream() Future<MediaStream>
inherited
isConnectionActive() bool
isPublisherEvent(int? senderId) bool
joinDialog(String dialogId, dynamic callback(List<int?> publishers), {ConferenceRole conferenceRole = ConferenceRole.PUBLISHER}) Future<void>
leave() → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyJoinedSuccessListeners(List<int?> publishers) → void
notifySessionClosed() → void
notifySessionError(WsException exception) → void
onAttachedAsSubscriber() → void
override
onEventError(String? error, int? code) → void
override
onGetOnlineParticipants(Map<int?, bool?> participants) → void
override
onHangUp(String? reason) → void
override
onIceGatheringStateChanged(int userId, RTCIceGatheringState state) → void
onJoinEvent(List<int> publishersList, List<int> subscribersList, int? senderId) Future<void>
override
onJoiningEvent(int participantId, ConferenceRole? conferenceRole) → void
override
onLayerChangedForOpponent(int userId, int layer) → void
override
onLeaveCurrentUserEvent(bool success) → void
override
onLeaveParticipantEvent(int? participantId) → void
override
onMediaReceived(String? type, bool? success) → void
override
onPacketError(String error) → void
override
onPeerConnectionStateChanged(int userId, PeerConnectionState state) → void
onPublishedEvent(List<int> publishersList) → void
override
onRemoteSDPEventAnswer(bool fromPublisher, String? sdp) → void
override
onRemoteSDPEventOffer(int? opponentId, String? sdp) → void
override
onRemoteStreamReceive(int userId, MediaStream remoteMediaStream, {RTCRtpTransceiver? transceiver, MediaStreamTrack? track}) → void
onRemoteStreamRemove(int userId, MediaStream remoteMediaStream, {String? trackId}) → void
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
onSlowLinkReceived(bool? uplink, int? lost) → void
override
onStartedEvent(String? started) → void
override
onStatsReceived(int userId, List<StatsReport> stats) → void
onSubStreamChangedForOpponent(int userId, StreamType streamType) → void
override
onUnPublishedEvent(int? publisherId) → void
override
onVideoRoomEvent(String? event) → void
override
onWebRTCUpReceived(int? senderId) → void
override
proceedAsListener() Future<void>
proceedAsPublisher() Future<void>
removeMediaTrack(String trackId) Future<MediaStream>
removeSessionCallbacksListener() → dynamic
replaceMediaStream(MediaStream mediaStream) Future<void>
inherited
requestPreferredLayerForOpponentStream(int opponentId, int layerNumber) Future<void>
Allows changing the layer with different FPS. There available three layers:
requestPreferredLayersForOpponentsStreams(Map<int, int> config) Future<void>
Allows changing the layer with different FPS for few users using single request. config - is the map where key is the opponent's id and the value is the preferred layer of the video stream There available three layers:
requestPreferredStreamForOpponent(int opponentId, StreamType streamType) Future<void>
Requests the preferred quality for the opponent's video stream There available three types of media streams depending on the video bitrate and resolution. There are:
requestPreferredStreamsForOpponents(Map<int, StreamType> configs) Future<void>
Requests the preferred quality for the opponents' video streams configs - is the map where key is the opponent's id and the value is the required quality of the video stream There available three types of media streams depending on the video bitrate and resolution. There are:
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
selectJoinStrategy() Future<void>
sendIceCandidateComplete(int userId) → void
setMaxBandwidth(int? bitrate) → void
Sets maximum bandwidth for the local media stream bandwidth - the bandwidth in kbps, set to 0 or null for disabling the limitation
setMicrophoneMute(bool mute) → void
inherited
setSessionCallbacksListener(RTCSessionStateCallback<BaseSession<dynamic, PeerConnection>> callback) → dynamic
setState(RTCSessionState state) → void
inherited
setTorchEnabled(bool enabled) Future<void>
inherited
setVideoEnabled(bool enabled) → void
inherited
subscribeToPublisher(int? publisherId) Future<void>
subscribeToPublishers(Set<int> publishersIds) Future<void>
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
unsubscribeFromPublisher(int publisherId, {Set<String>? tracks}) Future<void>
unsubscribeFromPublishers(Map<int, Set<String>?> publishers) Future<void>

Operators

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