Skip to main content

Layout

The meeting participants will be presented in an equally distributed tiled video layout where Eyeson takes care to always update the stream depending on the number of users. However in some cases you might want to assign specific users to a video position. To switch back to auto layout you can send layout auto with no further options.

The custom Eyeson podium layout can be set to one, two, four or nine participants. This is controlled by the users parameter: Provide a user identifier and the specific user will be placed on this position. Use an empty string "" to assign no-participant and keep a spot free. This free spots will be filled if you choose the auto layout. Additionally you can choose to activate voice detection that will replace the spots with participants that have said something recently. If you choose layout custom the free spots will not be filled and you can use them to show some background using the media inject feature.

Besides layouts that are selected by the number of users there are some named layouts that can be applied. Those will not provide equal distributed position but show some participants in an expanded view.

Note that layouts are not available when using the SFU mode, so set the room configuration properly or take care to have more than two participants.

POST /rooms/<access_key>/layout
RESPONSES 200 OK, 400 BAD REQUEST, 404 NOT FOUND, 405 METHOD NOT ALLOWED, 410 GONE
ParametersTypeDescription
layoutString (optional)Value 'auto' or 'custom'. Default: custom
nameString (optional)Use a named layout. Current layouts are: one, two, four, six, nine, and the presentation layouts present-lower-3, present-upper-6, present-two-upper-6, present-upper-right-9 and present-vertical-9. See the list below for more examples.
mapString or List (optional)Define a custom layout. Max. 10 boxes. JSON formatted string or list. For example "[[0,0,640,360,\"contain\"],[...]]". See custom layout map API for more details.
usersList (optional)List of podium user_ids, a custom layout position identifier or an empty string for an empty spot.
show_namesBoolean (optional)Show display names in video. Default: true
voice_activationBoolean (optional)Fill empty spots by voice detected activation.
audio_insertString (optional)Show audio insert ('enabled', 'disabled' or 'audio_only'). Default: audio_only
audio_insert_position[x]Number (optional)X position value of the audio insert.
audio_insert_position[y]Number (optional)Y position value of the audio insert.
Heads-up!

If you already set a user_id in the users list of a client that is not registered at that time, it will not work for that client! You simply need to apply the layout again after the client is registered.

Example

Using curl to set the "four" layout and assign 4 participants by their user_id to each position.

$ curl -X POST \
-d "layout=custom" \
-d "name=four" \
-d "users[]=USER_ID_A" \
-d "users[]=USER_ID_B" \
-d "users[]=USER_ID_C" \
-d "users[]=USER_ID_D" \
https://api.eyeson.team/rooms/<ACCESS_KEY>/layout

Reset to auto layout.

$ curl -X POST \
-d "layout=auto" \
https://api.eyeson.team/rooms/<ACCESS_KEY>/layout

You can find more information in the examples for layouts.

List of predefined layouts

Here's an extract of layouts that can be set via the name parameter. The addition *-aspect-fit enables "object-fit: contain" for the dedicated presentation spot. That means the video content is resized to fit into the podium spot while maintaining its aspect ratio.

PreviewLayout nameAspect-fit layout nameAspect-fit related spots
oneaspect-fit1
two-
four-
six-
nine-
present-lower-3present-lower-3-aspect-fit1
present-upper-6present-upper-6-aspect-fit1
present-two-upper-6present-two-upper-6-aspect-fit1, 2
present-upper-right-9present-upper-right-9-aspect-fit1
present-vertical-9present-vertical-9-aspect-fit1
present-lower-4-spacedpresent-lower-4-spaced-aspect-fit1
-present-four-upper-6-aspect-fit1, 2, 3, 4
mobile-center-8-
note

Widescreen has to be set via the room parameter options[widescreen] which is false by default.

If you can’t find a layout that suits your needs, please feel free to reach out to us.