Connection and Meeting Info
connection
Contains update information about your connection status to the Eyeson API.
{
type: 'connection',
connectionStatus: 'fetch_room' | 'connected' | 'access_denied'
}
room_setup
Received once the real time channel connection is established. This event contains information about the state of the current room.
{
type: 'room_setup',
content: {
access_key: 'token-for-room',
ready: true | false,
room: {
id,
name,
ready: true | false,
shutdown: true | false,
guest_token: 'token-for-guest'
},
team: {
name
},
user: {
id,
name,
avatar,
guest: true | false,
ready: true | false,
},
links: {
self: 'https://api.eyeson.team/rooms/token-for-room',
gui: 'https://app.eyeson.team/?token-for-room',
guest_join: 'https://app.eyeson.team/?guest=token-for-guest',
websocket: 'https://api.eyeson.team/rt?access_key=token-for-room'
},
presentation: { /* ... */ },
broadcasts: [],
recording: null
}
}
An Eyeson room server and user may not be available on the first request, therefore there are three status flags included in the response above. Room ready and user ready status, as well as the top level ready flag combining those two.
room_ready
When you establish a real time connection but the Eyeson room isn't ready at that point (i.e. room_setup content ready is false) you'll receive this separate message once the room is ready.
{
type: 'room_ready',
content: {
ready: true,
user: { /* ... */ },
room: { /* ... */ }
}
}
accept
Received once a session for the room has been established.
{
type: 'accept',
remoteStream: MediaStream, // the remote stream you're receiving
localStream: MediaStream // your local stream
}
stream_update
Remote or local stream has been updated and needs to be replaced.
{
type: 'stream_update',
stream: MediaStream, // new remote stream
localStream: MediaStream // new local stream
}
disconnect
User has disconnected. If providing a presentation feature you should ensure to close any active presentation held by this user, and on demand remember to restore on reconnect.
{
type: 'disconnect'
}
reconnect
A user has reconnected, received after disconnect.
{
type: 'reconnect'
}
podium
This event is triggered when there are changes to the meeting podium. It provides information about connected status, video sources, and presentation status. The event contains details about who is currently visible, who is presenting content, and the layout of participants in the video stream.
{
type: 'podium',
solo: true | false, // client is the only participant
audio: true | false, // client participates with audio (is "hearable")
video: true | false, // client participates with video (is "visible")
media: true | false, // source list includes media (e.g. gifs or video files)
sources: sources, // list of source client ids
layers: [{ id: String, zIndex: -1|1 }], // list of current layers, empty if no layers exist
isSource: true | false, // client is a source
presenter: clientId | false, // clientId of presenter
isPresenter: true | false, // client is presenter
hasPresenter: true | false, // a participant is presenting
videoSources: videoSources, // list of video sources => index of sources list
userDimensions: {x, y, w, h}, // viewbox of current user on the remote stream
hasVideoSources: true | false, // session has video sources
hasMutedVideoPeers: true | false, // forwarded video (sfu) is muted
allUserDimensions: [{clientId, playId, x, y, w, h}] // list of all users with dimensions on video
}
options_update
The options_update
event complements the podium
update by providing additional configuration details about the meeting room. This event contains settings that affect the user interface, available features, and room behavior.
{
"type": "options_update",
"options": {
"show_names": true,
"show_label": true,
"exit_url": null,
"recording_available": true,
"broadcast_available": true,
"layout_available": true,
"layout": "auto",
"reaction_available": true,
"suggest_guest_names": true,
"lock_available": true,
"kick_available": true,
"sfu_mode": "disabled",
"layout_users": [
"",
"",
"",
"",
"",
"",
"",
"",
""
],
"layout_name": "nine",
"layout_map": null,
"voice_activation": false,
"custom_fields": {
"virtual_background": true,
"virtual_background_allow_guest": true
},
"widescreen": true,
"background_color": "#121212"
}
}
fetch_room
Fetches room details including room and user information. This event is automatically received when a room status changes to ready. You can also manually send this event to the Eyeson room which will respond with the same event type containing updated information.
fetch_room send operation
eyeson.send({ type: 'fetch_room' });
fetch_room event
{
type: 'fetch_room',
room: { /* ... */ }
}