AI Integration Quick Reference
AI Integration Quick Reference
Overview
CometChatVoiceNoteBubble renders audio messages that were recorded via the composer’s voice recorder. It renders using the CometChatAudioBubble waveform player (documented below), giving voice notes a compact play/pause + waveform UI.
This bubble renders whenever an audio message carries audioType: "voice_note" in its metadata. Voice notes are always standalone — they never participate in batch grid layouts or multi-attachment grouping.
Routing logic. The audio plugin automatically routes messages based on metadata:
audioType: "voice_note"→CometChatVoiceNoteBubble(this component)- No
audioType(attached audio files) → Audio Bubble (CometChatAudiosBubble)
- Waveform playback — play/pause, seekable progress bar, elapsed/total time
- Always standalone — voice notes are never grouped or batched with other messages
- Metadata-driven — only used when the message has
audioType: "voice_note"in metadata - Waveform player — renders with the
CometChatAudioBubbleplayer and its CSS selectors
Live Preview — interact with the voice note bubble.Open in Storybook ↗
Usage
How Voice Notes Are Tagged
When a user records audio via the composer’s voice recorder, the UIKit stampsaudioType: "voice_note" into the message metadata before sending:
CometChatAudiosBubble) instead.
Props
message
The audio message (voice note). The bubble renders it with theCometChatAudioBubble waveform player. Required.
alignment
Override incoming/outgoing alignment. Defaults to sender-vs-logged-in-user.textFormatters
Text formatters applied to any caption.className
Additional CSS class applied to the root element.The Waveform Player
Voice notes render with theCometChatAudioBubble waveform player — a compact single-audio player with play/pause controls, a waveform progress bar, elapsed/total time, and a download control. It self-extracts the audio attachment from the message, so it can also be used standalone to render a single audio waveform.
message (required), alignment, and className.
Attached audio files (not voice notes) render as stacked player cards via
CometChatAudiosBubble — see the Audio Bubble page.CSS Selectors
The voice note renders with theCometChatAudioBubble waveform player, which uses these selectors:
Next Steps
Audio Bubble
Batch-aware bubble for attached audio files
Message Composer
Voice recorder and multi-attachment staging
Image Bubble
Batch-aware image bubble with grid layouts
Message List
Multi-attachment batch grouping in the list