Interface: ReplaySession
@roomful/core / ReplaySession
Interface: ReplaySession
Section titled “Interface: 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.
Methods
Section titled “Methods”play()
Section titled “play()”play():
void
Defined in: packages/core/src/types.ts:2421
Starts playback from the beginning on a virtual clock.
Returns
Section titled “Returns”void
seek()
Section titled “seek()”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].
Parameters
Section titled “Parameters”number
The frame index to scrub to.
Returns
Section titled “Returns”void
stop()
Section titled “stop()”stop():
void
Defined in: packages/core/src/types.ts:2424
Stops playback and releases the pending timer.
Returns
Section titled “Returns”void
subscribe()
Section titled “subscribe()”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.
Parameters
Section titled “Parameters”callback
Section titled “callback”(event) => void
The callback invoked for each replay event.
Returns
Section titled “Returns”A function that removes the listener.