createVideoMessage method

  1. @override
Future<V2TimMsgCreateInfoResult?> createVideoMessage({
  1. String? videoPath,
  2. String? type,
  3. int? duration,
  4. String? snapshotPath,
  5. dynamic inputElement,
})
override

Implementation

@override
Future<V2TimMsgCreateInfoResult?> createVideoMessage(
    {String? videoPath,
    String? type,
    int? duration,
    String? snapshotPath,
    dynamic inputElement}) async {
  final res = await TencentImSDKPlugin.v2TIMManager
      .getMessageManager()
      .createVideoMessage(
          videoFilePath: videoPath ?? "",
          type: type ?? "",
          duration: duration ?? 1,
          snapshotPath: snapshotPath ?? "",
          inputElement: inputElement);
  if (res.code == 0) {
    return res.data;
  }
  _coreService.callOnCallback(TIMCallback(
      type: TIMCallbackType.API_ERROR,
      errorMsg: res.desc,
      errorCode: res.code));
  return null;
}