sendMediaRecording method
Implementation
void sendMediaRecording(BuildContext context, String path) {
if (onSendButtonTap != null) {
MediaMessage mediaMessage = MediaMessage(
receiverType: receiverType,
type: MessageTypeConstants.audio,
receiverUid: receiverID,
file: path,
sender: loggedInUser,
parentMessageId: parentMessageId,
muid: DateTime.now().microsecondsSinceEpoch.toString(),
category: CometChatMessageCategory.message,
);
onSendButtonTap!(context, mediaMessage, previewMessageMode);
} else {
sendMediaMessage(path: path, messageType: MessageTypeConstants.audio);
}
}