Overview
TheSoundManager is a helper class responsible for managing and playing various types of audio in the CometChat V6 UI Kit. This includes sound events for incoming and outgoing messages and calls.
Methods
Play Sound
The SoundManager plays pre-defined or custom sounds based on user interactions with the chat interface.- Dart
Stop Sound
Stop any sound currently being played:- Dart
Usage
Play a custom sound:- Dart
Sound Enum Reference
| Sound | Asset |
|---|---|
| incomingMessage | assets/sound/incoming_message.wav |
| outgoingMessage | assets/sound/outgoing_message.wav |
| incomingMessageFromOther | assets/sound/incoming_message.wav |
| outgoingCall | assets/sound/outgoing_call.wav |
| incomingCall | assets/sound/incoming_call.wav |
In V6, the
CometChatConversations widget provides disableSoundForMessages and customSoundForMessages properties to control sound behavior at the widget level.