AI Agent Component Spec
AI Agent Component Spec
Overview
This guide shows you how to display the active call interface usingCometChatOngoingCall. The component provides a complete call experience with video display, mic/camera controls, and participant management.
Time estimate: 10 minutesDifficulty: Intermediate
Prerequisites
- React.js setup complete
- Voice/Video calling configured
- CometChat Calls SDK installed
Steps
Step 1: Import the Component
Step 2: Render the Ongoing Call
The component automatically connects to the active call session:
Step 3: Handle Call End Events
Listen for when the call ends to update your UI:Step 4: Configure Call Settings
Customize the call experience withCallSettingsBuilder:
Complete Example
Full implementation with call flow integration:Advanced Configuration
Advanced Configuration
Styling
Customize the call screen appearance:
CSS Customization
Common Issues
| Issue | Solution |
|---|---|
| Black screen | Check camera permissions and ensure callSettingsBuilder is configured correctly |
| No audio | Verify microphone permissions and check setIsAudioOnlyCall setting |
| Call not connecting | Ensure the session ID matches between caller and callee |
| Controls not showing | Set enableDefaultLayout(true) in call settings |