@umituz/react-native-video-editor 1.0.21 → 1.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-video-editor",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.23",
|
|
4
4
|
"description": "Professional video editor with layer-based timeline, text/image/shape/audio/animation layers, and export functionality",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./src/index.ts",
|
|
9
|
+
"./player": "./src/player/index.ts"
|
|
10
|
+
},
|
|
7
11
|
"scripts": {
|
|
8
12
|
"typecheck": "npx tsc --noEmit",
|
|
9
13
|
"lint": "echo 'Lint passed'",
|
|
@@ -26,7 +30,8 @@
|
|
|
26
30
|
"url": "https://github.com/umituz/react-native-video-editor"
|
|
27
31
|
},
|
|
28
32
|
"dependencies": {
|
|
29
|
-
"@umituz/react-native-filesystem": "latest"
|
|
33
|
+
"@umituz/react-native-filesystem": "latest",
|
|
34
|
+
"expo-document-picker": ">=14.0.0"
|
|
30
35
|
},
|
|
31
36
|
"peerDependencies": {
|
|
32
37
|
"@umituz/react-native-design-system": ">=1.0.0",
|
|
@@ -5,7 +5,13 @@
|
|
|
5
5
|
|
|
6
6
|
import React, { useCallback } from "react";
|
|
7
7
|
import { View, ScrollView, StyleSheet, Alert } from "react-native";
|
|
8
|
-
|
|
8
|
+
// Safe import for expo-document-picker
|
|
9
|
+
let DocumentPicker: any;
|
|
10
|
+
try {
|
|
11
|
+
DocumentPicker = require("expo-document-picker");
|
|
12
|
+
} catch (e) {
|
|
13
|
+
// Graceful fail - DocumentPicker will be undefined
|
|
14
|
+
}
|
|
9
15
|
import {
|
|
10
16
|
AtomicText,
|
|
11
17
|
useAppDesignTokens,
|
|
@@ -46,6 +52,10 @@ export const AudioEditor: React.FC<AudioEditorProps> = ({
|
|
|
46
52
|
} = useAudioLayerForm(audio);
|
|
47
53
|
|
|
48
54
|
const handlePickAudio = useCallback(async () => {
|
|
55
|
+
if (!DocumentPicker) {
|
|
56
|
+
Alert.alert("Error", "Audio picker is not available in this environment");
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
49
59
|
try {
|
|
50
60
|
const result = await DocumentPicker.getDocumentAsync({
|
|
51
61
|
type: AUDIO_FILE_TYPES[0],
|
|
@@ -61,16 +61,19 @@ export const DraggableLayer: React.FC<DraggableLayerProps> = ({
|
|
|
61
61
|
onSizeChange,
|
|
62
62
|
});
|
|
63
63
|
|
|
64
|
-
const animatedStyle = useAnimatedStyle(() =>
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
64
|
+
const animatedStyle = useAnimatedStyle(() => {
|
|
65
|
+
const rotationStr = `${layer.rotation}deg`;
|
|
66
|
+
return {
|
|
67
|
+
transform: [
|
|
68
|
+
{ translateX: translateX.value },
|
|
69
|
+
{ translateY: translateY.value },
|
|
70
|
+
{ rotate: rotationStr },
|
|
71
|
+
],
|
|
72
|
+
opacity: layer.opacity,
|
|
73
|
+
width: width.value,
|
|
74
|
+
height: height.value,
|
|
75
|
+
};
|
|
76
|
+
});
|
|
74
77
|
|
|
75
78
|
return (
|
|
76
79
|
<GestureDetector gesture={composedGesture}>
|