Video.RoomSessionEvents

List of events emitted by a RoomSession object.

Events

layout.changed

layout.changed: undefined

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. The event handler receives objects of type:

type _ = {
  room_session_id: string,
  room_id: string,
  layout: {
    layers: Array<{
      y: number,
      x: number,
      reservation: string,
      layer_index: number,
      height: number,
      z_index: number,
      member_id: string,
      width: number
    }>,
    room_session_id: string,
    room_id: string,
    name: string
  }
}

member.joined

member.joined: undefined

A member has joined the room. The event handler receives objects of type:

type _ = {
  room_session_id: string,
  room_id: string,
  member: {
    visible: boolean,
    room_session_id: string,
    input_volume: number,
    id: string,
    scope_id: string,
    input_sensitivity: number,
    output_volume: number,
    audio_muted: boolean,
    on_hold: boolean,
    name: string,
    deaf: boolean,
    video_muted: boolean,
    room_id: string,
    type: string
  }
}

member.left

member.left: undefined

A member has left the room. The event handler receives objects of type:

type _ = {
  room_session_id: string,
  room_id: string,
  member: {
    room_session_id: string,
    id: string,
    room_id: string,
    type: string
  }
}

member.talking

member.talking: undefined

A member is talking or has stopped talking. The event handler receives objects of type:

type _ = {
  room_session_id: string,
  room_id: string,
  member: {
    id: string,
    room_session_id: string,
    room_id: string,
    talking: boolean
  }
}

member.updated

member.updated: undefined

A property of a member of the room has been updated. The event handler receives objects of type:

type _ = {
  room_session_id: string,
  room_id: string,
  member: {
    updated: Array<string>,
    room_session_id: string,
    id: string,
    room_id: string,
    type: string
  }
}

In particular, 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:

{
  "room_session_id": "35e85417-09cf-4b07-8f21-d3c16809e5a8",
  "room_id": "aae25822-892c-4832-b0b3-34aac3a0e8d1",
  "member": {
    "updated": ["visible", "video_muted"],
    "room_session_id": "35e85417-09cf-4b07-8f21-d3c16809e5a8",
    "visible": false,
    "video_muted": true,
    "id": "4a829c9f-812c-49d7-b272-e3077213c55e",
    "room_id": "aae25822-892c-4832-b0b3-34aac3a0e8d1",
    "type": "member"
  }
}

memberList.updated

memberList.updated: undefined

The set of members or one or more properties of a member have changed. The event handler receives an object e with the updated, full list of members in the room as e.members.


playback.ended

playback.ended: undefined

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: undefined

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: undefined

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: undefined

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: undefined

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: undefined

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.joined

room.joined: undefined

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). The objects received by the event handler have the following type:

type _ = {
  room_session: {
    room_session_id: string,
    logos_visible: boolean,
    members: Array<{
      visible: boolean,
      room_session_id: string,
      input_volume: number,
      id: string,
      input_sensitivity: number,
      output_volume: number,
      audio_muted: boolean,
      on_hold: boolean,
      name: string,
      deaf: boolean,
      video_muted: boolean,
      room_id: string,
      type: string
    }>,
    blind_mode: boolean,
    recording: boolean,
    silent_mode: boolean,
    name: string,
    hide_video_muted: boolean,
    locked: boolean,
    meeting_mode: boolean,
    room_id: string,
    event_channel: string
  },
  call_id: string,
  member_id: string
}

room.updated

room.updated: undefined

The properties of the room have been updated. The event handler receives objects of type:

type _ = {
  room_session_id: string,
  room_id: string,
  room: {
    updated: Array<string>,
    room_session_id: string,
    room_id: string,
  }
}

In particular, 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, say hide_video_muted has been updated. The received object will be:

{
  "room_session_id": "fc695445-7f93-4597-b705-c0db6c21096a",
  "room_id": "aae25822-892c-4832-b0b3-34aac3a0e8d1",
  "room": {
    "updated": [ "hide_video_muted" ],
    "room_session_id": "fc695445-7f93-4597-b705-c0db6c21096a",
    "room_id": "aae25822-892c-4832-b0b3-34aac3a0e8d1",
    "hide_video_muted": true
  }
}