Quick Reference - Customize the main video container:
Overview
This section guides you through customizing the main video container in your call UI. Once you have decided to implement Ringing or Call Session calling and followed the steps to implement them, a few additional methods will help you quickly customize the main video container. Please make sure your callSettings is configured accordingly for Ringing or Call Session.Main Video Container Setting
TheMainVideoContainerSetting class is required when you want to customise the main video view. You need to pass the object of the MainVideoContainerSetting class in the setMainVideoContainerSetting() method of the CallSettingsBuilder.
| Setting | Description |
|---|---|
setMainVideoAspectRatio(aspectRatio: string) | Sets the aspect ratio of main video. Default: contain. Possible Values: ASPECT_RATIO_CONTAIN, ASPECT_RATIO_COVER |
setFullScreenButtonParams(position: string, visibility: boolean) | Sets the position & visibility of the full screen button. Default: visible in bottom-right position. |
setNameLabelParams(position: string, visibility: boolean, backgroundColor: string) | Sets the position, visibility & background color of the name label. Default: visible in bottom-left with background-color #333333 |
setZoomButtonParams(position: string, visibility: boolean) | Sets the position, visibility of the zoom button. Default: visible in bottom-right position. |
setUserListButtonParams(position: string, visibility: boolean) | Sets the position, visibility of the user list button. Default: visible in bottom-right position. |
POSITION_TOP_LEFT, POSITION_TOP_RIGHT, POSITION_BOTTOM_LEFT, POSITION_BOTTOM_RIGHT
Example:
Best Practices
Best Practices
- Avoid placing multiple buttons in the same corner position to prevent overlapping controls
- Use
ASPECT_RATIO_CONTAINfor most use cases to ensure the full video frame is visible - Test on multiple screen sizes to ensure consistent experience
Troubleshooting
Troubleshooting
- Custom settings not applied: Ensure you pass the
MainVideoContainerSettingobject tosetMainVideoContainerSetting()before calling.build() - Buttons not visible: Check that the
visibilityparameter is set totrueandenableDefaultLayout(true)is set
Next Steps
Call Session
Start and manage call sessions with full configuration options
Recording
Record call sessions for playback and compliance
Presenter Mode
Enable screen sharing and presenter layouts in calls
Ringing
Implement a complete calling experience with incoming and outgoing call UI