Hiyve Components - v1.0.0
    Preparing search index...

    Interface ClipCompositionRef

    Ref handle exposed by ClipComposition via forwardRef.

    interface ClipCompositionRef {
        addClip: (clip: ClipItem, options?: AddClipOptions) => void;
        applyClipMutation: (mutation: ClipMutation) => void;
        fileId: string | null;
        getComposition: () => ClipCompositionFile;
        hasUnsavedChanges: boolean;
        isSaving: boolean;
        lastSaved: Date | null;
        removeClip: (clipId: string, options?: RemoveClipOptions) => void;
        save: () => Promise<string | null>;
    }
    Index

    Properties

    addClip: (clip: ClipItem, options?: AddClipOptions) => void

    Add a clip programmatically. A no-op when a clip with the same id is already in the composition, so replays/echoes are safe to apply without pre-checking. See AddClipOptions for replay semantics.

    applyClipMutation: (mutation: ClipMutation) => void

    Apply a remote clip annotation edit (comment/marker or region) to local state and mark the composition unsaved — WITHOUT firing ClipCompositionProps.onClipMutation (it's already remote, so it won't be re-broadcast). The owner calls this to replay a follower's proxied mutation; its resulting save then fans the canonical composition out.

    fileId: string | null

    Current file ID

    getComposition: () => ClipCompositionFile

    Get the current composition data

    hasUnsavedChanges: boolean

    Whether there are unsaved changes

    isSaving: boolean

    Whether currently saving

    lastSaved: Date | null

    Last save timestamp

    removeClip: (clipId: string, options?: RemoveClipOptions) => void

    Remove a clip by ID. A no-op when no clip with that id exists, so replays/echoes are safe. See RemoveClipOptions for replay semantics.

    save: () => Promise<string | null>

    Trigger a manual save