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

    Interface ClipCompositionProps

    Props for the ClipComposition main component.

    interface ClipCompositionProps {
        autoSaveInterval?: number;
        colors?: Partial<ClipCompositionColors>;
        enableAudioPassthrough?: boolean;
        enableAutoSave?: boolean;
        enableDragReorder?: boolean;
        enableMarkers?: boolean;
        enableRecording?: boolean;
        enableRegions?: boolean;
        fileId?: string;
        fileLocation?: string;
        icons?: Partial<ClipCompositionIcons>;
        initialComposition?: ClipCompositionFile;
        labels?: Partial<ClipCompositionLabels>;
        maxClips?: number;
        maxHeight?: string | number;
        maxRecordingDuration?: number;
        onAutoSave?: (fileId: string) => void;
        onChange?: (composition: ClipCompositionFile) => void;
        onClipAdded?: (clip: ClipItem) => void;
        onClipRemoved?: (clipId: string) => void;
        onClose?: () => void;
        onError?: (error: Error) => void;
        onOpenFilePicker?: () => void;
        onSaveError?: (error: Error) => void;
        onTitleChange?: (title: string) => void;
        ownerName?: string;
        readOnly?: boolean;
        resolveClipOwnerName?: (clip: ClipItem) => string | undefined;
        showHeader?: boolean;
        showToolbar?: boolean;
        styles?: Partial<ClipCompositionStyles>;
        sx?: SxProps<Theme>;
        title?: string;
    }
    Index

    Properties

    autoSaveInterval?: number

    Auto-save interval in milliseconds

    5000
    
    colors?: Partial<ClipCompositionColors>

    Custom colors

    enableAudioPassthrough?: boolean

    Enable audio passthrough

    false
    
    enableAutoSave?: boolean

    Enable auto-save

    true
    
    enableDragReorder?: boolean

    Enable drag-and-drop reorder

    true
    
    enableMarkers?: boolean

    Enable timeline markers/comments on clip players

    false
    
    enableRecording?: boolean

    Enable recording feature

    true
    
    enableRegions?: boolean

    Enable regions on clip players

    false
    
    fileId?: string

    Existing file ID for updates

    fileLocation?: string

    File storage location

    icons?: Partial<ClipCompositionIcons>

    Custom icons

    initialComposition?: ClipCompositionFile

    Initial composition to load

    labels?: Partial<ClipCompositionLabels>

    Custom labels

    maxClips?: number

    Maximum number of clips allowed

    20
    
    maxHeight?: string | number

    Maximum container height

    maxRecordingDuration?: number

    Maximum recording duration in seconds

    300
    
    onAutoSave?: (fileId: string) => void

    Called after auto-save completes

    onChange?: (composition: ClipCompositionFile) => void

    Called when composition changes

    onClipAdded?: (clip: ClipItem) => void

    Called when a clip is added

    onClipRemoved?: (clipId: string) => void

    Called when a clip is removed

    onClose?: () => void

    Close callback — renders a close button in the title bar

    onError?: (error: Error) => void

    General error callback

    onOpenFilePicker?: () => void

    Optional handler for an "Open existing" affordance rendered in the title bar (left of the title field). Useful when the editor was opened on a fresh blank file and the user wants a way back to a file picker. Omit to hide the button.

    onSaveError?: (error: Error) => void

    Called when a save error occurs

    onTitleChange?: (title: string) => void

    Called when the composition title changes

    ownerName?: string

    Legacy: a single name to render under every clip. Kept only as a fallback when resolveClipOwnerName isn't provided AND the clip lacks a createdByName. Prefer resolveClipOwnerName — clips can be recorded by different participants (e.g. a student recording into a teacher's composition), so a single file-owner name is wrong for those clips.

    readOnly?: boolean

    Read-only mode

    false
    
    resolveClipOwnerName?: (clip: ClipItem) => string | undefined

    Per-clip owner-name resolver. Called for each clip to produce the name shown next to its duration (e.g. "0:11 — Bilbo"). Receives the full ClipItem so the consumer can look the owner up however it likes — typically by joining clip.fileId against a userFiles slice and resolving the file's userId to a display name (covers the case where a clip's recorder differs from the composition's owner). Return undefined to fall back through clip.createdByNameownerName.

    showHeader?: boolean

    Show header with title

    true
    
    showToolbar?: boolean

    Show toolbar

    true
    
    styles?: Partial<ClipCompositionStyles>

    Custom styles

    sx?: SxProps<Theme>

    MUI sx styling prop

    title?: string

    Title for the composition