mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-03 04:38:33 +00:00
fix(cli): align render output naming and add WebM support to studioServer (#109)
## Summary - CLI render: use timestamped filenames (`project_date_time.ext`) matching the studio's naming convention, preventing overwrites of previous renders - studioServer: read `fps`/`quality`/`format` from POST body instead of hardcoding `fps:30`/`quality:standard`/`mp4` - studioServer: use timestamped job IDs matching the studio pattern - studioServer: fix download endpoint to serve correct content-type for WebM ## Test plan - [x] `hyperframes render --format webm` outputs timestamped WebM file - [x] `hyperframes render` outputs timestamped MP4 (no overwrite) - [x] Studio embedded server (`hyperframes dev`) renders with correct format when selected in UI - [x] Download endpoint serves correct MIME type for WebM renders
This commit is contained in:
@@ -27,13 +27,23 @@ export function useRenderQueue(projectId: string | null) {
|
||||
const existing = new Set(prev.map((j) => j.id));
|
||||
const fromServer: RenderJob[] = data.renders
|
||||
.filter((r: { id: string }) => !existing.has(r.id))
|
||||
.map((r: { id: string; filename: string; createdAt: number; size: number }) => ({
|
||||
id: r.id,
|
||||
status: "complete" as const,
|
||||
progress: 100,
|
||||
filename: r.filename,
|
||||
createdAt: r.createdAt,
|
||||
}));
|
||||
.map(
|
||||
(r: {
|
||||
id: string;
|
||||
filename: string;
|
||||
createdAt: number;
|
||||
size: number;
|
||||
status?: string;
|
||||
durationMs?: number;
|
||||
}) => ({
|
||||
id: r.id,
|
||||
status: (r.status === "failed" ? "failed" : "complete") as "complete" | "failed",
|
||||
progress: 100,
|
||||
filename: r.filename,
|
||||
createdAt: r.createdAt,
|
||||
durationMs: r.durationMs,
|
||||
}),
|
||||
);
|
||||
return [...prev, ...fromServer];
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user