@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-ai-generation-content",
3
- "version": "1.84.9",
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
- return data?.video?.url ?? data?.video_url;
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
  }
@@ -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
- const videoUrl = data?.video?.url ?? data?.video_url;
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 });
@@ -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
  }