@umituz/react-native-ai-generation-content 1.84.9 → 1.84.11
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 +1 -1
- package/src/domains/generation/infrastructure/executors/video-executor.ts +3 -1
- package/src/domains/generation/wizard/infrastructure/strategies/video-generation.executor.ts +3 -2
- package/src/domains/generation/wizard/infrastructure/strategies/video-generation.strategy.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-ai-generation-content",
|
|
3
|
-
"version": "1.84.
|
|
3
|
+
"version": "1.84.11",
|
|
4
4
|
"description": "Provider-agnostic AI generation orchestration for React Native with result preview components",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "src/index.ts",
|
|
@@ -122,7 +122,9 @@ export class VideoExecutor
|
|
|
122
122
|
const data = (rawResult?.data ?? rawResult) as {
|
|
123
123
|
video?: { url: string };
|
|
124
124
|
video_url?: string;
|
|
125
|
+
url?: string;
|
|
125
126
|
};
|
|
126
|
-
|
|
127
|
+
// FAL returns { video: { url } }, Pruna returns { url }, some return { video_url }
|
|
128
|
+
return data?.video?.url ?? data?.video_url ?? data?.url;
|
|
127
129
|
}
|
|
128
130
|
}
|
package/src/domains/generation/wizard/infrastructure/strategies/video-generation.executor.ts
CHANGED
|
@@ -107,8 +107,9 @@ export async function executeVideoGeneration(
|
|
|
107
107
|
});
|
|
108
108
|
|
|
109
109
|
const rawResult = result as Record<string, unknown>;
|
|
110
|
-
const data = (rawResult?.data ?? rawResult) as { video?: { url: string }; video_url?: string };
|
|
111
|
-
|
|
110
|
+
const data = (rawResult?.data ?? rawResult) as { video?: { url: string }; video_url?: string; url?: string };
|
|
111
|
+
// FAL returns { video: { url } }, Pruna returns { url }, some return { video_url }
|
|
112
|
+
const videoUrl = data?.video?.url ?? data?.video_url ?? data?.url;
|
|
112
113
|
|
|
113
114
|
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
114
115
|
console.log("[VideoExecutor] Generation completed", { success: !!videoUrl });
|
package/src/domains/generation/wizard/infrastructure/strategies/video-generation.strategy.ts
CHANGED
|
@@ -26,6 +26,7 @@ async function extractAudioAsBase64(wizardData: Record<string, unknown>): Promis
|
|
|
26
26
|
|
|
27
27
|
try {
|
|
28
28
|
const base64 = await readFileAsBase64(audioData.uri);
|
|
29
|
+
if (!base64) return undefined;
|
|
29
30
|
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
30
31
|
console.log("[VideoStrategy] Audio extracted as base64", { length: base64.length });
|
|
31
32
|
}
|