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.ts16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/utils/camera.ts b/src/utils/camera.ts
index 9d7ff67f..c3822858 100644
--- a/src/utils/camera.ts
+++ b/src/utils/camera.ts
@@ -130,6 +130,7 @@ export const cropVideo = (
cropOffsetX?: number;
cropOffsetY?: number;
},
+ muted?: boolean,
) => {
ProcessingManager.crop(sourceUri, {
cropWidth: videoCropValues
@@ -154,6 +155,19 @@ export const cropVideo = (
: 0,
quality: 'highest',
}).then((data: any) => {
- handleData(data);
+ if (muted) {
+ removeAudio(data, handleData);
+ } else {
+ handleData(data);
+ }
});
};
+
+export const removeAudio = (
+ sourceUri: string,
+ handleData: (data: any) => any,
+) => {
+ ProcessingManager.compress(sourceUri, {removeAudio: true}).then((data: any) =>
+ handleData(data),
+ );
+};