usersUpdated

When the users list inside the room changes then the usersUpdated event will be emitted.

Sample payload

{
  "type": "usersUpdated",
  "data": {
    "users": [
        {
            "id": "08c82f56-c670-4d36-bfe3-87a8cd0f7f29",
            "name": "John",
            "avatarColor": "#90c695",
            "role": "moderator",
            "kind": "local"
        },
        {
            "id": "15a0b10d-5f0f-47a9-9889-1d92651aa6d8",
            "name": "Lucas",
            "avatarColor": "#3498db",
            "role": "moderator",
            "deviceType": "desktop",
            "kind": "remote"
        }
    ]
  }
}

Sample subscription code

sambaFrame.on('usersUpdated', (event) => {
  const data = event.data;
  console.log('Current users inside the room', data.users);
});

Last updated