deaf

View as Markdown

deaf

  • deaf(params?): Promise<void>

Mutes the incoming audio. The affected participant will not hear audio from the other participants anymore. You can use this method to make deaf either yourself or another participant in the room.

Note that in addition to making a participant deaf, this will also automatically mute the microphone of the target participant (even if there is no audio_mute permission). If you want, you can then manually unmute it by calling audioUnmute.

Parameters

params
object

Object containing the parameters of the method.

memberId
string

Id of the member to affect. If omitted, affects the default device in the local client.

Returns

Promise<void>

Permissions

  • room.self.deaf: to make yourself deaf.
  • room.member.deaf: to make deaf a remote member.

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

Examples

Making yourself deaf:

1await roomSession.deaf();

Making another participant deaf:

1const id = "de550c0c-3fac-4efd-b06f-b5b8614b8966"; // you can get this from getMembers()
2await roomSession.deaf({ memberId: id });