/// <summary> /// Take the video file using the device camera /// </summary> /// <param name="onSuccess">Video file was successfully picked by the user. Result is received in a callback.</param> /// <param name="onError">Picking video file failed.</param> public static void RecordVideo(Action <VideoPickResult> onSuccess, Action <string> onError, bool generatePreviewImages = true) { if (AGUtils.IsNotAndroidCheck()) { return; } Check.Argument.IsNotNull(onSuccess, "onSuccess"); Check.Argument.IsNotNull(onError, "onError"); _onVideoSuccessAction = onSuccess; _onVideoCancelAction = onError; AGActivityUtils.PickVideoCamera(generatePreviewImages); }
public static void RecordVideo(Action <VideoPickResult> onSuccess, Action <string> onError, bool generatePreviewImages = true) { if (AGUtils.IsNotAndroid()) { return; } Check.Argument.IsNotNull(onSuccess, "onSuccess"); Check.Argument.IsNotNull(onError, "onError"); if (!AGPermissions.IsPermissionGranted(AGPermissions.CAMERA)) { onError(AGUtils.GetPermissionErrorMessage(AGPermissions.CAMERA)); return; } _onVideoSuccessAction = onSuccess; _onVideoCancelAction = onError; AGActivityUtils.PickVideoCamera(generatePreviewImages); }