promote

View as Markdown

promote

  • promote(params): Promise<void>

Promotes a participant from “audience” to “member”. See demote.

Parameters

NameTypeDescription
paramsObject-
params.memberIdstringId of the audience participant to promote.
params.joinAudioMuted?booleanForce the member’s audio to be muted right after the promotion.
params.joinVideoMuted?booleanForce the member’s video to be muted right after the promotion.
params.mediaAllowed?"all" | "audio-only" | "video-only"Specifies the media that the client will be allowed to send. A member participant can always receive all media.
params.meta?Record``<string, unknown>Metadata to assign to the member.
params.permissions?string[]List of permissions to grant when the Audience participant will become a Member.

Returns

Promise<void>

Example

1await roomSession.promote({
2 memberId: "de550c0c-3fac-4efd-b06f-b5b8614b8966",
3 mediaAllowed: "all",
4 permissions: [
5 "room.self.audio_mute",
6 "room.self.audio_unmute",
7 "room.self.video_mute",
8 "room.self.video_unmute",
9 "room.list_available_layouts",
10 ],
11});