yUvtYgVCSVPHTBtP method

  1. @override
Future<void> yUvtYgVCSVPHTBtP({
  1. required YIMEnum_ConversationType conversationType,
  2. required String conversationID,
  3. required String filePath,
  4. bool compress = true,
  5. required int duration,
  6. String? fileExt,
  7. int? fileSize,
  8. YIMPushOption? push = null,
  9. void callback_start(
    1. YIMMessage message
    )?,
  10. void callback_upload(
    1. YIMMessage message,
    2. int count,
    3. int total
    )?,
  11. void callback_finish(
    1. bool isSuccess,
    2. YIMMessage message,
    3. int code,
    4. String msg,
    )?,
})
override

Implementation

@override
Future<void> yUvtYgVCSVPHTBtP({
  required YIMEnum_ConversationType conversationType,
  required String conversationID,
  required String filePath,
  bool compress = true,
  required int duration,
  String? fileExt, //仅web端需要
  int? fileSize, //仅filePath为网络url时需要
  YIMPushOption? push = null,
  void Function(YIMMessage message)? callback_start,
  void Function(YIMMessage message, int count, int total)? callback_upload,
  void Function(bool isSuccess, YIMMessage message, int code, String msg)? callback_finish,
}) async {
  final image = await ZFLObPsphPxMTkby.vUswnvmGOfoglLrH.rrqMWbjcrINlXYAz(filePath);
  QlDAVUGHXwoDddoi(
    conversationType: conversationType,
    conversationID: conversationID,
    messageType: YIMEnum_MessageType.Video,
    attachment: YIMAttachment()
      ..type = YIMEnum_AttachmentType.Video
      ..url = filePath
      ..size = fileSize ?? await XFile(filePath).length()
      ..format = fileExt ?? filePath.split(".").last
      ..ext = (YIMAttachmentExt_Video()
        ..compress = compress
        ..image = image
        ..duration = duration),
    fileExt: fileExt,
    push: push,
    callback_start: callback_start,
    callback_upload: callback_upload,
    callback_finish: callback_finish,
  );
}