How to set the Layout Automatically
The standard layouts in MCU mode are one
, two
, four
, six
, and nine
, each corresponding to the number of video spots available.
The video stream layout updates automatically based on the number of active participants.
To enable auto layout, set layout="auto"
in your request without defining specific users.
This requires an access_key
for the video call, which is provided when you initialize a session.
- bash
- shell
- node
export ACCESS_KEY=123...
$ curl -X POST \
-d "layout=auto" \
"https://api.eyeson.team/rooms/$ACCESS_KEY>/layout"
SET ACCESS_KEY=123...
curl -X POST ^
-d "layout=auto" "https://api.eyeson.team/rooms/%ACCESS_KEY%/layout"
import fetch from 'node-fetch';
const ACCESS_KEY = '123...';
const url = 'https://api.eyeson.team/rooms/' + ACCESS_KEY + '/layout';
await fetch(url, { method: 'POST', body: 'layout=auto' });