Web

AtomicXCore SDK is the next-generation reactive API from TRTC, purpose-built for live streaming, instant messaging, audio/video calls, and voice chat rooms. This API suite enables rapid UI development and supports comprehensive features including room management, screen sharing, member management, seat control, basic beauty effects, and more. Built on the TRTC SDK, AtomicXCore delivers ultra-low latency and high-quality audio and video experiences. This page provides a complete reference for all AtomicXCore SDK API interfaces, organized by functional module.

LoginState

User Authentication and Login Management
Core Features: Deliver essential identity authentication, including user login, logout, and personal profile management. This forms the foundation of user identity across your application.
Technical Highlights: Support multiple login methods, user info caching, persistent login state, and robust security for user identity.
Use Cases: User login, identity verification, profile management, permission control, and other core authentication scenarios.
Reactive Data
Data List
Description
Details of the currently logged-in user.
API Functions
Function List
Description
login
Authenticate and log in the user.
Update user profile information.
logout
Log out the user.

DeviceState

Device State Management
Core Features: Control audio/video devices such as cameras and microphones, monitors device status, checks permissions, and provides essential device services.
Technical Highlights: Support multi-device management, real-time device monitoring, dynamic permission checks, and automatic device fault recovery.
Use Cases: Device management, permission control, audio/video capture, device fault handling, and other foundational scenarios.
Reactive Data
Data List
Description
Status of the microphone.
List of available microphone devices.
Currently selected microphone device.
Last microphone error details.
Microphone capture volume level.
Current microphone volume.
Microphone testing status.
Microphone volume during testing.
Status of the camera.
List of available camera devices.
Currently selected camera device.
Last camera error details.
Camera testing status.
Camera test loading status.
Indicates if the front camera is in use.
Local video mirror type.
Local video quality settings.
List of available speaker devices.
Currently selected speaker device.
Speaker output volume level.
Current audio output route.
Speaker testing status.
Screen sharing status.
Network connection details.
API Functions
Function List
Description
Enable the local microphone.
Disable the local microphone.
Mute local audio.
Unmute local audio.
Retrieve the list of microphone devices.
Select the active microphone device.
Begin microphone testing.
Adjust microphone capture volume.
Adjust speaker output volume.
End microphone testing.
Retrieve the list of speaker devices.
Select the active speaker device.
Configure the audio output route.
Begin speaker testing.
End speaker testing.
Enable the local camera.
Disable the local camera.
Retrieve the list of camera devices.
Select the active camera device.
Switch between front and rear cameras.
Toggle video mirror mode.
Update video quality settings.
Begin camera device testing.
Start screen sharing.
Stop screen sharing.
End camera device testing.
Callback for when screen sharing stops.

LiveListState

Live Room List Management
Core Features: Manage the complete lifecycle of live rooms, including creation, joining, leaving, ending, and supports paginated retrieval and real-time updates of the live room list.
Technical Highlights: Enable paginated loading, real-time status sync, dynamic live info updates, and reactive data binding to keep UI and data state aligned. New reactive data: liveList and liveListCursor, plus fetchLiveList API.
Use Cases: Displaying live room lists, creating live rooms, managing live status, live data analytics, and related business scenarios.
Reactive Data
Data List
Description
Information about the current live room.
liveList
Live room list data, including all live rooms.
Pagination cursor for fetching the next page of live room data.
API Functions
Function List
Description
Create a new live room.
joinLive
Join an existing live room.
leaveLive
Leave the current live room.
endLive
End the live stream.
Update live room information.
Query custom metadata.
Update custom metadata for the live room.
Fetch the live room list.

LiveSeatState

Live Room Seat Management
Core Features: Provide seat control for multi-user co-hosting, including seat state management and audio/video device control—take seat, leave seat, lock seat, and more.
Technical Highlights: Built on WebRTC, support multi-stream audio/video management, seat locking, device control, permission management, and advanced features. New reactive data: seatList, canvas, speakingUsers, networkQualities, and full seat operation APIs.
Use Cases: Multi-user co-hosting, host PK battles, interactive games, online education, conference live streaming, and other multi-user interaction scenarios.
Reactive Data
Data List
Description
seatList
Seat list, including status and user details for all seats.
canvas
Canvas configuration for video rendering and layout.
List of users currently speaking.
Network quality information for each user.
API Functions
Function List
Description
takeSeat
Take a seat (go live on mic).
leaveSeat
Leave a seat (go off mic).
lockSeat
Lock a seat.
Unlock a seat.
Remove a user from a seat.
Move a user to a specified seat.
Enable a remote user's camera.
Disable a remote user's camera.
Enable a remote user's microphone.
Disable a remote user's microphone.
Mute a microphone.
Unmute a microphone.
Start stream playback.
Stop stream playback.

LiveAudienceState

Live Room Audience Management
Core Features: Manage the audience list, controls audience permissions, assigns administrators, and supports moderation and real-time audience statistics.
Technical Highlights: Real-time audience list updates, hierarchical permission management, batch operations, ensuring live room order and optimal user experience. New reactive data: audienceList and audienceCount.
Use Cases: Audience management, permission control, live room moderation, audience interaction, and related scenarios.
Reactive Data
Data List
Description
Audience list, including details for all viewers.
Total audience count.
API Functions
Function List
Description
Retrieve the audience list.
Assign administrator privileges.
Remove administrator privileges.
Remove a user from the room.
Mute a user.

LiveMonitorState

Live Room Monitoring Management
Core Features: Provide real-time monitoring of live rooms, including live status tracking, data statistics, anomaly detection, and multi-room monitoring.
Technical Highlights: Real-time data collection, multi-dimensional metrics, intelligent alerting, ensuring live streaming stability and reliability. New reactive data: monitorLiveInfoList and optimized monitoring APIs.
Use Cases: Live quality monitoring, performance analysis, anomaly alerts, data statistics, and operational management.
Reactive Data
Data List
Description
List of monitored live room details.
API Functions
Function List
Description
init
Initialize live room monitoring.
Get the list of live rooms.
closeRoom
Close a live room.
Send a message.
startPlay
Start playback.
stopPlay
Stop playback.
Mute live audio.

CoGuestState

Co-host Guest Management
Core Features: Manage co-hosting interactions between audience and host, including application, invitation, acceptance, rejection, and co-hosting status management.
Technical Highlights: Real-time audio/video technology, status synchronization, adaptive quality, network monitoring. New reactive data: connected, invitees, applicants, candidates, and applyForSeat API.
Use Cases: Audience co-hosting, interactive Q&A, online karaoke, game live streaming, and other audience participation scenarios.
Reactive Data
Data List
Description
List of candidate users for co-host invitation.
connected
List of users currently co-hosting.
invitees
List of users invited to co-host.
List of users applying to co-host.
API Functions
Function List
Description
Cancel a co-host application.
Accept a co-host application.
Reject a co-host application.
Cancel a co-host invitation.
Accept a co-host invitation.
Reject a co-host invitation.
Disconnect from co-hosting.
Apply to go live on mic.

CoHostState

Co-host Host Management
Core Features: Enable co-hosting between hosts, including invitations, applications, status management, and a complete host co-hosting workflow.
Technical Highlights: Multi-host audio/video sync, picture-in-picture display, quality optimization for seamless co-hosting. New reactive data: coHostStatus, connected, applicant, invitees, candidates, and full co-hosting control APIs.
Use Cases: Host PK battles, collaborative live streaming, cross-platform co-hosting, host interaction, and advanced live streaming scenarios.
Reactive Data
Data List
Description
Co-host host status.
connected
Co-host connection status.
applicant
Host applying for co-hosting.
invitees
List of invited hosts.
Candidate host list.
API Functions
Function List
Description
Request host co-hosting.
Cancel host co-hosting.
Accept host co-hosting.
Reject host co-hosting.
Exit host co-hosting.

BattleState

PK Battle Management
Core Features: Manage PK battles between hosts, including invitations, acceptance, rejection, ending, and real-time score tracking.
Technical Highlights: Real-time battle status sync, score calculation, result statistics, and more. New reactive data: battleScore for a complete PK battle experience.
Use Cases: Host PK battles, talent competitions, game battles, interactive contests, and entertainment scenarios.
Reactive Data
Data List
Description
Current PK battle details.
Users participating in the PK battle.
Real-time PK battle score.
API Functions
Function List
Description
Request a PK battle.
Cancel a PK battle request.
Accept a PK battle.
Reject a PK battle.
Exit a PK battle.

BarrageState

Barrage Message Management
Core Features: Manage barrage features in live rooms, including text and custom messages, barrage sending, message status sync, and local tip display.
Technical Highlights: High-concurrency message processing, real-time sync, message filtering, emoji support, and more. New API functions: sendTextMessage, sendCustomMessage, appendLocalTip.
Use Cases: Barrage interaction, message management, emoji usage, chat rooms, and social scenarios.
Reactive Data
Data List
Description
List of barrage messages.
API Functions
Function List
Description
Send a text message.
Send a custom message.
Add a local tip.

MessageListState

Message List Management
Core Features: Manage chat message lists, including message loading, scroll control, read receipts, message highlighting, and complete display functionality.
Technical Highlights: Virtual scrolling, message optimization, real-time updates, and high-performance handling. New reactive data: activeConversationID, messageList, hasMoreOlderMessage, and more.
Use Cases: Instant messaging, group chat, private chat, message management, and communication scenarios.
Reactive Data
Data List
Description
ID of the active conversation.
Message list data.
Indicates if older messages are available.
Indicates if newer messages are available.
Read receipt status.
Scroll disable status.
Set of recalled message IDs.
Set of highlighted message IDs.
API Functions
Function List
Description
Enable or disable read receipts.
Enable or disable scroll.
Highlight a message.

MessageInputState

Message Input Management
Core Features: Manage the input box state and behavior, supporting text input, emoji, @mentions, input status indication, and a complete input experience.
Technical Highlights: Rich text editing, input status sync, draft saving, and more. New reactive data: inputRawValue, isPeerTyping.
Use Cases: Message editing, emoji input, file sending, voice input, and related scenarios.
Reactive Data
Data List
Description
Raw text content of the input box.
Indicates if the peer is typing.
API Functions
Function List
Description
Update the input box value.
Set the editor instance.
Set the input box content.
Insert content into the input box.
Focus the input editor.
Remove focus from the editor.
Send a message.

MessageActionState

Message Action Management
Core Features: Manage message actions such as forwarding, quoting, copying, deleting, recalling, and provides a complete set of message operations.
Technical Highlights: Support batch operations, action state management, permission control, and more. New reactive data: forwardMessageIDList, isForwardMessageSelectionDone.
Use Cases: Message forwarding, quoting, management, batch operations, and related scenarios.
Reactive Data
Data List
Description
List of message IDs selected for forwarding.
Indicates if forwarding selection is complete.
Target conversation IDs for forwarding.
Details of the quoted message.
API Functions
Function List
Description
Forward a message.
Set the list of messages to forward.
Set forwarding selection completion status.
Set target conversations for forwarding.
Quote a message.
Clear the quoted message.
Copy a text message.
Delete a message.
Recall a message.
Reset message action state.

ConversationListState

Conversation List Management
Core Features: Manage the user's conversation list, including sorting, unread count statistics, conversation operations, and complete management features.
Technical Highlights: Real-time conversation updates, intelligent sorting, network status monitoring, and more. New reactive data: conversationList, activeConversation, totalUnRead, netStatus.
Use Cases: Conversation management, contact lists, group management, message center, and related scenarios.
Reactive Data
Data List
Description
Conversation list data.
Currently active conversation.
Total unread messages count.
netStatus
Network connection status.
API Functions
Function List
Description
Mark a conversation as unread.
Set the active conversation.
Pin a conversation.
Delete a conversation.
Mute a conversation.
Set a conversation draft.
Create a one-on-one conversation.
Create a group conversation.

ContactListState

Contact List Management
Core Features: Manage the user's contact list, including friend management, group management, blacklist management, and complete contact features.
Technical Highlights: Contact grouping, friend applications, group applications, and more. New reactive data: friendList, groupList, blackList, and full contact operation APIs.
Use Cases: Friend management, group management, contact search, social networking, and related scenarios.
Reactive Data
Data List
Description
List of friends.
groupList
List of groups.
blackList
Blacklist.
Unread friend application count.
List of friend groups.
List of friend applications.
List of group applications.
API Functions
Function List
Description
Set the group application list.
Set the friend list.
Set the group list.
Set the blacklist.
Set unread friend application count.
Set the friend group list.
Set the friend application list.
Initialize contact list watcher.
addFriend
Add a friend.
Mark friend applications as read.
Accept a friend application.
Refuse a friend application.
Add a user to the blacklist.
Remove a user from the blacklist.
Delete a friend.
Set a friend's remark.
Create a friend group.
Delete a friend group.
Add a user to a friend group.
Remove a user from a friend group.
Rename a friend group.
joinGroup
Join a group.
Accept a group application.
Refuse a group application.

C2CSettingState

One-on-One Chat Settings Management
Core Features: Manage settings for one-on-one conversations, including user info, chat settings, and permission control.
Technical Highlights: Real-time settings sync, permission management, personalized configuration. Reactive data fields standardized to userID, avatar, signature, and more.
Use Cases: One-on-one chat settings, user info management, chat permission control, and related scenarios.
Reactive Data
Data List
Description
Reference to the current conversation.
userIDRef
User ID.
nickRef
User nickname.
avatarRef
User avatar.
User signature.
remarkRef
Friend remark name.
Conversation mute status.
Conversation pin status.
Friend relationship status.
userID
User ID.
avatar
User avatar URL.
signature
User signature.
remark
User remark name.
isMuted
Muted status.
isPinned
Pinned status.
isContact
Contact status.
API Functions
Function List
Description
Pin the chat.
Enable do-not-disturb for the chat.
Set user remark.

GroupSettingState

Group Chat Settings Management
Core Features: Manage group chat settings and operations, including group info, member management, permission control, and complete group management features.
Technical Highlights: Group permission management, member operations, group settings sync, and more. New reactive data: groupID, groupType, groupName, and full group management APIs.
Use Cases: Group management, member management, permission control, group settings, and related scenarios.
Reactive Data
Data List
Description
groupID
Group ID.
groupType
Group type.
groupName
Group name.
avatar
Group avatar URL.
Group introduction.
Group announcement.
isMuted
Muted status.
isPinned
Pinned status.
Group owner details.
Administrator list.
List of all group members.
Total member count.
Maximum allowed member count.
Current user ID.
Current user role.
nameCard
User name card.
Indicates if all members are muted.
isInGroup
Indicates if the user is in the group.
Group invite options.
API Functions
Function List
Description
Retrieve the group member list.
Update group profile information.
Add a member to the group.
Remove a member from the group.
Transfer group ownership.
Set a member's role in the group.
Set a member's name card.
Pin the group chat.
Enable do-not-disturb for the group chat.
Set mute duration for a group member.
Mute all group members.
Dismiss the group.
quitGroup
Leave the group.
Check user permissions.
Check if a member can be operated on.
Get available permissions.
Initialize group watcher.

VideoMixerState

Video Mixing Management
Core Features: Manage video mixing, supporting multi-stream composition, layout management, media source control, and advanced video processing.
Technical Highlights: Real-time video mixing, dynamic layout adjustment, media source management, and more. New reactive data: isVideoMixerEnabled, mediaSourceList, activeMediaSource, and full mixing control APIs.
Use Cases: Multi-host live streaming, picture-in-picture, video composition, professional production, and related scenarios.
Reactive Data
Data List
Description
Video size by resolution.
Indicates if video mixing is enabled.
List of media sources.
Currently active media source.
API Functions
Function List
Description
Get video data by quality.
Get video size by quality.
Get video size by resolution.
Convert video quality to TRTC resolution.
Convert TRTC resolution to video quality.
Convert TRTC resolution mode.
Switch the active media source.
Update video quality settings.
Get default layout for a media source.
Add a media source.
Update a media source.
Remove a media source.
Enable local video mixer.
Clear all media sources.
Initialize media source manager.
Initialize video mixer state.

VirtualBackgroundState

Virtual Background Management
Core Features: Manage virtual backgrounds, including background replacement, blur, custom backgrounds, and video beautification.
Technical Highlights: AI-powered real-time background segmentation and replacement. New reactive data: virtualBackgroundConfig, plus isSupported and setVirtualBackground APIs.
Use Cases: Video calls, online meetings, live stream beautification, privacy protection, and related scenarios.
Reactive Data
Data List
Description
Virtual background configuration.
API Functions
Function List
Description
Initialize virtual background.
Save virtual background settings.
Check if virtual background is supported.
Set the virtual background.

ASRState

Speech Recognition Management
Core Features: Manage speech recognition, including real-time speech-to-text, transcript history, transcript export, and more.
Technical Highlights: Advanced ASR technology, multi-language support, real-time transcription, history records. New reactive data: recentTranscripts, transcriptHistory, and exportTranscripts API.
Use Cases: Meeting notes, speech transcription, accessibility, content recording, and related scenarios.
Reactive Data
Data List
Description
Recent speech transcript records.
Speech transcript history records.
API Functions
Function List
Description
Set duration for recent transcripts.
Clear transcript history.
Export transcripts.

SearchState

Search Feature Management
Core Features: Manage global search, including message, user, and group search, with multi-dimensional search capabilities.
Technical Highlights: Advanced search, search history, suggestions, and more. Reactive data standardized to keyword, results, isLoading, and full search APIs.
Use Cases: Message search, contact search, content lookup, history records, and related scenarios.
Reactive Data
Data List
Description
keyword
Search keyword.
results
Search results.
isLoading
Loading status.
error
Error details.
Advanced search parameters.
Selected search type.
API Functions
Function List
Description
search
Perform a search.
Set the search keyword.
Set the selected search type.
Set advanced parameters for message search.
Set advanced parameters for user search.
Set advanced parameters for group search.
loadMore
Load more results.

SeatStore

Seat Storage Management
Core Features: Provide underlying storage and management for seat states, including seat info caching, user info mapping, device request handling, and other core features.
Technical Highlights: Reactive storage design, real-time state sync, event-driven updates, and more. New reactive data: liveOwnerUserId, localUserId, seatList, plus getUserInfo and convertUserInfoToAudienceInfo APIs.
Use Cases: Seat state management, user info storage, device state tracking, and foundational scenarios.
Reactive Data
Data List
Description
Live room host user ID.
Local user ID.
seatList
Seat list, including status and user info for all seats.
List of co-host users.
Mapping of sent device requests.
Mapping of received device requests.
User info mapping table.
API Functions
Function List
Description
Retrieve user information.
Convert user information to audience information.