Quick Reference
- Settings class:
CometChat.VirtualBackground - Apply via:
CallSettingsBuilder.setVirtualBackground(virtualBackground) - Toggle UI:
CallSettingsBuilder.showVirtualBackgroundSetting(true|false) - Runtime control:
CometChat.CallController.getInstance()→setBackgroundBlur(),setBackgroundImage(),openVirtualBackground() - Requires: Ringing or Call Session setup
Implementation
Once you have decided to implement Ringing or Call Session calling and followed the steps to implement them. Just few additional methods will help you quickly implement virtual background. Please make sure your callSettings is configured accordingly for Ringing or Call Session.Settings
TheCallSettingsclass allows you to customise the overall calling experience. The properties for the call/conference can be set using the CallSettingsBuilder class. This will eventually give you and object of the CallSettings class which you can pass to the startCall() method to start the call.
The mandatory parameters that are required to be present for any call/conference to work are:
- sessionId - The unique session Id for the call/conference session.
For the use case where you wish to align your own custom buttons and not use the default layout provided by CometChat, you can embed the buttons in your layout and use the below methods to perform the corresponding operations:
Open Virtual Background Setting
You can use theopenVirtualBackground() method to open the virtual background settings pop-up.
- JavaScript
- TypeScript
Set Background Blur
You can use thesetBackgroundBlur() method to apply background blur on the video stream. This method accepts a number which decides the level of blur to be applied.
- JavaScript
- TypeScript
Set Background Image
You can use thesetBackgroundImage()method to set the background image. This method takes either a URL or file Object & sets that image as the background.
- JavaScript
- TypeScript
Virtual Background Settings
TheVirtualBackground Class is the required in case you want to change how the end user can use virtual background features in a video call. You need to pass the Object of the VirtualBackground Class in the setVirtualBackground() method of the CallSettingsBuilder.
Best Practices
Best Practices
Troubleshooting
Troubleshooting
Next Steps
Video View Customisation
Customize the main video container layout.
Recording
Record calls for playback.
Presenter Mode
Enable screen sharing and presenter mode.
Custom CSS
Customize the calling UI appearance.