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.
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.
Property | Description | Code |
---|---|---|
set Background | Sets the background color | .set(background: UIColor) |
set CornerRadius | Sets the corner radius | .set(cornerRadius: CometChatCornerStyle) |
set BorderWidth | Sets the border width | .set(borderWidth: CGFloat) |
set BorderColor | Sets the border color | .set(borderColor: UIColor) |
set TitleColor | Sets the title color | .set(titleColor: UIColor) |
set TitleFont | Sets the title font | .set(titleFont: UIFont) |
set SubtitleColor | Sets the subtitle color | .set(subtitleColor: UIColor) |
set SubtitleFont | Sets the subtitle font | .set(subtitleFont: UIFont) |
Avatar
component in the OutgoingCall Component, you can use the following code snippet. For further insights on Avatar
Styles refer
Button
component in the OutgoingCall Component, you can use the following code snippet.
CometChatOutgoingCall
. If a navigation controller is already in use, utilize the pushViewController function instead of directly presenting the view controller.Property | Description | Code |
---|---|---|
Call | Sets the Call object for CometChatOutgoingCall. | .set(call: Call) |
SoundForCalls | Disables the default sound for calls. | .disable(soundForCalls: Bool) |
CustomSoundForCalls | Sets a custom sound for calls. | .set(customSoundForCalls: URL?) |
DeclineButtonIcon | Sets the icon for the decline button in the call screen. | .set(declineButtonIcon: UIImage) |
User | Sets the User object for CometChatOutgoingCall. | .set(user: User) |
OutgoingCall
component does not provide additional functionalities beyond this level of customization.