@umituz/react-native-video-editor 1.0.6 → 1.0.8

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-video-editor",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
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",
@@ -29,6 +29,7 @@
29
29
  "react": ">=18.2.0",
30
30
  "react-native": ">=0.74.0",
31
31
  "@umituz/react-native-design-system": ">=1.0.0",
32
+ "expo-document-picker": ">=14.0.0",
32
33
  "expo-image": ">=1.0.0",
33
34
  "expo-video": ">=3.0.0",
34
35
  "zustand": ">=4.0.0"
@@ -36,6 +37,7 @@
36
37
  "devDependencies": {
37
38
  "@types/react": "~19.1.10",
38
39
  "@umituz/react-native-design-system": "latest",
40
+ "expo-document-picker": "^14.0.8",
39
41
  "expo-image": "^3.0.11",
40
42
  "expo-video": "^3.0.15",
41
43
  "react": "19.1.0",
@@ -41,9 +41,9 @@ export const VideoPlayer: React.FC<VideoPlayerProps> = ({
41
41
  });
42
42
 
43
43
  const handlePlay = useCallback(() => {
44
+ console.log("[VideoPlayer] handlePlay called, source:", source);
44
45
  setShowVideo(true);
45
- // Player will auto-configure with autoPlay from hook
46
- }, []);
46
+ }, [source]);
47
47
 
48
48
  const containerStyle = useMemo(() => ({
49
49
  width: "100%" as const,
@@ -93,8 +93,17 @@ export const VideoPlayer: React.FC<VideoPlayerProps> = ({
93
93
  [tokens]
94
94
  );
95
95
 
96
+ // Debug: Log player state
97
+ console.log("[VideoPlayer] state:", {
98
+ showVideo,
99
+ isPlayerValid: state.isPlayerValid,
100
+ hasPlayer: !!player,
101
+ source,
102
+ });
103
+
96
104
  // Show video player when playing
97
105
  if (showVideo && state.isPlayerValid && player) {
106
+ console.log("[VideoPlayer] Rendering VideoView");
98
107
  return (
99
108
  <View style={[containerStyle, style]}>
100
109
  <VideoView
@@ -4,15 +4,18 @@
4
4
  */
5
5
 
6
6
  import React, { useCallback } from "react";
7
- import { View, ScrollView, StyleSheet } from "react-native";
7
+ import { View, ScrollView, StyleSheet, Alert } from "react-native";
8
8
  import { useLocalization } from "@umituz/react-native-localization";
9
9
  import type { ExportSettings, VideoProject } from "../../domain/entities";
10
10
  import { useExportForm } from "../hooks/useExportForm";
11
- import { useExport } from "../hooks/useExport";
11
+ import { useExport, type UseExportConfig, type ExportResult } from "../hooks/useExport";
12
12
  import {
13
13
  RESOLUTIONS,
14
14
  QUALITIES,
15
15
  FORMATS,
16
+ type Resolution,
17
+ type Quality,
18
+ type Format,
16
19
  } from "../../infrastructure/constants/export.constants";
17
20
  import {
18
21
  ProjectInfoBox,
@@ -24,15 +27,22 @@ import {
24
27
  } from "./export";
25
28
 
26
29
  interface ExportDialogProps {
27
- project: VideoProject;
28
- onExport: (settings: ExportSettings, uri?: string) => void;
29
- onCancel: () => void;
30
+ readonly project: VideoProject;
31
+ readonly onExport: (settings: ExportSettings, uri?: string) => void;
32
+ readonly onCancel: () => void;
33
+ readonly exportConfig?: UseExportConfig;
30
34
  }
31
35
 
36
+ const defaultExportFunction = async (): Promise<ExportResult> => {
37
+ Alert.alert("Not Configured", "Export function not provided.");
38
+ return { success: false, error: "Export function not configured" };
39
+ };
40
+
32
41
  export const ExportDialog: React.FC<ExportDialogProps> = ({
33
42
  project,
34
43
  onExport,
35
44
  onCancel,
45
+ exportConfig,
36
46
  }) => {
37
47
  const { t } = useLocalization();
38
48
  const {
@@ -46,7 +56,11 @@ export const ExportDialog: React.FC<ExportDialogProps> = ({
46
56
  projectDuration,
47
57
  } = useExportForm(project);
48
58
 
49
- const { isExporting, exportProgress, exportVideo, resetExport } = useExport();
59
+ const config: UseExportConfig = exportConfig ?? {
60
+ exportFunction: defaultExportFunction,
61
+ };
62
+
63
+ const { isExporting, exportProgress, exportVideo, resetExport } = useExport(config);
50
64
 
51
65
  const handleExport = useCallback(async () => {
52
66
  const settings = buildExportSettings();
@@ -11,7 +11,7 @@ import {
11
11
  useAppDesignTokens,
12
12
  } from "@umituz/react-native-design-system";
13
13
  import { ANIMATION_TYPES } from "../../../infrastructure/constants/animation-layer.constants";
14
- import type { AnimationType } from "../../domain/entities";
14
+ import type { AnimationType } from "../../../domain/entities";
15
15
 
16
16
  interface AnimationTypeSelectorProps {
17
17
  selectedType: AnimationType;
@@ -9,7 +9,7 @@ import {
9
9
  AtomicIcon,
10
10
  useAppDesignTokens,
11
11
  } from "@umituz/react-native-design-system";
12
- import type { Layer, TextLayer, ImageLayer, ShapeLayer } from "../../domain/entities";
12
+ import type { Layer, TextLayer, ImageLayer, ShapeLayer } from "../../../domain/entities";
13
13
 
14
14
  interface LayerContentProps {
15
15
  layer: Layer;
@@ -10,7 +10,7 @@ import {
10
10
  AtomicIcon,
11
11
  useAppDesignTokens,
12
12
  } from "@umituz/react-native-design-system";
13
- import type { VideoProject } from "../../domain/entities";
13
+ import type { VideoProject } from "../../../domain/entities";
14
14
 
15
15
  interface ProjectInfoBoxProps {
16
16
  project: VideoProject;