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

    Interface ClipPlayerProps

    Props for ClipPlayer.

    interface ClipPlayerProps {
        audioPassthroughActive?: boolean;
        clip: ClipItem;
        colors: ClipCompositionColors;
        dragHandle?: boolean;
        editable: boolean;
        enableAudioPassthrough: boolean;
        enableMarkers?: boolean;
        enableRegions: boolean;
        icons: ClipCompositionIcons;
        isPlayingAll?: boolean;
        labels: ClipCompositionLabels;
        markersUserId?: string;
        onEnded?: (clipId: string) => void;
        onError?: (error: Error) => void;
        onMarkerAdd?: (clipId: string, marker: TimelineMarkerData) => void;
        onMarkerChange?: (clipId: string, marker: TimelineMarkerData) => void;
        onMarkerDelete?: (clipId: string, markerId: string) => void;
        onNameChange?: (clipId: string, name: string) => void;
        onPause?: (clipId: string) => void;
        onPlay?: (clipId: string) => void;
        onRegionChange?: (clipId: string, region: RegionData) => void;
        onRegionDelete?: (clipId: string, regionId: string) => void;
        onRemove?: (clipId: string) => void;
        onVolumeChange?: (clipId: string, volume: number) => void;
        ownerName?: string;
        playStartTime?: number | null;
        removable?: boolean;
        resolveClipOwnerName?: (clip: ClipItem) => string | undefined;
        rewindSignal?: number;
        styles: ClipCompositionStyles;
    }
    Index

    Properties

    audioPassthroughActive?: boolean

    Externally-driven audio passthrough state, forwarded to the media player. When it changes, the clip's passthrough is switched to match — the per-clip toggle stays usable in between. Only meaningful when enableAudioPassthrough is on.

    clip: ClipItem
    dragHandle?: boolean

    When true, the clip's title-bar acts as the only drag source for reordering. The card body (player area, timeline, controls) stays non-draggable so users can interact with media controls without accidentally starting a drag. Drag events still bubble to the grid's wrapper which owns the drop logic.

    editable: boolean
    enableAudioPassthrough: boolean
    enableMarkers?: boolean

    Enable timeline markers/comments

    enableRegions: boolean
    isPlayingAll?: boolean

    When true, programmatically start playback

    markersUserId?: string

    Current user ID for marker edit/delete permissions

    onEnded?: (clipId: string) => void
    onError?: (error: Error) => void
    onMarkerAdd?: (clipId: string, marker: TimelineMarkerData) => void
    onMarkerChange?: (clipId: string, marker: TimelineMarkerData) => void
    onMarkerDelete?: (clipId: string, markerId: string) => void
    onNameChange?: (clipId: string, name: string) => void
    onPause?: (clipId: string) => void
    onPlay?: (clipId: string) => void
    onRegionChange?: (clipId: string, region: RegionData) => void
    onRegionDelete?: (clipId: string, regionId: string) => void
    onRemove?: (clipId: string) => void
    onVolumeChange?: (clipId: string, volume: number) => void
    ownerName?: string

    Legacy fallback for the caption — see ClipCompositionProps.ownerName. Prefer resolveClipOwnerName when clips may have different recorders.

    playStartTime?: number | null

    Master-clock anchor (a performance.now() value) at which the clip should be playing position 0. When set together with isPlayingAll, the player schedules its play() to fire at that exact wall-clock and runs a periodic drift-correction loop so multi-clip Play All stays in sync. Null when there's no synchronised playback in flight.

    removable?: boolean

    Whether the remove (delete) affordance is shown for THIS clip. The composition computes it per clip — its owner may remove any clip, other participants only clips they created. Defaults to true so a bare ClipPlayer keeps its historical behavior.

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

    Per-clip owner-name resolver. When provided, this takes precedence over clip.createdByName and ownerName for the caption shown after the duration. See ClipCompositionProps.resolveClipOwnerName.

    rewindSignal?: number

    Rewind signal — each time this number changes the clip seeks back to the start (playback state is left untouched). Drive it from a counter incremented by a composition-level "rewind all" control.