auto-save 2026-05-14 04:04 (~6)
This commit is contained in:
@@ -129,6 +129,7 @@ export interface KeyFrame {
|
||||
}
|
||||
|
||||
export type FrameExtractTarget = "balanced" | "subject" | "transition" | "expression" | "motion"
|
||||
export type FrameExtractMode = "replace" | "append"
|
||||
|
||||
export interface TranscriptSegment {
|
||||
index: number
|
||||
@@ -261,8 +262,13 @@ export async function triggerTranscribe(id: string): Promise<Job> {
|
||||
return res.json()
|
||||
}
|
||||
|
||||
export async function analyzeJob(id: string, frames = 5, target: FrameExtractTarget = "balanced"): Promise<Job> {
|
||||
const qs = new URLSearchParams({ frames: String(frames), target })
|
||||
export async function analyzeJob(
|
||||
id: string,
|
||||
frames = 5,
|
||||
target: FrameExtractTarget = "balanced",
|
||||
mode: FrameExtractMode = "replace",
|
||||
): Promise<Job> {
|
||||
const qs = new URLSearchParams({ frames: String(frames), target, mode })
|
||||
const res = await fetch(`${API_BASE}/jobs/${id}/analyze?${qs.toString()}`, { method: "POST" })
|
||||
if (!res.ok) {
|
||||
const t = await res.text().catch(() => "")
|
||||
|
||||
Reference in New Issue
Block a user