@umituz/react-native-ai-generation-content 1.17.213 → 1.17.215
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
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* Video player with thumbnail and play controls for creation detail view
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import React, { useMemo } from "react";
|
|
7
|
-
import { View } from "react-native";
|
|
6
|
+
import React, { useMemo, useState } from "react";
|
|
7
|
+
import { View, StyleSheet } from "react-native";
|
|
8
|
+
import { VideoView, useVideoPlayer } from "expo-video";
|
|
8
9
|
import { useResponsive } from "@umituz/react-native-design-system";
|
|
9
|
-
import { VideoPlayer } from "@umituz/react-native-video-editor";
|
|
10
10
|
|
|
11
11
|
interface DetailVideoProps {
|
|
12
12
|
readonly videoUrl: string;
|
|
@@ -20,20 +20,28 @@ export const DetailVideo: React.FC<DetailVideoProps> = ({
|
|
|
20
20
|
const { width, horizontalPadding, spacingMultiplier } = useResponsive();
|
|
21
21
|
const videoWidth = width - (horizontalPadding * 2);
|
|
22
22
|
|
|
23
|
+
const player = useVideoPlayer(videoUrl, (player) => {
|
|
24
|
+
player.loop = true;
|
|
25
|
+
});
|
|
26
|
+
|
|
23
27
|
const containerStyle = useMemo(() => ({
|
|
24
28
|
paddingHorizontal: horizontalPadding,
|
|
25
29
|
marginVertical: 16 * spacingMultiplier,
|
|
26
30
|
}), [horizontalPadding, spacingMultiplier]);
|
|
27
31
|
|
|
32
|
+
const videoStyle = useMemo(() => ({
|
|
33
|
+
width: videoWidth,
|
|
34
|
+
height: (videoWidth * 9) / 16, // 16:9 aspect ratio
|
|
35
|
+
}), [videoWidth]);
|
|
36
|
+
|
|
28
37
|
return (
|
|
29
38
|
<View style={containerStyle}>
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
39
|
+
<VideoView
|
|
40
|
+
style={videoStyle}
|
|
41
|
+
player={player}
|
|
42
|
+
allowsFullscreen
|
|
43
|
+
allowsPictureInPicture
|
|
34
44
|
nativeControls
|
|
35
|
-
contentFit="cover"
|
|
36
|
-
style={{ width: videoWidth }}
|
|
37
45
|
/>
|
|
38
46
|
</View>
|
|
39
47
|
);
|
|
@@ -92,21 +92,15 @@ export const MemeGeneratorFeature: React.FC<MemeGeneratorFeatureProps> = ({
|
|
|
92
92
|
if (state.imageUrl) {
|
|
93
93
|
return (
|
|
94
94
|
<GenerationResultContent
|
|
95
|
-
|
|
95
|
+
result={{ imageUrl: state.imageUrl }}
|
|
96
96
|
onSave={handleSave}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
label: translations.saveButtonText || "Save to Gallery",
|
|
105
|
-
},
|
|
106
|
-
tryAgain: {
|
|
107
|
-
label: translations.tryAnotherText || "Create Another",
|
|
108
|
-
},
|
|
109
|
-
},
|
|
97
|
+
onRetry={reset}
|
|
98
|
+
translations={{
|
|
99
|
+
share: "Share",
|
|
100
|
+
sharing: "Sharing...",
|
|
101
|
+
save: translations.saveButtonText || "Save to Gallery",
|
|
102
|
+
retry: translations.tryAnotherText || "Create Another",
|
|
103
|
+
aiGenerated: translations.successText || "Your meme is ready!",
|
|
110
104
|
}}
|
|
111
105
|
/>
|
|
112
106
|
);
|