CallStore class abstract

Audio/video call management APIs for initiating, answering, rejecting, hanging up calls, group call management, and call history management.

CallStore Manages all audio/video call related operations, including initiating, answering, rejecting, hanging up, group call management, and call history management. Audio/video call functionality is implemented through CallStore for real-time audio/video interaction between users. CallStore provides a comprehensive set of APIs to manage the entire call lifecycle.

Key Features

  • Create Audio/Video Calls:Support initiating audio or video calls to one or multiple users, with configurable timeout, custom data, and other parameters
  • Answer/Reject Audio/Video Calls:When receiving an incoming call invitation, you can choose to answer or reject
  • Hang Up Audio/Video Calls:End the current ongoing audio/video call
  • Group Call Management:Support joining existing group calls or inviting other users to join during a call
  • Call History Management:Query recent call records (with pagination support), delete specified call records
  • Event-Driven Architecture:Provides event listeners for call started, call received, call ended, etc.
  • State Subscription:Real-time subscription to current call state, including participant list, volume information, network quality, etc.

Note: Call state updates are delivered through the state publisher. Subscribe to it to receive real-time updates of call data.

Topics

Get Instance

  • shared : Get the CallStore singleton instance

Observe State and Events

  • state : Reactive state containing active call, participant list, volume information, and network quality
  • addListener/removeListener : Call event callbacks

Call Operations

Call History

See Also

Constructors

CallStore()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state CallState
Current call state, including active call, participant list, volume information, network quality, etc.
no setter

Methods

accept() Future<CompletionHandler>
Answer a call. Call this method to answer the call when receiving an incoming call invitation.
addListener(CallEventListener listener) → void
Add call event callback listener
callExperimentalAPI(Map<String, dynamic> jsonMap) Future<void>
Call experimental API
calls(List<String> participantIds, CallMediaType mediaType, CallParams? params) Future<CompletionHandler>
Create an audio or video call to specified users, supporting both one-on-one and group calls.
deleteRecordCalls(List<String> callIdList) Future<CompletionHandler>
Delete specified call records.
hangup() Future<CompletionHandler>
Hang up and end the current ongoing call.
invite(List<String> participantIds, CallParams? params) Future<CompletionHandler>
Invite other users to join during an ongoing call.
join(String callId) Future<CompletionHandler>
Join an ongoing group call using a specific call ID.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
queryRecentCalls(String cursor, int count) Future<CompletionHandler>
Query recent call records with pagination support. Pass an empty string as the initial cursor. For subsequent requests, use the cursor returned in the previous response to fetch the next page. Results are updated asynchronously in state.recentCalls.
reject() Future<CompletionHandler>
Reject a call. Call this method to reject the call when receiving an incoming call invitation.
removeListener(CallEventListener listener) → void
Remove call event callback listener
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

shared CallStore
no setter