Call Button
is a 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.
CallSettingsBuilder
in the Call Buttons Component to customise the calling experience. To know more about the filters available please refer to CallSettingsBuilder.
Component
. By using event you can extend existing functionality. Being global events, they can be applied in Multiple Locations and are capable of being Added or Removed.
The list of events emitted by the Call Buttons
component is as follows.
Event | Description |
---|---|
ccCallRejected | This event is triggered when the initiated call is rejected by the receiver. |
ccCallEnded | This event is triggered when the initiated call successfully ends. |
ccOutgoingCall | This event is triggered when the user initiates a voice/video call. |
ccMessageSent | This event is triggered when the sent message is in transit and also when it is received by the receiver. |
CallButtons
component renders CometChatOutgoingCall component.
CometChatOutgoingCall
component by making use of the OutgoingCallConfiguration
. Below properties are available in OutgoingCallConfiguration
.
Property | Description | Code |
---|---|---|
User | Sets the user object for Call Buttons | user={chatUser} |
Group | Used to set the group object for Call Buttons | group={chatGroup} |
Custom Sound | Specifies a custom sound to play for outgoing calls. | customSoundForCalls='Your Custom Sound For Calls' |
Disable Sound | Disables the sound of outgoing calls. | disableSoundForCalls={false} |
On Error | Callback function triggered when an error occurs in the call buttons component. | onError={(error: CometChat.CometChatException)=>{ console.log('error', error) }} |
Cancel Call Clicked | Callback function triggered when the cancel button is clicked. | onCloseClicked={()=>{console.log("Outgoing call canceled")}} |
Title View | This prop renders the custom title view for the outgoing call. | titleView={<>Custom Title View</>} |
Sub Title View | This prop renders the custom sub title view for the outgoing call. | subtitleView={<>Custom Sub Title View</>} |
Avatar View | This prop renders the custom avatar view for the outgoing call. | avatarView={<>Custom Avatar View</>} |
Cancel Button View | This prop renders the custom cancel-call button view for the outgoing call. | cancelButtonView={<>Custom Cancel Button View</>} |
Hide Video Call Button | Used to hide the video call button. | hideVideoCallButton={true} |
Hide Voice Call Button | Used to hide the voice call button. | hideVoiceCallButton={true} |