Skip to navigation

RoomScreenShare

Deprecated
View as MarkdownOpen in Claude
Deprecated

Use RoomSessionDevice instead.

Properties

active

• Readonly active: boolean

Whether the connection is currently active.


cameraId

• Readonly cameraId: null | string

The id of the video device, or null if not available.


cameraLabel

• Readonly cameraLabel: null | string

The label of the video device, or null if not available.


localAudioTrack

• Readonly localAudioTrack: null | MediaStreamTrack

Provides access to the local audio MediaStreamTrack.


localStream

• Readonly localStream: undefined | MediaStream

Provides access to the local MediaStream.


localVideoTrack

• Readonly localVideoTrack: null | MediaStreamTrack

Provides access to the local video MediaStreamTrack.


memberId

• Readonly memberId: string

The id of the current member within the room.


microphoneId

• Readonly microphoneId: null | string

The id of the audio input device, or null if not available.


microphoneLabel

• Readonly microphoneLabel: null | string

The label of the audio input device, or null if not available.


remoteStream

• Readonly remoteStream: undefined | MediaStream

Provides access to the remote MediaStream.


roomId

• Readonly roomId: string

The unique identifier for the room.


roomSessionId

• Readonly roomSessionId: string

The unique identifier for the room session.

Methods

audioMute

▸ audioMute(): Promise<void>

Puts the microphone on mute. The other participants will not hear audio from the muted device anymore.

Returns

Promise<void>

Permissions

  • room.self.audio_mute

You need to specify the permissions when creating the Video Room Token on the server side.

Example

Muting the microphone:

await roomdevice.audioMute();

audioUnmute

▸ audioUnmute(): Promise<void>

Unmutes the microphone if it had been previously muted.

Returns

Promise<void>

Permissions

  • room.self.audio_unmute

You need to specify the permissions when creating the Video Room Token on the server side.

Example

Unmuting the microphone:

await roomdevice.audioUnmute();

join

▸ join(): Promise<void>

Joins this device to the room session.

Returns

Promise<void>


leave

▸ leave(): Promise<void>

Detaches this device from the room session.

Returns

Promise<void>


setInputSensitivity

▸ setInputSensitivity(params): Promise<void>

Sets the input level at which the participant is identified as currently speaking.

Parameters

NameTypeDescription
paramsObject
params.valuenumberDesired sensitivity from 0 (lowest sensitivity, essentially muted) to 100 (highest sensitivity). The default value is 30.

Returns

Promise<void>

Permissions

  • room.self.set_input_sensitivity

You need to specify the permissions when creating the Video Room Token on the server side.

Example

await roomdevice.setInputSensitivity({ value: 80 });

setInputVolume

▸ setInputVolume(params): Promise<void>

Sets the input volume level (e.g. for the microphone).

Parameters

NameTypeDescription
paramsObject-
params.volumenumberDesired volume. Values range from -50 to 50, with a default of 0.

Returns

Promise<void>

Permissions

  • room.self.set_input_volume

You need to specify the permissions when creating the Video Room Token on the server side.

Example

await roomdevice.setMicrophoneVolume({ volume: -10 });

setMicrophoneVolume

▸ setMicrophoneVolume(params): Promise<void>

Deprecated. Use setInputVolume instead.

Parameters

NameType
paramsObject
params.volumenumber

Returns

Promise<void>


updateCamera

▸ updateCamera(constraints): Promise<void>

Replaces the current camera stream with the one coming from a different device.

Parameters

NameTypeDescription
constraintsMediaTrackConstraintsSpecify the constraints that the device should satisfy. See MediaTrackConstraints.

Returns

Promise<void>

Example

Replaces the current camera stream with the one coming from the specified deviceId:

await screenShareObj.updateCamera({
deviceId: "/o4ZeWzroh+8q0Ds/CFfmn9XpqaHzmW3L/5ZBC22CRg=",
});

updateMicrophone

▸ updateMicrophone(constraints): Promise<void>

Replaces the current microphone stream with the one coming from a different device.

Parameters

NameTypeDescription
constraintsMediaTrackConstraintsSpecify the constraints that the device should satisfy. See MediaTrackConstraints.

Returns

Promise<void>

Example

Replaces the current microphone stream with the one coming from the specified deviceId:

await screenShareObj.updateMicrophone({
deviceId: "/o4ZeWzroh+8q0Ds/CFfmn9XpqaHzmW3L/5ZBC22CRg=",
});

videoMute

▸ videoMute(): Promise<void>

Puts the video on mute. Participants will see a mute image instead of the video stream.

Returns

Promise<void>

Permissions

  • room.self.video_mute

You need to specify the permissions when creating the Video Room Token on the server side.

Example

Muting the camera:

await roomdevice.videoMute();

videoUnmute

▸ videoUnmute(): Promise<void>

Unmutes the video if it had been previously muted. Participants will start seeing the video stream again.

Returns

Promise<void>

Permissions

  • room.self.video_unmute

You need to specify the permissions when creating the Video Room Token on the server side.

Example

Unmuting the camera:

await roomdevice.videoUnmute();