supervision-js
    Preparing search index...

    Interface DetectionFrameSource

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

    Hierarchy (View Summary)

    Index
    • 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. options is additive context; ignoring it stays correct for any source that does not compose other sources.

      Parameters

      Returns Promise<readonly DetectionFrame[]>

    • Optional coverage hook. Resolve when the source has enough data to answer loadFrames for the requested range.

      Playback awaits it under an enabled detection playback gate, which a session with appendable detections gets by default; otherwise a caller that wants to wait awaits it itself. A composed source fans it out to the entries it composes.

      Returns Promise<void>

    • 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

    • Returns void