Skip to main content

Set vertical layout

If you choose vertical layout (layoutType = 1) when using the Media Push RESTful API, you should be familiar with the following guidelines.

Large window

  • Specify a user ID: You can use the maxResolutionUid parameter to specify a user ID to display in the large window when you start pushing video media streams. If that user stops pushing or exits the channel, the window initially displays the last frame of the user's video. Once the layout refreshes, the window displays the background color of the canvas.
  • Let volume determine the user dynamically: If no user ID is specified, every time the layout is refreshed, the user with the loudest volume displays in the large window.

Small windows

Users display in the small windows in the order they join the channel. If a user in a small window exits the channel, the next user in order moves to the window of the user, and this process is repeated for the other users below them.

Empty windows

When the users in the small windows send only audio streams or stop publishing video streams for some reason, what displays is determined as follows:

  • If the defaultPlaceholderImageUrl field is set, the default background image is displayed.
  • If the defaultPlaceholderImageUrl field is not set, the window initially displays the last frame of the user's video (if available). Once the layout refreshes, the window displays the background color of the canvas.
These options also apply if a window is empty because there are not enough users in the channel to fill it.

Screen layouts

The layout configurations vary based on the number of users in the channel, as shown in the following figures:

Number of peopleLayout effectDescription
11645770574489If maxResolutionUid is not set, the layout style of 1 person is full screen.If maxResolutionUid is set, but the user has not joined the channel, other users are displayed on the right side according to the layout for 1-5 people when they join the channel.
1-51645770589461You can specify a user for the large window; the other users in the channel are displayed in windows 2-5 in chronological order of their joining the channel.The width of the small windows on the right is one-fifth of the total width, and the height is one-fourth of the total height.
6-71645770764144You can specify a user for the large window; the other users in the channel are displayed in windows 2-7 in chronologicalorder of their joining the channel.The width of the small windows on the right is one-seventh of the total width, and the height is one-sixth of the total height.
8-91645770860768You can specify a user for the large window; the other users in the channel are displayed in windows 2-9 in chronological order of order of their joining.The width of the small windows on the right is one-ninth of the total width, and the height is one-eighth of the total height.
10-171645777289380You can specify a user for the large window; the other users in the channel are displayed in windows 2-17 in chronological order of their joining the channel.The width of the small windows on the right is one-tenth of the total width, and the height is one-eighth of the total height.
18-331645777324965You can specify a user for the large window; the other users in the channel are displayed in windows 2-33 in tchronological order of their joining the channel.The width of the small windows on the right is one-tenth of the total width, and the height is one-eighth of the total height.
34-491645777336303You can specify a user for the large window; the other users in the channel are displayed in windows 2-49 in chronological order of joining the channel.The width of the small windows on the right is one-fourteenth of the total width, and the height is one-twelfth of the total height.
vundefined