supervision-js
    Preparing search index...

    Interface DetectionFrameSource

    interface DetectionFrameSource {
        destroy?(): void;
        getAvailableRanges?(): readonly DetectionFrameSourceVersionRange[];
        getChangesSince?(
            version: number,
            ranges: readonly DetectionFrameSourceVersionRange[],
        ): DetectionFrameSourceChanges;
        getVersion?(range?: DetectionFrameSourceVersionRange): number;
        loadFrames(
            startTime: number,
            endTime: number,
        ): Promise<readonly DetectionFrame[]>;
        waitForRange?(range: DetectionFrameSourceVersionRange): Promise<void>;
    }

    Hierarchy (View Summary)

    Index
    • 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[]>

    • Optional backpressure hook used by playback gates. Resolve when the source has enough data to answer loadFrames for the requested range.

      Returns Promise<void>