supervision-js
    Preparing search index...

    Interface BufferedDetectionTimeline

    Hot detection timeline controller.

    interface BufferedDetectionTimeline {
        prepare(
            mediaTime: number,
            options?: DetectionBufferPrepareOptions,
        ): Promise<void>;
        needsPlaybackGateWait?(
            mediaTime: number,
            options?: DetectionBufferPrepareOptions,
        ): boolean;
        prefetch(mediaTime: number): void;
        setTimelineContext?(context: DetectionTimelineContext): void;
        selectFrame(mediaTime: number): DetectionFrame | undefined;
        getBufferedFrames(): readonly DetectionFrame[];
        getState(): DetectionBufferState;
        subscribe?(listener: () => void): () => void;
        destroy(): void;
    }
    Index
    • Whether a gated prepare at mediaTime would wait, answered without starting the wait.

      A caller driving a source that runs its own playhead uses this to decide whether to stop it, which it cannot do by awaiting: the wait is the thing it is deciding about. False whenever waiting is not on the table at all, which covers a disabled gate, a source that reports neither coverage nor a way to wait for it, and a source the gate has already given up on.

      Parameters

      Returns boolean

    • Parameters

      • mediaTime: number

      Returns void

    • Parameters

      • mediaTime: number

      Returns DetectionFrame | undefined

    • Returns readonly DetectionFrame[]

    • Observe the buffered window changing.

      A load landing is the only way a media time that answered nothing starts answering a frame, and a resting playhead draws nothing that would ask again. Without this a consumer keeps the answer from before the load.

      Parameters

      • listener: () => void

      Returns () => void

    • Returns void