OpenReel Video - Professional browser-based video editor. Open source CapCut alternative. 100% browser-based, no installation, no cloud uploads, no watermarks.
TypeScript
import type { Project } from "@openreel/core/types/project";
export function makeEmptyProject(): Project {
return {
id: "p1",
name: "Test",
createdAt: 0,
modifiedAt: 0,
settings: {
width: 1920,
height: 1080,
frameRate: 30,
sampleRate: 48000,
channels: 2,
},
timeline: { duration: 0, tracks: [], subtitles: [], markers: [] },
mediaLibrary: { items: [] },
} as unknown as Project;
}
export function makeProjectWithClip(): Project {
const clip = {
id: "c1",
mediaId: "m1",
trackId: "t1",
startTime: 0,
duration: 5,
inPoint: 0,
outPoint: 5,
effects: [],
audioEffects: [],
transform: {
position: { x: 0, y: 0 },
scale: { x: 1, y: 1 },
anchor: { x: 0.5, y: 0.5 },
rotation: 0,
opacity: 1,
},
volume: 1,
keyframes: [],
};
return {
id: "p1",
name: "Test",
createdAt: 0,
modifiedAt: 0,
settings: {
width: 1920,
height: 1080,
frameRate: 30,
sampleRate: 48000,
channels: 2,
},
timeline: {
duration: 5,
subtitles: [],
markers: [],
tracks: [
{
id: "t1",
type: "video",
name: "V1",
clips: [clip],
transitions: [],
locked: false,
hidden: false,
muted: false,
solo: false,
},
],
},
mediaLibrary: { items: [] },
} as unknown as Project;
}