aboutsummaryrefslogtreecommitdiff
path: root/src/utils/camera.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/camera.ts')
-rw-r--r--src/utils/camera.ts15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/utils/camera.ts b/src/utils/camera.ts
index 9e37d62e..5c7f5ee0 100644
--- a/src/utils/camera.ts
+++ b/src/utils/camera.ts
@@ -118,6 +118,21 @@ export const showGIFFailureAlert = (onSuccess: () => void) =>
},
);
+export const trimVideo = (
+ sourceUri: string,
+ handleData: (data: any) => any,
+ ends: {
+ start: number;
+ end: number;
+ },
+) => {
+ ProcessingManager.trim(sourceUri, {
+ startTime: ends.start / 2, //needed divide by 2 for bug in module
+ endTime: ends.end,
+ quality: 'passthrough',
+ }).then((data: any) => handleData(data));
+};
+
export const cropVideo = (
sourceUri: string,
handleData: (data: any) => any,