AI Integration Quick Reference
AI Integration Quick Reference
Overview
CometChatAudioBubble renders an audio attachment with inline playback. It is self-extracting: pass the SDK message and the bubble derives the audio attachment(s) and caption itself, reading alignment and localization from hooks, so it works standalone. It shows play/pause controls, a seekable progress bar, elapsed/total time, and a download control.
Live Preview — interact with the audio bubble.Open in Storybook ↗
Usage
Props
message
The audio message. The bubble extracts attachments and caption from it. Required.| Type | CometChat.MediaMessage |
| Required | Yes |
alignment
Override incoming/outgoing alignment. Defaults to sender-vs-logged-in-user.| Type | "left" | "right" |
| Default | derived |
textFormatters
Text formatters applied to the caption (mentions, URLs).| Type | CometChatTextFormatter[] |
| Default | undefined |
className
Additional CSS class applied to the root element.| Type | string |
| Default | undefined |
CSS Selectors
| Target | Selector |
|---|---|
| Root | .cometchat-audio-bubble |
| Sender / receiver | .cometchat-audio-bubble--sender / .cometchat-audio-bubble--receiver |
| Play button | .cometchat-audio-bubble__play-button |
| Pause button | .cometchat-audio-bubble__pause-button |
| Progress (foreground) | .cometchat-audio-bubble__progress-fg |
| Time | .cometchat-audio-bubble__time |
| Download button | .cometchat-audio-bubble__download-button |
| Caption | .cometchat-audio-bubble__caption |
Next Steps
Audio Plugin
Plugin behavior, context menu, and conversation preview
File Bubble
Render generic file attachments
Message Bubble
The wrapper that hosts bubble content
Theming
Customize colors, fonts, and spacing