sendVideoMessage method

  1. @override
Future sendVideoMessage(
  1. String jid,
  2. String filePath,
  3. String? caption,
  4. String? replyMessageID, [
  5. String? videoFileUrl,
  6. num? videoDuration,
  7. String? thumbImageBase64,
])
override

Implementation

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