You need to pass the CSS string in CallSettings in setCustomCSS.
JavaScript
var callsettings = new CometChat.CallSettingsBuilder().setSessionID(sessionID).setIsAudioOnlyCall(false).showEndCallButton(true).enableDefaultLayout(true).showScreenShareButton(true).showMuteAudioButton(true).showEndCallButton(true).showScreenShareButton(true).showPauseVideoButton(true).setCustomCSS(CSS). //HERE.build();
Property
Description
Type
Value
setCustomCSS
Option to update the custom css for call screen
String
CSS
Common CSS Classes
There are a few common classes used for different modes in the call screen
custom-main-container
This is the most outer component of the calling component.
CSS
//Default value is{height: 100vh;width: 100vw;}
custom—tile-main-call-container
This the Container of the main video and till list or a local stream component.
CSS
#Default style{height: 100%;display: flex;flex: 1;flex-direction: row; //if opened in mobile and in portrait mode its value is columnjustify-content: flex-start;}
custom-name
This class is passed in user name text in all components.
Tile mode
custom-tile-main-video-container This is the main video container. It is the div that has the main speaker video, for tile mode.
CSS
#Default value {display: flex;flex: 1 1;height: 93%;margin-left: 5%;margin-right: 5%;margin-bottom: 5%;position: relative;justify-content: center;background-color: #000;border-radius: 20px;}#Default CSS for mobile in portrait mode{display: flex;width: 90%;height: 63%;margin-left: 5%;margin-right: 5%;margin-bottom: 5%;margin-top: 5%;position: relative;justify-content: center;background-color: #000;}
custom-tile-list-container This is the div that contains a list of tiles.
CSS
#Default value{width: 12%;padding-left: 0%;display: flex;align-items: center;flex-direction: column;padding-top: 0.5%;overflow-y: auto;}#Default CSS for mobile in portrait mode{width: 100vw;height: 20%;padding-left: 1%;padding-right: 1%;padding-top: 0.5%;display: flex;align-items: center;flex-direction: row;overflow-x: auto;}
custom-tile-container The div is used for tile video.
CSS
Default value {width: 90%;position: relative;aspect-ratio: 1;background-color: #000000;margin-bottom: 10px;border-radius: 0.7rem;}Default CSS for mobile{width: 15vh;position: relative;margin-left: 10px;}
SpotLight Mode
custom-spotlight-main-video-container This is the main video container it the div which has the main speaker video, for spotlight mode.
CSS
#Default value{width: 12%;padding-left: 0%;display: flex;align-items: center;flex-direction: column;padding-top: 0.5%;overflow-y: auto;}#Default CSS for mobile in portrait mode {width: 100vw;height: 20%;padding-left: 1%;padding-right: 1%;padding-top: 0.5%;display: flex;align-items: center;flex-direction: row;overflow-x: auto;}
custom-local-spotlight-stream-container This div contains the local video of a user in spotlight mode.
CSS
Default value{width: 12vw;}
Bottom Buttons
custom-button-bar This is the container of all the buttons in calling.
It is recommended to not pass CSS of other classes which are not listed here as it may cause some UI issues. Also resizing of the grid container is not allowed as it may affect the layout of grid mode.