supervision-js
    Preparing search index...

    Interface PresentedFrameChannel

    The frame plane plus the transport that moves it. Everything below the frames is the playhead, and the producer owns it: a renderer holding this channel asks rather than decides.

    interface PresentedFrameChannel {
        onPresentedFrame(
            handler: (presented: PresentedVideoFrame) => void,
        ): void;
        play(): Promise<void>;
        pause(): void;
        scrub(timeMs: number, intent?: PresentedFrameSeekIntent): void;
        commit(timeMs: number): Promise<void>;
        step(direction: -1 | 1): Promise<void>;
        setPlaybackRate(rate: number): void;
        getPlaybackRate(): number;
        beginInteractiveSeek(): void;
        endInteractiveSeek(): Promise<void>;
        getPlayhead(): PresentedFramePlayhead;
        getDurationMs(): number;
        getStatus(): PresentedFrameChannelStatus;
        getSeeking(): boolean;
        subscribe(
            signal: PresentedFrameChannelSignal,
            listener: () => void,
        ): () => void;
    }

    Hierarchy (View Summary)

    Index
    • Runs the playhead forward from where it stands, and from ENDED restarts at the start of the source.

      A channel never loops itself. A renderer told to loop replays by calling this when the status turns ENDED, so a channel that resumes in place from ENDED never loops.

      Returns Promise<void>

    • Stops the playhead where it stands. A pause asked for here outranks the freeze beginInteractiveSeek holds, so the endInteractiveSeek that ends the drag has nothing left to resume.

      Returns void

    • Latest-wins seek for a gesture in flight; returns without settling.

      Parameters

      Returns void

    • Seek that settles: resolves once the producer has presented its landing. Recommitting the current time must replay or retain that presentation for a newly subscribed frame consumer.

      Parameters

      • timeMs: number

      Returns Promise<void>

    • Walks one real source frame in presentation order.

      Parameters

      • direction: -1 | 1

      Returns Promise<void>

    • Forward playback speed, in media seconds per wall second. Throws on a rate the producer cannot play, reverse included.

      Parameters

      • rate: number

      Returns void

    • Returns number

    • Freezes a playing producer for the length of a drag.

      Returns void

    • Resumes play only if beginInteractiveSeek was what paused it.

      Returns Promise<void>

    • Returns number

    • Returns boolean