CometChatMediaRecorder is a class that allows users to record and send audio messages. It has a start button to start recording, a stop button to stop recording, a play button to play the recorded message, a pause button to pause the recorded message, a submit button to submit the recorded message and a close button to close the media recorder.
Usage
CometChatMediaRecorder can be used as a child view inside another view or be launched with a bottom sheet.- Swift
Properties
| Property | Type | Description |
|---|---|---|
| mediaRecorderStyle | MediaRecorderStyle | used to customize the appearance of CometChatMediaRecorder |
| startIcon | UIImage | used to set the start icon |
| playIcon | UIImage | used to set the play icon |
| pauseIcon | UIImage | used to set the pause icon |
| closeIcon | UIImage | used to set the close icon |
| stopIcon | UIImage | used to set the stop icon |
| submitIcon | UIImage | used to set the submit icon |
| pauseIconTint | UIColor | used to set the color of pause icon |
| playIconTint | UIColor | used to set the color of play icon |
| deleteIconTint | UIColor | used to set the color of delete icon |
| submitIconTint | UIColor | used to set the color of submit icon |
| startIconTint | UIColor | used to set the color of start icon |
| stopIconTint | UIColor | used to set the color of stop icon |
| timerTextFont | UIFont | used to set the font of timer text |
| timerTextColor | UIColor | used to set the color of timer text |
| onSubmit | (String) -> Void | onSubmit is used to set the action to be performed when submit icon is tapped |
| onClose | () -> () | onClose is used to set the action to be performed when close icon is tapped |
mediaRecorderStyle
A MediaRecorderStyle object is used to customize the appearance of CometChatMediaRecorder.- Swift