Video View Customisation
This section will guide you to customise the main video container.
Implementation
Once you have decided to implement Default Calling or Direct Calling calling and followed the steps to implement them. Just few additional methods will help you quickly customize the main video container.
Please make sure your callSettings is configured accordingly for Default Calling or Direct Calling.
Main Video Container Setting
The MainVideoContainerSetting
Class is the required in case 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
.
setMainVideoAspectRatio(_ aspectRatio: CallSettings.AspectRatio) | This method is used to set the aspect ratio of main video. The default value is contain. Possible Values: 1. CallSettings. AspectRatio.CONTAIN 2. CallSettings. AspectRatio.COVER |
setFullScreenButtonParams(_ visibility: Bool, _position: CallSettings.Position?) | This method is used to set the position & visibility parameter of the full screen button. By default the full screen button is visible in the . BOTTOM_RIGHT position. Possible Values for POSITION: 1. CallSettings. Position.TOP_LEFT 2. CallSettings. Position. TOP_RIGHT 3. CallSettings. Position. BOTTOM_LEFT 4. CallSettings. Position. BOTTOM_RIGHT Possible Values for VISIBILITY: 1. true 2. false |
setNameLabelParams(_ visibility: Bool, _ position: CallSettings.Position?, _ backGroundColor:String?) | This method is used to set the position, visibility & background color of the name label. By default the name label is visible in the .BOTTOM_LEFT position with a background-color #333333 Possible Values for POSITION: 1. CallSettings. Position.TOP_LEFT 2. CallSettings. Position. TOP_RIGHT 3. CallSettings. Position. BOTTOM_LEFT 4. CallSettings. Position. BOTTOM_RIGHT Possible Values for VISIBILITY: 1. true 2. false |
setZoomButtonParams(_ visibility: Bool, _position: CallSettings.Position?) | This method is used to set the position, visibility of the zoom button. By default the zoom button is visible in the . BOTTOM_RIGHT position. Possible Values for POSITION: 1. CallSettings. Position.TOP_LEFT 2. CallSettings. Position. TOP_RIGHT 3. CallSettings. Position. BOTTOM_LEFT 4. CallSettings. Position. BOTTOM_RIGHT Possible Values for VISIBILITY: 1. true 2. false |
setUserListButtonParams(_ visibility: Bool,_ position:CallSettings.Position?) | This method is used to set the position, visibility of the user list button. By default the user list button is visible in the bottom-right position. Possible Values for POSITION: 1. CallSettings. Position.TOP_LEFT 2. CallSettings. Position. TOP_RIGHT 3. CallSettings. Position. BOTTOM_LEFT 4. CallSettings. Position. BOTTOM_RIGHT Possible Values for VISIBILITY: 1. true 2. false |
Example
- Swift
let videoSettings = MainVideoContainerSetting()
videoSettings.setVideoStreamParams(.DEFAULT)
videoSettings.setNameLabelParams(true, .BOTTOM_LEFT, "#333333")
videoSettings.setZoomButtonParams(true,.BOTTOM_RIGHT)
videoSettings.setFullScreenButtonParams(true,.BOTTOM_RIGHT)
videoSettings.setUserListButtonParams(true,.BOTTOM_RIGHT)