promote

View as Markdown

promote

  • promote(params): Promise<void>

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

Parameters

params
object

Object containing the parameters of the method.

memberId
string

Id of the audience participant to promote.

joinAudioMuted
boolean

Force the member’s audio to be muted right after the promotion.

joinVideoMuted
boolean

Force the member’s video to be muted right after the promotion.

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.

meta
Record<string, unknown>

Metadata to assign to the member.

permissions
string[]

List of permissions to grant when the Audience participant will become a Member.

Returns

Promise<void>

Permissions

  • room.member.promote

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

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});