CometChatCallActionHandler class
Handler for in-call control actions (mute, speaker, camera).
Every method has a default implementation that delegates to
NotificationVoipPlugin. Consumers extend this class and override
only the methods they need to intercept.
This handler is invoked when:
- The user toggles a control from the custom Flutter call screen.
- The app programmatically calls CometChatPushNotifications.toggleMute, CometChatPushNotifications.toggleSpeaker, or CometChatPushNotifications.toggleCamera.
Scope: In-call controls only. Accept, decline, and end actions
remain on the CometChatPushNotifications.onCallEvent stream.
Example — intercept mute to control a WebRTC audio track:
class MyCallActionHandler extends CometChatCallActionHandler {
final WebRtcEngine _engine;
MyCallActionHandler(this._engine);
@override
Future<void> onMuteToggled(String sessionId, bool isMuted) async {
_engine.muteLocalAudio(isMuted);
await super.onMuteToggled(sessionId, isMuted);
}
}
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onCameraToggled(
String sessionId, bool isOn) → Future< void> - Called when the user toggles the camera (video calls).
-
onMuteToggled(
String sessionId, bool isMuted) → Future< void> - Called when the user toggles mute (from call screen UI or programmatically).
-
onSpeakerToggled(
String sessionId, bool isOn) → Future< void> - Called when the user toggles the speaker / audio route.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited