Timeline Studio API Documentation - v0.26.0
    Preparing search index...
    interface TimelineContextType {
        addClip: (
            trackId: string,
            mediaFile: MediaFile,
            startTime: number,
            duration?: number,
        ) => void;
        addSection: (
            name: string,
            startTime: number,
            duration: number,
            realStartTime?: Date,
        ) => void;
        addTrack: (trackType: TrackType, sectionId?: string, name?: string) => void;
        clearError: () => void;
        clearHistory: () => void;
        clearSelection: () => void;
        closeProject: () => void;
        copySelection: () => void;
        createProject: (name: string, settings?: any) => void;
        currentTime: number;
        cutSelection: () => void;
        error: string;
        isPlaying: boolean;
        isReady: boolean;
        isRecording: boolean;
        isSaving: boolean;
        lastAction: string;
        loadProject: (project: TimelineProject) => void;
        moveClip: (
            clipId: string,
            newTrackId: string,
            newStartTime: number,
        ) => void;
        paste: (targetTrackId?: string, targetTime?: number) => void;
        pause: () => void;
        play: () => void;
        project: TimelineProject;
        redo: () => void;
        removeClip: (clipId: string) => void;
        removeSection: (sectionId: string) => void;
        removeTrack: (trackId: string) => void;
        reorderTracks: (trackIds: string[]) => void;
        saveProject: () => void;
        seek: (time: number) => void;
        selectClips: (clipIds: string[], addToSelection?: boolean) => void;
        selectSections: (sectionIds: string[], addToSelection?: boolean) => void;
        selectTracks: (trackIds: string[], addToSelection?: boolean) => void;
        setEditMode: (mode: "trim" | "select" | "cut" | "move") => void;
        setPlaybackRate: (rate: number) => void;
        setScrollPosition: (x: number, y: number) => void;
        setTimeScale: (scale: number) => void;
        splitClip: (clipId: string, splitTime: number) => void;
        stop: () => void;
        toggleSnap: (snapMode: "none" | "grid" | "clips" | "markers") => void;
        trimClip: (
            clipId: string,
            newStartTime: number,
            newDuration: number,
        ) => void;
        uiState: TimelineUIState;
        undo: () => void;
        updateClip: (clipId: string, updates: Partial<TimelineClip>) => void;
        updateSection: (
            sectionId: string,
            updates: Partial<TimelineSection>,
        ) => void;
        updateTrack: (trackId: string, updates: Partial<TimelineTrack>) => void;
    }
    Index

    Properties

    addClip: (
        trackId: string,
        mediaFile: MediaFile,
        startTime: number,
        duration?: number,
    ) => void
    addSection: (
        name: string,
        startTime: number,
        duration: number,
        realStartTime?: Date,
    ) => void
    addTrack: (trackType: TrackType, sectionId?: string, name?: string) => void
    clearError: () => void
    clearHistory: () => void
    clearSelection: () => void
    closeProject: () => void
    copySelection: () => void
    createProject: (name: string, settings?: any) => void
    currentTime: number
    cutSelection: () => void
    error: string
    isPlaying: boolean
    isReady: boolean
    isRecording: boolean
    isSaving: boolean
    lastAction: string
    loadProject: (project: TimelineProject) => void
    moveClip: (clipId: string, newTrackId: string, newStartTime: number) => void
    paste: (targetTrackId?: string, targetTime?: number) => void
    pause: () => void
    play: () => void
    redo: () => void
    removeClip: (clipId: string) => void
    removeSection: (sectionId: string) => void
    removeTrack: (trackId: string) => void
    reorderTracks: (trackIds: string[]) => void
    saveProject: () => void
    seek: (time: number) => void
    selectClips: (clipIds: string[], addToSelection?: boolean) => void
    selectSections: (sectionIds: string[], addToSelection?: boolean) => void
    selectTracks: (trackIds: string[], addToSelection?: boolean) => void
    setEditMode: (mode: "trim" | "select" | "cut" | "move") => void
    setPlaybackRate: (rate: number) => void
    setScrollPosition: (x: number, y: number) => void
    setTimeScale: (scale: number) => void
    splitClip: (clipId: string, splitTime: number) => void
    stop: () => void
    toggleSnap: (snapMode: "none" | "grid" | "clips" | "markers") => void
    trimClip: (clipId: string, newStartTime: number, newDuration: number) => void
    undo: () => void
    updateClip: (clipId: string, updates: Partial<TimelineClip>) => void
    updateSection: (sectionId: string, updates: Partial<TimelineSection>) => void
    updateTrack: (trackId: string, updates: Partial<TimelineTrack>) => void