RoomSessionMember
Represents a member of a room session. You receive instances of this type by listening to room events, for example on a RoomSession object.
The state of RoomSessionMember objects, for example member.visible, is
immutable. When you receive instances of RoomSessionMember from event
listeners, the state of the member always refers to that specific point in
time and remains fixed for the whole lifetime of the object.
Example
Getting a RoomSessionMember instance when a user joins a RoomSession:
Properties
id
Unique id of this member.
roomId
Id of the room associated to this member.
roomSessionId
Id of the room session associated to this member.
name
Name of this member.
type
Type of this video member. Can be 'member', 'screen', or 'device'.
parentId
Id of the parent video member, if it exists.
requestedPosition
Position requested for this member in the layout. This may differ from currentPosition if the requested position is not currently available.
currentPosition
Current position of this member in the layout.
meta
Metadata associated to this member.
audioMuted
Whether the outbound audio is muted (e.g., from the microphone).
videoMuted
Whether the outbound video is muted.
deaf
Whether the inbound audio is muted.
visible
Whether the member is visible.
inputVolume
Input volume (e.g., of the microphone). Values range from -50 to 50.
outputVolume
Output volume (e.g., of the speaker). Values range from -50 to 50.
inputSensitivity
Input level at which the participant is identified as currently speaking. The scale goes from 0 (lowest sensitivity, essentially muted) to 100 (highest sensitivity).
handraised
Whether the member’s hand is raised.
talking
Whether the member is currently talking.
Methods
audioMute
▸ audioMute(): Promise<void>
Mutes the outbound audio for this member (e.g., the one coming from a microphone). The other participants will not hear audio from the muted participant anymore.
Returns
Promise<void>
Example
In this example, we mute the audio of the member when they join the room.
This example assumes that you already have a RoomSession active
and members are joining the room.
audioUnmute
▸ audioUnmute(): Promise<void>
Unmutes the outbound audio for this member (e.g., the one coming from a microphone) if it had been previously muted.
Returns
Promise<void>
Example
In this example, we mute the audio of the member when they join the room and
unmute it after 5 seconds.
This example assumes that you already have a RoomSession active
and members are joining the room.
remove
▸ remove(): Promise<void>
Removes this member from the room.
Returns
Promise<void>
Example
In this example, we remove the member from the room when they join the room after 5 seconds.
This example assumes that you already have a RoomSession active
and members are joining the room.
setDeaf
▸ setDeaf(value): Promise<void>
Mutes or unmutes the inbound audio for the member (e.g., the one played through this member’s speakers). When the inbound audio is muted, the affected participant will not hear audio from the other participants anymore.
Parameters
value
Whether to mute the audio.
Returns
Promise<void>
Example
In this example, we mute the audio of the member when they join the room.
This example assumes that you already have a RoomSession active
and members are joining the room.
setInputSensitivity
▸ setInputSensitivity(params): Promise<void>
Sets the input level at which the participant is identified as currently speaking.
Parameters
params
Object containing the parameters of the method.
value
Desired sensitivity from 0 (lowest sensitivity, essentially muted) to 100 (highest sensitivity).
Returns
Promise<void>
Example
In this example, we set the input sensitivity of the member when they join the room.
This example assumes that you already have a RoomSession active
and members are joining the room.
setInputVolume
▸ setInputVolume(params): Promise<void>
Sets the input volume for the member (e.g., the microphone input level).
Parameters
params
Object containing the parameters of the method.
volume
Desired volume. Values range from -50 to 50.
Returns
Promise<void>
Example
In this example, we set the input volume of the member when they join the room.
This example assumes that you already have a RoomSession active
and members are joining the room.
setOutputVolume
▸ setOutputVolume(params): Promise<void>
Sets the output volume for the member (e.g., the speaker output level).
Parameters
params
Object containing the parameters of the method.
volume
Desired volume. Values range from -50 to 50.
Returns
Promise<void>
Example
In this example, we set the output volume of the member when they join the room.
This example assumes that you already have a RoomSession active
and members are joining the room.
videoMute
▸ videoMute(): Promise<void>
Mutes the outbound video for this member (e.g., the one coming from a webcam). Participants will see a mute image instead of the video stream.
Returns
Promise<void>
Example
In this example, we mute the video of the member when they join the room.
This example assumes that you already have a RoomSession active
and members are joining the room.
videoUnmute
▸ videoUnmute(): Promise<void>
Unmutes the outbound video for this member (e.g., the one coming from a webcam) if it had been previously muted. Participants will start seeing the video stream again.
Returns
Promise<void>
Example
In this example, we mute the video of the member when they join the room and
unmute it after 5 seconds. This example assumes that you already have a RoomSession active
and members are joining the room.
setRaisedHand
▸ setRaisedHand(params): Promise<void>
Sets the raised hand status for this member.
Parameters
params
Object containing the parameters of the method.
raised
Whether to raise or lower the hand. If omitted, the hand status is toggled to the opposite of the current status.
Returns
Promise<void>
Example
In this example, we raise the hand of a member when they join the room.
This example assumes that you already have a RoomSession active
and members are joining the room.