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 object
Label for the camera that was disconnected.
Device Id for the camera that was disconnected.
camera.updated
- camera.updated(
event)
A camera device was updated.
Properties
Event object
Incoming information on the camera that was updated.
Current label for the camera.
Current device Id for the camera.
Previous information on the camera that was updated.
Previous label for the camera.
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 object
Id of the room session.
Id of the room.
Information on the current layout.
Name of the current layout.
Id of the room session.
Id of the room.
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 object
Id of the room session.
Id of the room.
Id of the member that was demoted.
Information about the room context.
member.joined
- member.joined(
event)
A member has joined the room.
Properties
Event object
Id of the room session.
Id of the room.
Information about the member that joined.
Whether the member is visible on the canvas.
Id of the room session member is joining.
Volume for the member’s microphone.
Id of the joining member.
Id identifying the member’s allowed scopes.
Level at which the member is identified as currently speaking.
Volume for the member’s speaker.
Whether the member’s microphone is muted.
Friendly name for the member.
Whether the member’s speaker is muted.
Whether the member’s camera is muted.
Id of the room member is joining.
The member type, either audience or member.
member.left
- member.left(
event)
A member has left the room.
Properties
Event object
Id of the room session.
Id of the room.
Information about the member that left.
Id of the room session that the member left.
Id of the leaving member.
Id of the room that the member left.
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 object
Id of the room session.
Id of the room.
Id of the audience member that was promoted.
Information about the room context.
member.talking
- member.talking(
event)
A member is talking or has stopped talking.
Properties
Event object
Id of the room session.
Id of the room.
Information about the member talking.
Id of the room session.
Id of the talking member.
Id of the room.
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 object
Id for the room session that the updated member is in.
Id for the room that the updated member is in.
Information on the member that was updated.
Which room properties were updated.
Id for the member that was updated.
Id for the room session that the updated member is in.
Id for the room that the updated member is in.
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 object
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 object
Label for the microphone that was disconnected.
Device Id for the microphone that was disconnected.
microphone.updated
- microphone.updated(
event)
A microphone device was updated.
Properties
Event object
Incoming information on the microphone that was updated.
Current label for the microphone.
Current device Id for the microphone.
Previous information on the microphone that was updated.
Previous label for the microphone.
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 object
Id of the room session.
Id of the room.
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 object
Low level call identifier for the video room connection.
Id for the current client member.
Information about the room session that has been joined.
Id for the current room session.
Whether logos are visible in participant name banners.
A list of current members with the current values of their updatable properties as listed in the getMembers method.
Whether participants are allowed to turn off their camera.
Whether recording is active in the session.
Whether participants are allowed to turn off their microphone.
Friendly name of the room session.
Whether participants with their cameras off are shown on the canvas.
Whether additional participants can join the room session.
Whether event feedback sounds (such as beeps when participants join or leave) are disabled in the session.
Id for the current room.
Id for the event channel on which these room session’s events are reported.
Name of the current canvas layout.
room.left
- room.left(
event)
The current client left the room session.
Properties
Event object
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 object
Id for the room session that was updated.
Id for the room that was updated.
Information on the room that was updated.
Which room properties were updated.
Id for the room session that was updated.
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 object
Label for the speaker that was disconnected.
Device Id for the speaker that was disconnected.
speaker.updated
- speaker.updated(
event)
A speaker device was updated.
Properties
Event object
Incoming information on the speaker that was updated.
Current label for the speaker.
Current device Id for the speaker.
Previous information on the speaker that was updated.
Previous label for the speaker.
Previous device Id for the speaker.
stream.ended
- stream.ended(
stream)
A stream ended (e.g., it was stopped).
Properties
The stream object. See RoomSessionStream.
stream.started
- stream.started(
stream)
A new stream started.
Properties
The stream object. See RoomSessionStream.