In this guide, we will demonstrate how to add a custom option to the action sheet of the MessageComposer component. This guide is meant to showcase how custom features can be built on top of the existing codebase, enabling developers to tailor the user experience to their specific requirements.
We recommend that you read the Key Concepts , follow the guidelines, and also take the time to familiarise yourself with the library’s components.
In the example below, we are going to simulate a video recorder when user clicks on the custom option.
The first step is to create the custom option that will be populated on the action sheet of the message composer. CometChatMessageComposerAction is part of the resources package and is of the following structure.
The video record option is then pushed to the default set of attachment options supported by the Angular UI Kit. The default options are fetched using the CometChatUIKit class.