Skip to main content
Version: v4

Call Buttons

This component provides users with the ability to make calls, access call-related functionalities, and control call settings. Clicking this button typically triggers the call to be placed to the desired recipient.

Properties

Chat Information

Details associated with the call participants.

NameTypeDescription
userUser ClassView details of this particular CometChat user
groupGroup ClassView details of this particular CometChat group

Asset URLs

Custom asset URL used for graphical representation.

NameTypeDescription
voiceCallIconURLstringAsset URL for the icon displayed on the button initiating voice call
videoCallIconURLstringAsset URL for the icon displayed on the button initiating video call

Function Callback

Functions that can be invoked by the user in response to a specific event or condition.

NameTypeDescription
onVoiceCallClickFunction as PropType<(user: CometChat.User, group: CometChat.Group) => void>Override the method that is invoked when the user clicks on the button that initiates voice call.
onVideoCallClickFunction as PropType<(user: CometChat.User, group: CometChat.Group) => void>Override the method that is invoked when the user clicks on the button that initiates video call.
onErrorFunction as PropType<(error: CometChat.CometChatException) => void>Override the method that is invoked when an error is encountered within the details component

Custom text

Customise the text or label displayed on the button

NameTypeDescription
voiceCallIconTextstringText or label displayed on the voice call button.
voiceCallIconHoverTextstringText or label displayed on the voice call button on mouse over.
videoCallIconTextstringText or label displayed on the video call button.
videoCallIconHoverTextstringText or label displayed on the video call button on mouse over.

Style

Styling properties and values of all the involved components

NameTypeDescription
callButtonsStyleCallButtonsStyleStyling properties of this component

Usage

onError: (error: CometChat.CometChatException) => void = (error:CometChat.CometChatException) => {
//perform action
}
onVoiceCallClick!: (user: CometChat.User, group: CometChat.Group) => void = (user: CometChat.User, group: CometChat.Group)=> {
//perform action
}
onVideoCallClick!: (user: CometChat.User, group: CometChat.Group) => void= (user: CometChat.User, group: CometChat.Group)=> {
//perform action
}

<CometChatCallButtons :onError="onError" :onVideoCallClick="onVideoCallClick" :onVoiceCallClick="onVoiceCallClick"> </CometChatCallButtons>