补齐画板视频封面持久化
生成画板视频时截取首帧并上传为封面 将视频生成结果写入素材库并保留 thumbnailSrc 同步后端契约、SpacetimeDB 绑定、前端素材库和画布层映射 补充相关测试与文档说明
This commit is contained in:
@@ -97,6 +97,7 @@ export type EditorAssetSnapshot = {
|
||||
folderId: string;
|
||||
label: string;
|
||||
imageSrc: string;
|
||||
thumbnailSrc?: string | null;
|
||||
objectKey?: string | null;
|
||||
assetObjectId?: string | null;
|
||||
width: number;
|
||||
@@ -329,10 +330,13 @@ export type EditorVideoGenerationInput = {
|
||||
generationInputs?: EditorAssetGenerationInputs | null;
|
||||
sourceResourceId?: string | null;
|
||||
assetKind?: string | null;
|
||||
assetFolderId?: string | null;
|
||||
assetLabel?: string | null;
|
||||
};
|
||||
|
||||
export type EditorVideoGenerationResult = {
|
||||
videoSrc: string;
|
||||
thumbnailSrc?: string | null;
|
||||
objectKey?: string | null;
|
||||
assetObjectId?: string | null;
|
||||
width: number;
|
||||
@@ -343,8 +347,10 @@ export type EditorVideoGenerationResult = {
|
||||
model: string;
|
||||
provider: string;
|
||||
taskId: string;
|
||||
durationSeconds: number;
|
||||
priceMudPoints?: number;
|
||||
project?: EditorProjectSnapshot | null;
|
||||
asset?: EditorAssetSnapshot | null;
|
||||
queueState?: ExternalGenerationJobStatusRecord | null;
|
||||
};
|
||||
|
||||
@@ -912,6 +918,8 @@ export async function generateEditorVideo(input: EditorVideoGenerationInput) {
|
||||
? { sourceResourceId: input.sourceResourceId }
|
||||
: {}),
|
||||
...(input.assetKind ? { assetKind: input.assetKind } : {}),
|
||||
...(input.assetFolderId ? { assetFolderId: input.assetFolderId } : {}),
|
||||
...(input.assetLabel ? { assetLabel: input.assetLabel } : {}),
|
||||
}),
|
||||
'生成视频失败',
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user