setLayout

View as Markdown

setLayout

  • setLayout(params): Promise<void>

Sets a layout for the room. You can obtain a list of available layouts with getLayouts.

Parameters

params
object

Object containing the parameters of the method.

name
string

Name of the layout.

positions
VideoPositions

Positions to assign as soon as the new layout is set.

Returns

Promise<void>

Permissions

  • room.set_layout
  • room.set_position (if you need to assign positions)

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

Example

Set the 6x6 layout:

1await roomSession.setLayout({ name: "6x6" });