Outgoing Call
Component is a visual representation of a user-initiated call, whether it’s a voice or video call. It serves as an interface for managing outgoing calls, providing users with essential options to control the call experience. This component typically includes information about the call recipient, call controls for canceling the call, and feedback on the call status, such as indicating when the call is in progress.
CometChatOutgoingCall
being a custom view controller, offers versatility in its integration. It can be seamlessly launched via button clicks or any user-triggered action, enhancing the overall user experience and facilitating smoother interactions within the application.
pushViewController
function instead of presenting the view controller.setOnCancelClick
action is typically triggered when the call is ended, carrying out default actions. However, with the following code snippet, you can effortlessly customize or override this default behavior to meet your specific needs.
On Error
and improve error handling.
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.
Events emitted by the Outgoing call component is as follows.
Event | Description |
---|---|
onOutgoingCallAccepted | Triggers when the outgoing call is accepted. |
onOutgoingCallRejected | Triggers when the outgoing call is rejected. |
OutgoingCall
Component by applying the OutgoingCallStyle
to it using the following code snippet.
Global level styling
Property | Description | Code |
---|---|---|
backgroundColor | Sets the background color for the outgoing call view. | CometChatOutgoingCall.style.backgroundColor = UIColor() |
borderColor | Sets the border color for the outgoing call view. | CometChatOutgoingCall.style.borderColor = UIColor.clear |
borderWidth | Sets the border width for the outgoing call view. | CometChatOutgoingCall.style.borderWidth = 0 |
cornerRadius | Sets the corner radius for the outgoing call view. | CometChatOutgoingCall.style.cornerRadius = .init(cornerRadius: 0) |
nameTextColor | Sets the text color for the name label in the outgoing call view. | CometChatOutgoingCall.style.nameTextColor = UIColor() |
nameTextFont | Sets the font for the name label in the outgoing call view. | CometChatOutgoingCall.style.nameTextFont = UIFont() |
callTextColor | Sets the text color for the call label in the outgoing call view. | CometChatOutgoingCall.style.callTextColor = UIColor() |
callTextFont | Sets the font for the call label in the outgoing call view. | CometChatOutgoingCall.style.callTextFont = UIFont() |
declineButtonBackgroundColor | Sets the background color for the decline button in the outgoing call view. | CometChatOutgoingCall.style.declineButtonBackgroundColor = UIColor() |
declineButtonIconTint | Sets the tint color for the decline button icon. | CometChatOutgoingCall.style.declineButtonIconTint = UIColor() |
declineButtonIcon | Sets the icon for the decline button. | CometChatOutgoingCall.style.declineButtonIcon = UIImage(systemName: "phone.down.fill") |
declineButtonCornerRadius | Sets the corner radius for decline button. | CometChatOutgoingCall.style.declineButtonCornerRadius: CometChatCornerStyle? |
declineButtonBorderColor | Sets the border color for decline button. | CometChatOutgoingCall.style.declineButtonBorderColor: UIColor? |
declineButtonBorderWidth | Sets the border width for decline button. | CometChatOutgoingCall.style.declineButtonBorderWidth: CGFloat? |
Property | Description | Code |
---|---|---|
disableSoundForCalls | Disables sound for outgoing calls. | disableSoundForCalls = true |
setCustomSoundForCalls | Sets a custom sound for outgoing calls. | set(customSoundForCalls: URL) |
UIView
.
UIView
.
CustomTitleView
as a custom UIView
. Which we will inflate in setTitleView()
UIView
.