userLeft
Sample payload
{
"type": "userLeft",
"data": {
"type": "local",
"reason": "generic/kicked/sessionEnded",
"user": {
"id": "d31ddb8a-07f7-44d0-ba4b-31b5a8e28f68",
"name": "John Smith",
....................
}
}
}Sample subscription code
sambaFrame.on('userLeft', (event) => {
const data = event.data;
if (data.type === 'local') {
console.log('You have left the room');
} else {
console.log(data.user.name, 'has left the room');
}
});Last updated