Rxova
Skip to content

PresenceOptions

  • BusOptions
optional heartbeatMs?: number;

Presence heartbeat interval in ms. Default 2000.

BusOptions.heartbeatMs

optional includeSelf?: boolean;

Put this client in its own roster. Default false.

The default answers “who else is here”, which is what a presence strip asks. Turn it on for an avatar list, where leaving yourself out means every tab renders a different list of the same room.


optional kind?: PeerKind;

What this client announces itself as. Defaults to ‘worker’ when there is no document, else ‘tab’.

BusOptions.kind

optional metadata?: unknown;

What to tell peers about this client — a display name, a tab title, a cursor. Must survive the wire (structured clone), like any payload.


optional probeGraceMs?: number;

How long a probed peer has to answer before it is dropped. Default 1000ms.

This is a round trip on a same-origin channel, not a heartbeat interval, so it can be short: a peer that is merely throttled still answers at once.


optional pruneAfterMs?: number;

How much silence makes a peer suspect. Default 5000ms. It is then probed, not dropped.


optional transport?: (name) => Transport;

Transport factory, mainly for tests. Defaults to defaultTransport.

ParameterType
namestring

Transport

BusOptions.transport