useHeartRateBroadcast
useHeartRateBroadcast(
bpm,options?):void
Defined in: console-sdk/src/react/hooks/useHeartRateBroadcast.ts:86
Declaratively forward watch heart-rate to connected consoles
(SDK_PLAN.md §3.7 row 14). While mounted, the current bpm is fanned out to
every ready console (or the options.devices subset) — deduped and
rate-limited per device by the engine — and recorded into the active session’s
HR track. Returns nothing: it is a side-effecting bridge with zero cleanup
for the consumer (unmount removes the registration).
null/undefined bpm sends nothing. A changed bpm is forwarded on the
next commit; a changed options.devices re-registers the broadcast.
Parameters
Section titled “Parameters”number | null | undefined
the latest heart-rate reading, or null/undefined for none.
options?
Section titled “options?”optional fan-out restriction (devices).
Returns
Section titled “Returns”void
Example
Section titled “Example”useHeartRateBroadcast(bpm); // all ready consolesuseHeartRateBroadcast(bpm, { devices: [rower.id] }); // one console