recordVideo static method

Future<void> recordVideo(
  1. String path, {
  2. CupertinoVideoOptions? cupertinoVideoOptions,
})

Implementation

static Future<void> recordVideo(
  String path, {
  CupertinoVideoOptions? cupertinoVideoOptions,
}) {
  if (Platform.isAndroid) {
    // TODO: add video options for Android
    return CameraInterface().recordVideo(path, null);
  } else {
    return CameraInterface().recordVideo(
      path,
      cupertinoVideoOptions != null
          ? VideoOptions(
              fileType: cupertinoVideoOptions.fileType.name,
              codec: cupertinoVideoOptions.codec.name,
            )
          : null,
    );
  }
}