Skip to main content

Add and Remove Users

add_user

This event is emitted when a new user joins the Eyeson room. The event contains user information such as ID, name, avatar URL, and guest status. The initial flag indicates whether this is the first connection or a reconnection.

{
type: 'add_user',
user: {
id,
name,
avatar, // url to users avatar
guest: true | false
}
initial: true | false // initial connect or reconnect
}

remove_user

This event is emitted when a user leaves the Eyeson room. The event contains both the user ID and the complete user object with details such as name, avatar URL, and guest status.

{
type: 'remove_user',
userId,
user: {
id,
name,
avatar,
guest: true | false
}
}

stop_presenting

Stop a presentation.

eyeson.send({ type: 'stop_presenting' });