@codivion/editor-preview-area
Version:
Preview area component for timeline video editor projects
65 lines (64 loc) • 1.32 kB
TypeScript
export interface ProjectSettings {
width: number;
height: number;
frameRate: number;
aspectRatio: string;
backgroundColor?: string;
canvas?: {
width: number;
height: number;
};
}
export interface ElementProperties {
start: number;
duration: number;
position: {
x: number;
y: number;
};
size: {
width?: number;
height: number;
};
src?: string;
opacity?: number;
rotation?: number;
scaleX?: number;
scaleY?: number;
text?: string;
fontSize?: number;
fontFamily?: string;
color?: string;
backgroundColor?: string;
}
export interface Element {
id: string;
name: string;
type: 'image' | 'video' | 'text' | 'audio';
properties: ElementProperties;
}
export interface Scene {
id: string;
name: string;
settings: {
duration: number;
start: number;
};
elements: Element[];
}
export interface ProjectData {
id: string;
name: string;
description: string;
settings: ProjectSettings;
scenes: Scene[];
globalElements: Element[];
}
export interface PreviewAreaProps {
projectData: ProjectData;
currentTime: number;
isPlaying?: boolean;
aspectRatio?: string;
width?: number;
height?: number;
}