1

getOnlineUsersOnCurrentDocument()

Subscribe to a list of all online users who are either active or inactive on the current document. You can also use this find how many users are online on the current document and show them custom messages.

Example:

const presenceElement = client.getPresenceElement();
presenceElement.getOnlineUsersOnCurrentDocument();

Signature:

getOnlineUsersOnCurrentDocument: () => Observable<PresenceUser[] | null>

Params:

none

Returns:

Observable<PresenceUser[] | null>
2

setInactivityTime()

By default if the user is inactive for >5 minutes, we mark them offline. By inactive we mean they haven’t moved their mouse or haven’t made any keyboard event. You can configure this default threshold using this method.

Example:

const presenceElement = client.getPresenceElement();
presenceElement.setInactivityTime();

Signature:

setInactivityTime: (milliseconds: number) => void

Params:

milliseconds: number

Returns:

void
3

enableFollowAlongMode()

This method enables Follow Along Mode.

Example:

const presenceElement = client.getPresenceElement();
presenceElement.enableFollowAlongMode();

Signature:

enableFollowAlongMode: (useHistoryAPI: boolean) => any

Params:

useHistoryAPI: boolean

Returns:

any
4

disableFollowAlongMode()

This method disables Follow Along Mode.

Example:

const presenceElement = client.getPresenceElement();
presenceElement.disableFollowAlongMode();

Signature:

disableFollowAlongMode: () => any

Params:

none

Returns:

any