Skip to content
Roomful is in public beta — install with the @beta tag. Share feedback →

Interface: AwarenessEngine

@roomful/core


@roomful/core / AwarenessEngine

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

Exposes awareness operations for a room.

getAll(): AwarenessState[]

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

Returns all remote awareness snapshots.

AwarenessState[]

The current awareness snapshots.


set(value): void

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

Merges arbitrary awareness metadata into the local peer.

Record<string, unknown>

The awareness fields to merge.

void

Nothing.


setFocus(elementId): void

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

Updates the local focus target.

The focused element identifier, or null to clear it.

string | null

void

Nothing.


setSelection(selection): void

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

Updates the local text selection.

The active selection, or null to clear it.

AwarenessSelection | null

void

Nothing.


setTyping(isTyping): void

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

Updates the local typing state.

boolean

Whether the local peer is currently typing.

void

Nothing.


subscribe(cb): Unsubscribe

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

Subscribes to remote awareness updates.

(peers) => void

The callback invoked with remote awareness snapshots.

Unsubscribe

A function that removes the listener.