@umituz/react-native-video-editor 1.0.20 → 1.0.22
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.22",
|
|
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'",
|
|
@@ -11,16 +11,24 @@ declare const __DEV__: boolean;
|
|
|
11
11
|
* Safely play video with error handling
|
|
12
12
|
*/
|
|
13
13
|
export const safePlay = (player: VideoPlayer | null): boolean => {
|
|
14
|
-
|
|
14
|
+
if (__DEV__) {
|
|
15
|
+
console.log("[safePlay] called, player:", !!player);
|
|
16
|
+
}
|
|
15
17
|
if (!player) return false;
|
|
16
18
|
|
|
17
19
|
try {
|
|
18
|
-
|
|
20
|
+
if (__DEV__) {
|
|
21
|
+
console.log("[safePlay] calling player.play()");
|
|
22
|
+
}
|
|
19
23
|
player.play();
|
|
20
|
-
|
|
24
|
+
if (__DEV__) {
|
|
25
|
+
console.log("[safePlay] player.play() called successfully");
|
|
26
|
+
}
|
|
21
27
|
return true;
|
|
22
28
|
} catch (error) {
|
|
23
|
-
|
|
29
|
+
if (__DEV__) {
|
|
30
|
+
console.log("[safePlay] Play error:", error);
|
|
31
|
+
}
|
|
24
32
|
return false;
|
|
25
33
|
}
|
|
26
34
|
};
|
|
@@ -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],
|