Skip to main content
Room presence tracks who is currently watching a live room. Use it for viewer counts, “who is watching” panels, and host tools that need to know which users are present in a room right now.
Room presence is available on iOS, Android, and TypeScript. It is not available in the current Flutter SDK checkout.

Platform Surface

Parameters

Start Room Heartbeat

Start the room heartbeat when the user enters the room, and stop it when they leave. The SDK sends the first heartbeat immediately and continues at the server-configured interval.

Read Room User Count

Use the count as the source of truth for how many users are currently present in the room.

Keep the Count Live

The count is a point-in-time read. Android provides a built-in polling stream. On iOS and TypeScript, use your own timer and choose an interval that fits the UI.

Read Room Online Users

Use the online-user list when the app needs actual user objects, such as avatars in a “who is watching” panel. For large rooms, display the count as the total and treat the list as a snapshot.

Best Practices

Start room heartbeat when the viewer enters the live room screen. Stop it when the viewer leaves, switches rooms, backgrounds the screen, or the view model is torn down.
The count is the total active viewer number. The online-user list is best for UI that needs actual user objects, such as avatars or invite-to-cohost flows.
Android defaults observeOnlineUsersCount to 15 seconds. On iOS and TypeScript, avoid very aggressive polling unless the count is central to the experience.

Heartbeat Sync

Learn when to start and stop current user and room heartbeats.

Room Posts

Create social posts that reference live rooms.