Incoming call
is a Component that serves as a visual representation when the user receives an incoming call, such as a voice call or video call, providing options to answer or decline the call.
Incoming Call
is comprised of the following base components:
Components | Description |
---|---|
cometchat-list-item | This component’s view consists of avatar, status indicator , title, and subtitle. The fields are then mapped with the SDK’s user, group class. |
cometchat-button | This component represents a button with optional icon and text. |
cometchat-avatar | This component component displays an image or user’s avatar with fallback to the first two letters of the username. |
onAccept
is triggered when you click the accept button of the Incoming Call
component. You can override this action using the following code snippet.
onDecline
is triggered when you click the Decline button of the Incoming Call
component. You can override this action using the following code snippet.
CallSettingsBuilder
in the Incoming Call 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 Incoming Call component is as follows.
Event | Description |
---|---|
ccCallRejected | This event is triggered when the initiated call is rejected by the receiver. |
ccCallAccepted | This event is triggered when the initiated call is accepted by the receiver. |
ccCallEnded | This event is triggered when the initiated call successfully ends. |
Incoming Call
component.
Property | Description | Code |
---|---|---|
Call | The CometChat call object used to initialize and display the incoming call component. | call={callObject} |
Disable sound | Disables the sound for incoming calls. | disableSoundForCalls={true} |
Custom sound | Specifies a custom sound to play for incoming calls. | customSoundForCalls='Your Custom Sound For Calls' |
subtitleView
is a function that renders a JSX element to display the subtitle view.
leadingView
is a function that renders a JSX element to display the leading view.
The customized call interface is displayed below.
titleView
is a function that renders a JSX element to display the title view.
The customized call interface is displayed below.
trailingView
is a function that renders a JSX element to display the trailing view.
The customized call interface is displayed below.
itemView
is a function that renders a JSX element to display the item view.
The customized call interface is displayed below.