Presence
Customize Behavior
Configuration
inactivityTime
- Configure when a user is considered inactive after being inactive.
- These are considered as inactive:
- no mouse movement
- no keyboard activity
- This is in milliseconds.
- This will set the following fields in the presence user object:
onlineStatus
toaway
isUserIdle
totrue
Note about tab focus:
- If a user’s tab is unfocused, we immediately update following fields in the presence user object:
onlineStatus
toaway
isTabAway
totrue
Default: 300000
(5 min)
Using API:
Using API:
Using API:
maxUsers
- Set how many
Presence
avatars to display at a time. - You can set this via the
maxUsers
attribute. Any extra avatars will be hidden and shown in an avatar which indicates the number of extraUsers
.
offlineInactivityTime
- Configure when a user is considered offline if they do not take any action on the document within the specified timeframe.
- User is also marked offline if they lose internet connection.
- This is in milliseconds.
- This will set the
onlineStatus
field in the presence user object tooffline
if they are inactive for the given time.
Default: 600000
(10 min)
self
- Whether to include yourself in the list of
Presence
users. - Default:
true
API Method:
API Method:
API Method:
locationId
- Renders the Presence avatar if any user is active on the given
locationId
.
Data
getData
- Subscribe to presence data.
- Params:
PresenceRequestQuery
(optional) - Returns:
Observable<GetPresenceDataResponse>
Using Hook:
Using API:
Using Hook:
Using API:
Event Subscription
on
- Subscribe to Presence Events. Here is the list of events you can subscribe to and the event objects you will receive.
Event Type | Description | Event Object |
---|---|---|
userStateChange | Triggered when a user state changes to online, offline, or away | PresenceUserStateChangeEvent |
Using Hook:
Using API:
Using Hook:
Using API:
onPresenceUserClick
- This event is triggered when a user clicks on a presence avatar.