The collab client comes with getting connected users support. You can get connected users in the loaded document with their id and the current page number.
In order to get connected users, you must turn on
enableConnectedUsers in the client constructor:
You must load a document before getting connected users. You can find how to load document here: Loading documents
To get connected users, you can use the
The current document id can be retrieved with
It returns a Promise of an array of connected users include
You can also subscribe to the connectedUsersChanged event to get notified when connected users page number changed or becomes online/offline.