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 sdk
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 Eyeson from 'eyeson-node';
const eyeson = new Eyeson();
const user = await eyeson.getUser('ACCESS_KEY');
await user.setLayout({ layout: 'auto' });