supervision-js
    Preparing search index...

    Interface WritableDetectionFrameSource

    Detection source that accepts new frames over time.

    This is the ingestion shape used for streaming inference and long-running media sessions. It remains semantic: render artifacts are prepared later by the renderer.

    interface WritableDetectionFrameSource {
        datasetId: string;
        appendFrames(
            frames: readonly DetectionFrame[],
        ): Promise<ColdDetectionFrameStoreWriteSummary>;
        clear(): Promise<void>;
        destroy?(): void;
        getAvailableRanges(): readonly DetectionFrameSourceVersionRange[];
        getChangesSince?(
            version: number,
            ranges: readonly DetectionFrameSourceVersionRange[],
        ): DetectionFrameSourceChanges;
        getSummary(): ColdDetectionFrameStoreWriteSummary | null;
        getVersion(range?: DetectionFrameSourceVersionRange): number;
        loadFrames(
            startTime: number,
            endTime: number,
        ): Promise<readonly DetectionFrame[]>;
        replaceFrames(
            frames: readonly DetectionFrame[],
        ): Promise<ColdDetectionFrameStoreWriteSummary>;
        waitForRange(range: DetectionFrameSourceVersionRange): Promise<void>;
    }

    Hierarchy (View Summary)

    Index
    datasetId: string
    • Returns Promise<void>

    • Returns void

    • Optionally describe changes after version that overlap ranges.

      This allows a hot timeline to patch a small progressive-inference append without reloading and copying its complete buffered window.

      Parameters

      Returns DetectionFrameSourceChanges

    • Optional monotonically increasing source version. Buffered timelines use this to refresh only when the current range changed. Sources that can revise an existing frame must implement this hook; without it, overlapping frame identities are treated as immutable across rolling window loads.

      Parameters

      Returns number

    • Load semantic detection frames for the requested media-time range.

      Sources should return detection data, not renderer artifacts. Implementers should prefer sorted frames and avoid mutating returned frames after handing them to the renderer.

      Parameters

      • startTime: number
      • endTime: number

      Returns Promise<readonly DetectionFrame[]>