@honua/sdk-js
    Preparing search index...

    Interface TemporalPlaybackExperimental

    Playback controller returned by createTemporalPlayback.

    interface TemporalPlayback {
        extent: TemporalWindow;
        playing: boolean;
        speed: number;
        stepMs: number;
        window: TemporalWindow;
        dispose(): void;
        on(
            type: "tick",
            listener: (event: TemporalPlaybackTick) => void,
        ): TemporalPlaybackSubscription;
        on(
            type: "end" | "pause" | "play",
            listener: () => void,
        ): TemporalPlaybackSubscription;
        on(
            type: "error",
            listener: (error: unknown) => void,
        ): TemporalPlaybackSubscription;
        pause(): void;
        play(): void;
        scrub(time: TemporalInstant): void;
        setSpeed(multiplier: number): void;
        setWindow(windowMs: number): void;
        step(direction?: 1 | -1): void;
    }
    Index

    Properties

    The normalized extent (epoch ms).

    playing: boolean
    speed: number

    Current playback rate multiplier. See TemporalPlaybackOptions.speed.

    stepMs: number

    How far the window advances per frame, in milliseconds.

    The current window (epoch ms, half-open).

    Methods

    • Experimental

      Change the playback rate multiplier. While playing, the frame timer is restarted at the new cadence without re-emitting "play" or re-applying the current window; while paused, the next play() uses the new rate.

      Parameters

      • multiplier: number

      Returns void

    • Experimental

      Move the window one stepMs forward (1, the default) or backward (-1) and apply it, without starting or stopping the frame timer. The result is clamped to the extent exactly like TemporalPlayback.scrub, so stepping past either edge parks the window on that edge.

      Parameters

      • Optionaldirection: 1 | -1

      Returns void