Skip to content

Interface: ReplaySession

@roomful/core


@roomful/core / ReplaySession

Defined in: packages/core/src/types.ts:2419

Drives a timed playback of a recording. Frames are re-emitted at their original tempo; the session does not re-apply them to a room.

play(): void

Defined in: packages/core/src/types.ts:2421

Starts playback from the beginning on a virtual clock.

void


seek(index): void

Defined in: packages/core/src/types.ts:2433

Jumps to a frame index, for a scrubbable timeline. Pauses playback and re-emits every frame from the start up to (but not including) index, so a listener that applies frames rebuilds the state at that point. index is clamped to [0, frameCount].

number

The frame index to scrub to.

void


stop(): void

Defined in: packages/core/src/types.ts:2424

Stops playback and releases the pending timer.

void


subscribe(callback): Unsubscribe

Defined in: packages/core/src/types.ts:2443

Subscribes to per-frame emissions and play/stop changes. Fires immediately with the current state, then once per frame, then a final null-frame event when playback ends.

(event) => void

The callback invoked for each replay event.

Unsubscribe

A function that removes the listener.