-
Notifications
You must be signed in to change notification settings - Fork 359
Layout
This wiki explains the layout of remote videos in the SDK.
Developer can update the remote videos' layout type for the current meeting from the 5 layout types available options for the specific participant/device only.
To know about changeVideoLayout
APIs in detail, please visit → https://webex.github.io/webex-js-sdk/api/
Uses below API to change layout type for the current meeting for the specific participant/device only
changeVideoLayout(layoutType, renderInfo = {})
Asynchronous | Yes |
Parameters | layoutType, renderInfo |
Returns | promise |
layoutType
possible values user can pass ['Single', 'ActivePresence', 'Prominent', 'Equal', 'OnePlusN'].
renderInfo
preferred dimensions for the remote main and content streams (server can ignore it)
const layoutType = 'Equal';
const renderInfo = {
"main": {
"width": "1920",
"height": "1080"
}
};
meeting.changeVideoLayout(layoutType, renderInfo);
There are 5 layout types available in meetings, which are
- Single
- ActivePresence
- Prominent
- Equal
- OnePlusN
We can check that in our public Kitchen Sink app.
Types with screenshots are added below -
![image2022-10-11_16-7-58](https://user-images.githubusercontent.com/3918217/201982733-a263930e-78f8-4beb-b58f-3cc07c2aadee.png)
![image2022-10-11_16-8-34](https://user-images.githubusercontent.com/3918217/201982808-9d85ca70-8902-4287-9f3b-bbaf36ad2dc5.png)
![image2022-10-11_16-8-23](https://user-images.githubusercontent.com/3918217/201982863-95d0de1a-5a03-4fcf-9bf4-f59e39395916.png)
![image2022-10-11_16-8-14](https://user-images.githubusercontent.com/3918217/201982982-05afbe38-12b5-4431-b4ab-285aba3ac349.png)
Screenshots are added from our Kitchen Sink app.
The possible errors that one could get from the APIs listed below,
API | Error | How to fix it? |
---|---|---|
changeVideoLayout | Meeting:index#changeVideoLayout --> cannot change video layout, you are not recieving any video/share stream | Need to recieve any video/share stream |
changeVideoLayout | Meeting:index#changeVideoLayout --> cannot change video layout, invalid layoutType recieved. | Please choose the layoutType from above supported options |
Caution
- Introducing the Webex Web Calling SDK
- Core Concepts
- Quickstart guide
- Authorization
- Basic Features
- Advanced Features
- Introduction
- Quickstart Guide
- Basic Features
- Advanced Features
- Multistream
- Migrating SDK version 1 or 2 to version 3