@umituz/react-native-ai-generation-content 1.17.141 → 1.17.143
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
|
@@ -89,27 +89,40 @@ export async function executeImageToVideo(
|
|
|
89
89
|
|
|
90
90
|
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
91
91
|
// eslint-disable-next-line no-console
|
|
92
|
-
console.log("[ImageToVideoExecutor] Starting provider.
|
|
92
|
+
console.log("[ImageToVideoExecutor] Starting provider.subscribe()...");
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
// Build input directly - let buildInput handle base64 format
|
|
96
96
|
const input = buildInput(request.imageBase64, request.motionPrompt, request.options);
|
|
97
97
|
|
|
98
|
-
//
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
98
|
+
// Use subscribe for video generation (long-running operation with queue)
|
|
99
|
+
// subscribe provides progress updates unlike run()
|
|
100
|
+
const result = await provider.subscribe(model, input, {
|
|
101
|
+
onQueueUpdate: (status) => {
|
|
102
102
|
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
103
103
|
// eslint-disable-next-line no-console
|
|
104
|
-
console.log("[ImageToVideoExecutor]
|
|
104
|
+
console.log("[ImageToVideoExecutor] Queue status:", status.status, "position:", status.queuePosition);
|
|
105
|
+
}
|
|
106
|
+
// Map queue status to progress
|
|
107
|
+
if (status.status === "IN_QUEUE") {
|
|
108
|
+
onProgress?.(10);
|
|
109
|
+
} else if (status.status === "IN_PROGRESS") {
|
|
110
|
+
onProgress?.(50);
|
|
111
|
+
} else if (status.status === "COMPLETED") {
|
|
112
|
+
onProgress?.(90);
|
|
105
113
|
}
|
|
106
|
-
onProgress?.(progressValue);
|
|
107
114
|
},
|
|
115
|
+
timeoutMs: 300000, // 5 minutes timeout for video generation
|
|
108
116
|
});
|
|
109
117
|
|
|
110
118
|
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
111
119
|
// eslint-disable-next-line no-console
|
|
112
|
-
console.log("[ImageToVideoExecutor]
|
|
120
|
+
console.log("[ImageToVideoExecutor] Subscribe resolved, result keys:", result ? Object.keys(result as object) : "null");
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
124
|
+
// eslint-disable-next-line no-console
|
|
125
|
+
console.log("[ImageToVideoExecutor] provider.subscribe() completed");
|
|
113
126
|
}
|
|
114
127
|
|
|
115
128
|
const extractor = extractResult || defaultExtractResult;
|