OngoingCall class

Ongoing ChatCall in a Chat.

Proper initialization requires connect once the inner ChatCall is set.

Available extensions

Constructors

OngoingCall(ChatId chatId, UserId me, {ChatCall? call, bool withAudio = true, bool withVideo = true, bool withScreen = false, MediaSettings? mediaSettings, OngoingCallState state = OngoingCallState.pending, ChatCallCredentials? creds, ChatCallDeviceId? deviceId})

Properties

audioDevice → Rx<DeviceDetails?>
DeviceDetails currently used as a microphone device.
final
audioState ↔ Rx<LocalTrackState>
LocalTrackState of a local audio stream.
latefinal
autoGainControl → bool?
Indicates whether auto gain control should be enabled.
no setter
background → bool
Indicator whether this OngoingCall wasn't inited.
no setter
call ↔ Rx<ChatCall?>
ChatCall associated with this OngoingCall.
latefinal
callChatItemId → ChatItemId?
ChatItemId of this OngoingCall.
no setter
caller → User?
User that started this OngoingCall.
no setter
chatId → Rx<ChatId>
ID of the Chat this OngoingCall takes place in.
final
connected ↔ bool
Indicator whether this OngoingCall is connected to the remote updates or not.
getter/setter pair
connectionLost → RxBool
Indicator whether the connection to the remote updates was lost and an ongoing reconnection is happening.
final
conversationStartedAt → PreciseDateTime?
PreciseDateTime when the actual conversation in this ChatCall was started (after ringing had been finished).
no setter
creds ↔ ChatCallCredentials?
One-time secret credentials to authenticate with on a media server.
getter/setter pair
deviceId ↔ ChatCallDeviceId?
ID of the device this OngoingCall is taking place on.
getter/setter pair
devices → RxList<DeviceDetails>
List of DeviceDetails of all the available devices.
final
displays → RxList<MediaDisplayDetails>
List of MediaDisplayDetails of all the available displays.
final
echoCancellation → bool?
Indicates whether echo cancellation should be enabled.
no setter
hasAudio → bool
Indicates whether this OngoingCall has an active microphone track.
no setter
hasCamera → bool
Indicates whether this OngoingCall has an active camera track.
no setter
hashCode → int
The hash code for this object.
no setterinherited
hasRemote → bool
Indicator whether this OngoingCall has any remote connection active.
no setter
hasScreen → bool
Indicates whether this OngoingCall has an active screen track.
no setter
hasScreenAudio → bool
Indicates whether this OngoingCall has an active screen audio track.
no setter
highPassFilter → bool?
Indicates whether high pass filter should be enabled.
no setter
isActive → bool
Indicates whether this OngoingCall is active.
no setter
isRemoteAudioEnabled → RxBool
Indicator whether the inbound audio in this OngoingCall is enabled or not.
final
isRemoteVideoEnabled → RxBool
Indicator whether the inbound video in this OngoingCall is enabled or not.
final
localTracks → ObsList<Track>?
Returns the local Tracks.
no setter
me → CallMember
Returns the CallMember of the currently authorized MyUser.
no setter
members → RxObsMap<CallMemberId, CallMember>
Reactive map of CallMembers of this OngoingCall.
final
noiseSuppression → bool?
Indicates whether noise suppression should be enabled.
no setter
noiseSuppressionLevel → NoiseSuppressionLevel?
Returns the suppression level set.
no setter
notifications → Stream<CallNotification>
Returns a Stream of the CallNotifications.
no setter
outgoing → bool
Indicates whether the current authorized MyUser is the caller.
no setter
outputDevice → Rx<DeviceDetails?>
DeviceDetails currently used as a audio output device.
final
participated → bool
Indicates whether isActive was true at least once during the lifecycle of this OngoingCall.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
screenAudio → RxBool
Indicator whether system capture audio is being used.
final
screenDevice → Rx<MediaDisplayDetails?>
MediaDisplayDetails currently used as a screen share device.
final
screenShareState ↔ Rx<LocalTrackState>
LocalTrackState of a local screen-share stream.
latefinal
state ↔ Rx<OngoingCallState>
State of this OngoingCall.
getter/setter pair
videoDevice → Rx<DeviceDetails?>
DeviceDetails currently used as a video device.
final
videoState ↔ Rx<LocalTrackState>
LocalTrackState of a local video stream.
latefinal
withVideo → bool?
Indicator whether this OngoingCall is intended to start with video.
no setter

Methods

addError(String message) → void
Adds the provided message to the notifications stream as ErrorNotification.
applyVoiceProcessing({bool? noiseSuppression, NoiseSuppressionLevel? noiseSuppressionLevel, bool? echoCancellation, bool? autoGainControl, bool? highPassFilter}) → Future<void>
Applies the provided voice processing settings to the LocalMediaTracks.
connect(CallService calls) → void
Starts the CallService.heartbeat subscription indicating that this OngoingCall is ready to connect to a media server.
decline(CallService calls) → Future<void>
Declines this OngoingCall.
dispose() → Future<void>
Disposes the call and Jason client if it was previously initialized.
enumerateDevices({bool media = true, bool screen = true}) → Future<void>
Populates devices with a list of DeviceDetails objects representing available media input devices, such as microphones, cameras, and so forth.
init({FutureOr<RxChat?> getChat(ChatId)?}) → Future<void>
Initializes the media client resources.
join(CallService calls, {bool withAudio = true, bool withVideo = true, bool withScreen = false}) → Future<void>
Joins this OngoingCall.
leave(CallService calls) → Future<void>
Leaves this OngoingCall.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notify(CallNotification notification) → void
Notifies this OngoingCall about the provided CallNotification.
setAudioDevice(DeviceDetails device) → Future<void>
Sets the provided device as a currently used audioDevice.
setAudioEnabled(bool enabled) → Future<void>
Enables/disables local audio stream based on enabled.
setOutputDevice(DeviceDetails device, {bool force = false}) → Future<void>
Sets the provided device as a currently used outputDevice.
setRemoteAudioEnabled(bool enabled) → Future<void>
Sets inbound audio in this OngoingCall as enabled or not.
setRemoteVideoEnabled(bool enabled) → Future<void>
Sets inbound video in this OngoingCall as enabled or not.
setScreenShareEnabled(bool enabled, {MediaDisplayDetails? device, bool withAudio = false}) → Future<void>
Enables/disables local screen-sharing stream based on enabled.
setVideoDevice(DeviceDetails device) → Future<void>
Sets the provided device as a currently used videoDevice.
setVideoEnabled(bool enabled) → Future<void>
Enables/disables local video stream based on enabled.
toggleAudio() → Future<void>
Toggles local audio stream on and off.
toggleHand(CallService service) → Future<void>
Raises/lowers a hand of the authorized MyUser.
toggleRemoteAudio() → Future<void>
Toggles inbound audio in this OngoingCall on and off.
toggleRemoteVideo() → Future<void>
Toggles inbound video in this OngoingCall on and off.
toggleVideo([bool? enabled]) → Future<void>
Toggles local video stream on and off.
toStored() → WebStoredCall

Available on OngoingCall, provided by the WebStoredOngoingCallConversion extension

Constructs a WebStoredCall containing all necessary information of this OngoingCall to be stored in the browser's storage.
toString() → String
A string representation of this object.
inherited

Operators

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