File size: 1,966 Bytes
ef4c36f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | export interface VideoMeta {
width: number;
height: number;
duration: number;
fps: number;
}
export interface Caption {
id: string;
text: string;
startMs: number;
endMs: number;
}
export interface CaptionStyle {
fontFamily: string;
fontSize: number;
fillColor: string;
strokeColor: string;
strokeWidth: number;
highlightColor?: string;
/** rgba plate drawn behind the text — keeps captions readable over light page content */
backdrop?: string;
shadow: {
color: string;
blur: number;
offsetX: number;
offsetY: number;
};
uppercase: boolean;
letterSpacing: number;
}
export interface CaptionLayout {
position: "top" | "center" | "bottom";
yOffset: number;
maxWidthPercent: number;
maxLines: number;
}
export interface AnimationSettings {
speed: number;
style: "bounce" | "fade" | "pop";
}
export type ProgressStage =
| "extracting"
| "rendering"
| "encoding"
| "done"
| "error"
| "fetching_repo"
| "generating_script"
| "generating_tts"
| "recording_scroll"
| "syncing_captions";
export interface Project {
id: string;
videoPath: string;
videoMeta: VideoMeta;
captions: Caption[];
style: CaptionStyle;
layout: CaptionLayout;
animation: AnimationSettings;
status: "draft" | "rendering" | "done" | "error" | "generating";
exportPath?: string;
createdAt: string;
source?: "upload" | "github";
githubUrl?: string;
repoName?: string;
script?: string;
audioPath?: string;
}
export interface RenderProgress {
percent: number;
stage: ProgressStage;
message: string;
etaSeconds?: number;
}
export interface StylePreset {
id: string;
name: string;
style: CaptionStyle;
layout: CaptionLayout;
animation: AnimationSettings;
}
export interface GitHubRepoData {
owner: string;
repo: string;
fullName: string;
htmlUrl: string;
description: string;
stars: number;
language: string;
topics: string[];
readme: string;
}
|