@umituz/react-native-video-editor 1.0.11 → 1.0.13

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.11",
3
+ "version": "1.0.13",
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",
@@ -4,18 +4,13 @@
4
4
  */
5
5
 
6
6
  import React, { useState, useCallback, useMemo, useEffect } from "react";
7
- import {
8
- View,
9
- TouchableOpacity,
10
- StyleSheet,
11
- type ViewStyle,
12
- } from "react-native";
7
+ import { View, TouchableOpacity, StyleSheet, type ViewStyle } from "react-native";
13
8
  import { Image } from "expo-image";
14
9
  import { VideoView } from "expo-video";
15
10
  import {
11
+ useResponsive,
16
12
  useAppDesignTokens,
17
13
  AtomicIcon,
18
- useResponsive,
19
14
  } from "@umituz/react-native-design-system";
20
15
 
21
16
  import type { VideoPlayerProps } from "../../types";
@@ -43,8 +38,10 @@ export const VideoPlayer: React.FC<VideoPlayerProps> = ({
43
38
  contentFit = "cover",
44
39
  style,
45
40
  }) => {
46
- const tokens = useAppDesignTokens();
41
+ // IMPORTANT: Call useResponsive BEFORE useAppDesignTokens to maintain consistent hook order
42
+ // useAppDesignTokens internally calls useResponsive, so order matters
47
43
  const { width: screenWidth, horizontalPadding } = useResponsive();
44
+ const tokens = useAppDesignTokens();
48
45
  const [showVideo, setShowVideo] = useState(autoPlay);
49
46
 
50
47
  const { player, state, controls } = useVideoPlayerControl({
@@ -131,12 +128,20 @@ export const VideoPlayer: React.FC<VideoPlayerProps> = ({
131
128
  hasPlayer: !!player,
132
129
  source,
133
130
  });
131
+ // eslint-disable-next-line no-console
132
+ console.log("[VideoPlayer] dimensions:", {
133
+ screenWidth,
134
+ horizontalPadding,
135
+ videoWidth,
136
+ videoHeight,
137
+ styleWidth: getWidthFromStyle(style as ViewStyle),
138
+ });
134
139
  }
135
140
 
136
141
  if (showVideo && state.isPlayerValid && player) {
137
142
  if (typeof __DEV__ !== "undefined" && __DEV__) {
138
143
  // eslint-disable-next-line no-console
139
- console.log("[VideoPlayer] Rendering VideoView");
144
+ console.log("[VideoPlayer] Rendering VideoView with dimensions:", { videoWidth, videoHeight });
140
145
  }
141
146
  return (
142
147
  <View style={[containerStyle, style]}>
@@ -39,6 +39,15 @@ export const useVideoPlayerControl = (
39
39
  if (autoPlay) {
40
40
  setIsPlaying(true);
41
41
  }
42
+ // Log player status for debugging
43
+ console.log("[useVideoPlayerControl] Player status:", {
44
+ currentTime: p.currentTime,
45
+ duration: p.duration,
46
+ status: p.status,
47
+ playing: p.playing,
48
+ muted: p.muted,
49
+ volume: p.volume,
50
+ });
42
51
  }
43
52
  });
44
53