Skip to main content
This page documents the classes used in the CometChat Calls SDK. These objects are returned by call log queries and call session methods. All properties on proper classes are accessed via getter methods. Listener event objects are plain objects accessed via dot notation.

CallLog

CallLog represents a call history entry. It is returned by CallLogRequestBuilder.fetchNext() and CallLogRequestBuilder.fetchPrevious().

Properties

PropertyGetterReturn TypeDescription
sessionIdgetSessionID()stringUnique session ID of the call
totalAudioMinutesgetTotalAudioMinutes()numberTotal audio minutes in the call
totalVideoMinutesgetTotalVideoMinutes()numberTotal video minutes in the call
totalDurationgetTotalDuration()stringTotal duration of the call as a formatted string
totalDurationInMinutesgetTotalDurationInMinutes()numberTotal duration in minutes
hasRecordinggetHasRecording()booleanWhether the call has a recording
initiatedAtgetInitiatedAt()numberTimestamp when the call was initiated
endedAtgetEndedAt()numberTimestamp when the call ended
callCategorygetCallCategory()stringCategory of the call ("call" or "meet")
typegetType()stringType of the call ("audio" or "video")
statusgetStatus()stringStatus of the call ("ongoing", "ended", "cancelled", etc.)
receiverTypegetReceiverType()stringReceiver type ("user" or "group")
totalParticipantsgetTotalParticipants()numberTotal number of participants
midgetMid()stringMessage ID associated with the call
initiatorgetInitiator()CallUserThe user who initiated the call
receivergetReceiver()CallUser | CallGroupThe user or group that received the call
participantsgetParticipants()Participant[]Array of call participants
recordingsgetRecordings()Recording[]Array of call recordings

CallUser

CallUser represents a user within the Calls SDK context (used in CallLog as initiator/receiver).

Properties

PropertyGetterReturn TypeDescription
uidgetUid()stringUnique user ID
namegetName()stringDisplay name of the user
avatargetAvatar()stringURL of the user’s avatar

CallGroup

CallGroup represents a group within the Calls SDK context (used in CallLog as receiver for group calls).

Properties

PropertyGetterReturn TypeDescription
guidgetGuid()stringUnique group ID
namegetName()stringDisplay name of the group
icongetIcon()stringURL of the group icon

Participant

Participant represents a user who participated in a call. It is available via getParticipants() on a CallLog object.

Properties

PropertyGetterReturn TypeDescription
uidgetUid()stringUnique user ID
namegetName()stringDisplay name of the participant
avatargetAvatar()stringURL of the participant’s avatar
totalAudioMinutesgetTotalAudioMinutes()numberAudio minutes for this participant
totalVideoMinutesgetTotalVideoMinutes()numberVideo minutes for this participant
totalDurationInMinutesgetTotalDurationInMinutes()numberTotal duration in minutes for this participant
deviceIDgetDeviceID()stringDevice ID of the participant
hasJoinedgetHasJoined()booleanWhether the participant joined the call
joinedAtgetJoinedAt()numberTimestamp when the participant joined
leftAtgetLeftAt()numberTimestamp when the participant left
midgetMid()stringMedia ID of the participant
stategetState()stringState of the participant

Recording

Recording represents a call recording. It is available via getRecordings() on a CallLog object.

Properties

PropertyGetterReturn TypeDescription
ridgetRid()stringUnique recording ID
recordingUrlgetRecordingURL()stringURL to download the recording
startTimegetStartTime()numberTimestamp when the recording started
endTimegetEndTime()numberTimestamp when the recording ended
durationgetDuration()numberDuration of the recording in seconds

OngoingCallListener

For the full OngoingCallListener documentation including all callbacks and parameter shapes, see the All Real-Time Listeners page.

CometChatCallsException

CometChatCallsException represents an error from the Calls SDK. It is received in the onError callback of OngoingCallListener and in rejection callbacks of Calls SDK promise-based methods.

Properties

PropertyTypeDescription
codestring | numberError code identifying the type of error
namestringName/category of the error
messagestringHuman-readable error description
detailsstringAdditional error details

MediaDeviceInfo

MediaDeviceInfo represents an audio or video device available on the user’s system. It is returned by getAudioInputDevices(), getAudioOutputDevices(), and getVideoInputDevices() methods, and also received in the onMediaDeviceListUpdated callback. These objects follow the browser’s MediaDeviceInfo interface shape.

Properties

PropertyTypeDescription
deviceIdstringUnique device identifier
kindstringDevice type ("videoinput", "audioinput", or "audiooutput")
labelstringHuman-readable device name
groupIdstringGroup identifier for related devices (e.g., a headset’s mic and speaker share a group)