Events
The RoomSession object emits the events listed below. You can work with these events using the following methods:
Subscribe to an event
Subscribe to an event once
Unsubscribe from an event
Remove all event listeners
Events
camera.disconnected
- camera.disconnected(
event)
A camera device was disconnected.
Properties
event
Event object
event.label
Label for the camera that was disconnected.
event.deviceId
Device Id for the camera that was disconnected.
camera.updated
- camera.updated(
event)
A camera device was updated.
Properties
event
Event object
event.current
Incoming information on the camera that was updated.
event.current.label
Current label for the camera.
event.current.deviceId
Current device Id for the camera.
event.previous
Previous information on the camera that was updated.
event.previous.label
Previous label for the camera.
event.previous.deviceId
Previous device Id for the camera.
layout.changed
- layout.changed(
event)
The layout of the room has changed. This event is not limited to changes associated to the grid layout of the room: it also includes for example changes in the position of the participants within the grid of the room.
Properties
event
Event object
event.room_session_id
Id of the room session.
event.room_id
Id of the room.
event.layout
Information on the current layout.
event.layout.name
Name of the current layout.
event.layout.room_session_id
Id of the room session.
event.layout.room_id
Id of the room.
event.layout.layers
Array containing information on all the layers in the current layout.
media.connected
- media.connected
New media has been connected. There is no payload, as this event is used to troubleshoot advanced use cases when hooking into the media connection.
media.disconnected
- media.disconnected
Media has been disconnected from the session. There is no payload, as this event is used to troubleshoot advanced use cases when hooking into the media connection.
media.reconnecting
- media.reconnecting
Media is attempting to reconnect to the session. There is no payload, as this event is used to troubleshoot advanced use cases when hooking into the media connection.
member.demoted
- member.demoted(
event)
A member has been demoted to audience, for example using demote.
This event is only received by the client which gets demoted, but you should
always check if the member_id parameter corresponds to the current participant
to ensure future compatibility.
Properties
event
Event object
event.room_session_id
Id of the room session.
event.room_id
Id of the room.
event.member_id
Id of the member that was demoted.
event.authorization
Information about the room context.
member.joined
- member.joined(
event)
A member has joined the room.
Properties
event
Event object
event.room_session_id
Id of the room session.
event.room_id
Id of the room.
event.member
Information about the member that joined.
event.member.visible
Whether the member is visible on the canvas.
event.member.room_session_id
Id of the room session member is joining.
event.member.input_volume
Volume for the member’s microphone.
event.member.id
Id of the joining member.
event.member.scope_id
Id identifying the member’s allowed scopes.
event.member.input_sensitivity
Level at which the member is identified as currently speaking.
event.member.output_volume
Volume for the member’s speaker.
event.member.audio_muted
Whether the member’s microphone is muted.
event.member.name
Friendly name for the member.
event.member.deaf
Whether the member’s speaker is muted.
event.member.video_muted
Whether the member’s camera is muted.
event.member.room_id
Id of the room member is joining.
event.member.type
The member type, either audience or member.
member.left
- member.left(
event)
A member has left the room.
Properties
event
Event object
event.room_session_id
Id of the room session.
event.room_id
Id of the room.
event.member
Information about the member that left.
event.member.room_session_id
Id of the room session that the member left.
event.member.id
Id of the leaving member.
event.member.room_id
Id of the room that the member left.
event.member.type
The member type, either audience or member.
member.promoted
- member.promoted(
event)
An audience participant has been promoted to member, for example using promote.
This event is only received by the client which gets promoted, but you should
always check if the member_id parameter corresponds to the current participant
to ensure future compatibility.
Properties
event
Event object
event.room_session_id
Id of the room session.
event.room_id
Id of the room.
event.member_id
Id of the audience member that was promoted.
event.authorization
Information about the room context.
member.talking
- member.talking(
event)
A member is talking or has stopped talking.
Properties
event
Event object
event.room_session_id
Id of the room session.
event.room_id
Id of the room.
event.member
Information about the member talking.
event.member.room_session_id
Id of the room session.
event.member.id
Id of the talking member.
event.member.room_id
Id of the room.
event.member.talking
Whether the member is speaking. A true value indicates the member has started speaking, while a false value indicates the member has stopped.
member.updated
- member.updated(
event)
A property of a member of the room has been updated.
Properties
event
Event object
event.room_session_id
Id for the room session that the updated member is in.
event.room_id
Id for the room that the updated member is in.
event.member
Information on the member that was updated.
event.member.updated
Which room properties were updated.
event.member.id
Id for the member that was updated.
event.member.room_session_id
Id for the room session that the updated member is in.
event.member.room_id
Id for the room that the updated member is in.
event.member.type
The member type, either audience or member.
In the field member.updated you find an array of all the properties that have been updated. The new values for those properties are available as additional fields of member.
For example, say visible and video_muted have been updated. The received object will be:
memberList.updated
- memberList.updated(
event)
The set of members or one or more properties of a member have changed.
Properties
event
Event object
event.members
A list of current members with the current values of their updatable properties as listed in the getMembers method.
microphone.disconnected
- microphone.disconnected(
event)
A microphone device was disconnected.
Properties
event
Event object
event.label
Label for the microphone that was disconnected.
event.deviceId
Device Id for the microphone that was disconnected.
microphone.updated
- microphone.updated(
event)
A microphone device was updated.
Properties
event
Event object
event.current
Incoming information on the microphone that was updated.
event.current.label
Current label for the microphone.
event.current.deviceId
Current device Id for the microphone.
event.previous
Previous information on the microphone that was updated.
event.previous.label
Previous label for the microphone.
event.previous.deviceId
Previous device Id for the microphone.
playback.ended
- playback.ended
A playback has ended. You only receive this event if your token has the room.playback permission. The event handler receives a RoomSessionPlayback object.
playback.started
- playback.started
A playback has been started. You only receive this event if your token has the room.playback permission. The event handler receives a RoomSessionPlayback object.
playback.updated
- playback.updated
A playback has been updated. You only receive this event if your token has the room.playback permission. The event handler receives a RoomSessionPlayback object.
recording.ended
- recording.ended
An active recording has been stopped. You only receive this event if your token has the room.recording permission. The event handler receives a RoomSessionRecording object.
recording.started
- recording.started
A recording has been started in the room. You only receive this event if your token has the room.recording permission. The event handler receives a RoomSessionRecording object.
recording.updated
- recording.updated
An active recording has been updated. You only receive this event if your token has the room.recording permission. The event handler receives a RoomSessionRecording object.
room.audience_count
- room.audience_count(
event)
This event is received periodically, and contains a total count of audience members.
Audience members joining and leaving trigger this event.
Properties
event
Event object
event.room_session_id
Id of the room session.
event.room_id
Id of the room.
event.total
Total number of audience members.
room.joined
- room.joined(
event)
The current client joined the room session. The event handler receives objects that contain information about the room and all its members (including the current client).
Properties
event
Event object
event.call_id
Low level call identifier for the video room connection.
event.member_id
Id for the current client member.
event.room_session
Information about the room session that has been joined.
event.room_session.room_session_id
Id for the current room session.
event.room_session.logos_visible
Whether logos are visible in participant name banners.
event.room_session.members
A list of current members with the current values of their updatable properties as listed in the getMembers method.
event.room_session.blind_mode
Whether participants are allowed to turn off their camera.
event.room_session.recording
Whether recording is active in the session.
event.room_session.silent_mode
Whether participants are allowed to turn off their microphone.
event.room_session.name
Friendly name of the room session.
event.room_session.hide_video_muted
Whether participants with their cameras off are shown on the canvas.
event.room_session.locked
Whether additional participants can join the room session.
event.room_session.meeting_mode
Whether event feedback sounds (such as beeps when participants join or leave) are disabled in the session.
event.room_session.room_id
Id for the current room.
event.room_session.event_channel
Id for the event channel on which these room session’s events are reported.
event.room_session.layout_name
Name of the current canvas layout.
room.left
- room.left(
event)
The current client left the room session.
Properties
event
Event object
event.reason
Reason client left the session. Possible values are RECONNECTION_ATTEMPT_TIMEOUT and undefined.
room.updated
- room.updated(
event)
The properties of the room have been updated.
Properties
event
Event object
event.room_session_id
Id for the room session that was updated.
event.room_id
Id for the room that was updated.
event.room
Information on the room that was updated.
event.room.updated
Which room properties were updated.
event.room.room_session_id
Id for the room session that was updated.
event.room.room_id
Id for the room that was updated.
In the field room.updated you find an array of all the properties that have been updated. The new values for those properties are available as additional fields of room.
For example, if hide_video_muted has been updated, the received object will be:
speaker.disconnected
- speaker.disconnected(
event)
A speaker device was disconnected.
Properties
event
Event object
event.label
Label for the speaker that was disconnected.
event.deviceId
Device Id for the speaker that was disconnected.
speaker.updated
- speaker.updated(
event)
A speaker device was updated.
Properties
event
Event object
event.current
Incoming information on the speaker that was updated.
event.current.label
Current label for the speaker.
event.current.deviceId
Current device Id for the speaker.
event.previous
Previous information on the speaker that was updated.
event.previous.label
Previous label for the speaker.
event.previous.deviceId
Previous device Id for the speaker.
stream.ended
- stream.ended(
stream)
A stream ended (e.g., it was stopped).
Properties
stream
The stream object. See RoomSessionStream.
stream.started
- stream.started(
stream)
A new stream started.
Properties
stream
The stream object. See RoomSessionStream.