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
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
hasAudio bool
Indicates whether this OngoingCall has an active microphone 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
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
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
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.
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
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) 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}) 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