sendVideoMessage method

  1. @override
Future<String> sendVideoMessage(
  1. String jid,
  2. String filePath,
  3. String? caption,
  4. String? replyMessageID, {
  5. String? videoFileUrl,
  6. num? videoDuration,
  7. String? thumbImageBase64,
  8. String? topicId,
})
override

This method is used to send the video message.

Implementation

@override
Future<String> sendVideoMessage(
    String jid, String filePath, String? caption, String? replyMessageID,
    {String? videoFileUrl,
    num? videoDuration,
    String? thumbImageBase64,
    String? topicId}) async {
  String? messageResp;
  try {
    messageResp =
        await mirrorFlyMethodChannel.invokeMethod('send_video_message', {
      "jid": jid,
      "filePath": filePath,
      "caption": caption?.trim(),
      "replyMessageId": replyMessageID,
      "videoFileUrl": videoFileUrl,
      "videoDuration": videoDuration,
      "thumbImageBase64": thumbImageBase64,
      "topicId": topicId
    });
    return convertChatMessageJsonFromString(messageResp);
  } on PlatformException catch (e) {
    LogMessage.d("Video Message Exception =", " $e");
    rethrow;
  } on Exception catch (error) {
    LogMessage.d("Video Message Exception ", " $error");
    rethrow;
  }
}