tencent cloud

Tencent Real-Time Communication

Release Notes and Announcements
Release Notes
Recent Product Announcement
TRTC Live (TUILiveKit) Product Launch Announcement
TRTC Conference Official Editions Launched
The commercial version of Conference is coming soon
Terms and Conditions Applicable to $9.9 Starter Package
Rules for the "First Subscription $100 Discount" Promotion
Announcement on the Start of Beta Testing for Multi-person Audio and Video Conference
TRTC Call Official Editions Launched
License Required for Video Playback in New Version of LiteAV SDK
TRTC to Offer Monthly Packages
Product Introduction
Overview
Concepts
Features
Strengths
Use Cases
Performance Statistics
Tencent RTC Quickplay: Experience Ultimate Real-Time Audio and Video Interaction!
Purchase Guide
Billing Overview
Free Minutes
Monthly subscription
Pay-as-you-go
TRTC Overdue and Suspension Policy
FAQs
Refund Instructions
User Tutorial
Free Demo
Call
Overview
Activate the Service
Run Demo
Integration
Offline Call Push
Conversational Chat
On-Cloud Recording
AI Noise Reduction
UI Customization
Calls integration to Chat
Additional Features
No UI Integration
Server APIs
Client APIs
Solution
ErrorCode
Release Notes
FAQs
Conference
Overview(TUIRoomKit)
Activate the Service (TUIRoomKit)
Run Demo(TUIRoomKit)
Integration(TUIRoomKit)
Screen Sharing (TUIRoomKit)
Schedule a meeting (TUIRoomKit)
In-meeting Call (TUIRoomKit)
UI Customization(TUIRoomKit)
Virtual Background (TUIRoomKit)
Conference Control (TUIRoomKit)
Cloud Recording (TUIRoomKit)
AI Noise Reduction (TUIRoomKit)
In-Conference Chat (TUIRoomKit)
Robot Streaming (TUIRoomKit)
Enhanced Features (TUIRoomKit)
Client APIs (TUIRoomKit)
Server APIs (TUIRoomKit)
FAQs (TUIRoomKit)
Error Code (TUIRoomKit)
SDK Update Log (TUIRoomKit)
Live
Billing of Video Live Component
Overview
Activating the Service (TUILiveKit)
Run Demo
No UI Integration
UI Customization
Live Broadcast Monitoring
Video Live Streaming
Voice Chat Room
Advanced Features
Client APIs
Server APIs
Error Codes
Release Notes
FAQs
RTC Engine
Activate Service
SDK Download
API Examples
Usage Guidelines
API Reference Manual
Advanced Features
AI Integration
Overview
Configure MCP Server
Install Skills
Integration Guide
FAQ
RTC RESTFUL API
History
Introduction
API Category
Room Management APIs
Stream mixing and relay APIs
On-cloud recording APIs
Data Monitoring APIs
Pull stream Relay Related interface
Web Record APIs
AI Service APIs
Cloud Slicing APIs
Cloud Moderation APIs
Making API Requests
Call Quality Monitoring APIs
Usage Statistics APIs
Data Types
Appendix
Error Codes
Console Guide
Application Management
Package Management
Usage Statistics
Monitoring Dashboard
Development Assistance
Solution
Real-Time Chorus
FAQs
Migration Guide
Billing
Features
UserSig
Firewall Restrictions
How to Downsize Installation Package
Android and iOS
Web
Flutter
Electron
TRTCCalling for Web
Audio and Video Quality
Others
Legacy Documentation
RTC RoomEngine SDK(Old)
Integrating TUIRoom (Web)
Integrating TUIRoom (Android)
Integrating TUIRoom (iOS)
Integrating TUIRoom (Flutter)
Integrating TUIRoom (Electron)
TUIRoom APIs
On-Cloud Recording and Playback (Old)
RTC Analytics Monthly Packages (Previous Version)
Protocols and Policies
Compliance
Security White Paper
Notes on Information Security
Service Level Agreement
Apple Privacy Policy: PrivacyInfo.xcprivacy
TRTC Policy
Privacy Policy
Data Processing And Security Agreement
Glossary

TUIRoomEvents

PDF
Focus Mode
Font Size
Last updated: 2023-11-14 17:25:21

TUIRoomEvent API Introduction

TUIRoomEvent API is the Event Interface for Audio/Video call Component.

Event list

EVENT
Description
Error Event
Kicked out of room event
Current user Kicked off line event
UserSig Expiration Event
Host Destroy Room Event
Room Name Change Event
Room Speech Mode Change Event
All members Camera Usage Permission Change Event
All members Mic Usage Permission Change Event
All members Send Message Status Change Event
Room Maximum Seat Count Change Event
Remote User Entered Room Event
Remote User Leave Room Event
User Role Change Event
User Video Status Change Event
User Audio Status Change Event
User Send Message Status Event
User Volume Change Event
User Network Quality Change Event
Seat List Change Event
User Kicked off Seat Event
Request Received Event
Request Cancelled Event
Receive Text Message Event
Receive Custom Message Event
Device Change Event
Screen Sharing Stopped Event
When the user uses the built-in browser stop sharing button to end screen sharing, the user will receive the 'onUserScreenCaptureStopped' event to modify the screen sharing status.

onError

Error Event
const roomEngine = new TUIRoomEngine();
roomEngine.on(TUIRoomEvents.onError, (error) => {
console.log('TUIRoomError error', error);
})
The parameters are shown in the table below:
Parameter
Type
Meaning
code
number
Error Code
message
string
Error Information

onKickedOutOfRoom

Kicked out of room event
const roomEngine = new TUIRoomEngine();
roomEngine.on(TUIRoomEvents.onKickedOutOfRoom, ({ roomId, message }) => {
console.log('roomEngine.onKickedOutOfRoom', roomId, message);
});
The parameters are shown in the table below:
Parameter
Type
Meaning
roomId
string
Room ID
message
string
Kicked out of room information

onKickedOffLine

Current user Kicked off line event
const roomEngine = new TUIRoomEngine();
roomEngine.on(TUIRoomEvents.onKickedOffLine, ({ message }) => {
console.log('roomEngine.onKickedOffLine', message);
});
The parameters are shown in the table below:
Parameter
Type
Meaning
roomId
string
Room ID
message
string
User logged in on other end information

onUserSigExpired

UserSig Expiration Event
const roomEngine = new TUIRoomEngine();
roomEngine.on(TUIRoomEvents.onUserSigExpired, () => {
console.log('roomEngine.onUserSigExpired');
});

onRoomDismissed

Host Destroy Room Event
const roomEngine = new TUIRoomEngine();
roomEngine.on(TUIRoomEvents.onRoomDismissed, ({ roomId }) => {
console.log('roomEngine.onRoomDismissed', roomId);
});
The parameters are shown in the table below:
Parameter
Type
Meaning
roomId
string
Room ID

onRoomNameChanged

Room ID Modification Event
const roomEngine = new TUIRoomEngine();
roomEngine.on(TUIRoomEvents.onRoomNameChanged, ({ roomId, roomName }) => {
console.log('roomEngine.onRoomNameChanged', roomId, roomName);
});
The parameters are shown in the table below:
Parameter
Type
Meaning
roomId
string
Room ID
roomName
string
Room Name

onRoomSpeechModeChanged

Room Name Change Event
const roomEngine = new TUIRoomEngine();
roomEngine.on(TUIRoomEvents.onRoomSpeechModeChanged, ({ roomId, speechMode }) => {
console.log('roomEngine.onRoomSpeechModeChanged', roomId, speechMode);
});
The parameters are shown in the table below:
Parameter
Type
Meaning
roomId
string
Room ID
speechMode
Speech Mode

onAllUserCameraDisableChanged

All members Camera Usage Permission Change Event
const roomEngine = new TUIRoomEngine();
roomEngine.on(TUIRoomEvents.onAllUserCameraDisableChanged, ({ isDisable }) => {
console.log('roomEngine.onAllUserCameraDisableChanged', isDisable);
});
The parameters are shown in the table below:
Parameter
Type
Meaning
isDisable
boolean
Allow Camera Usage

onAllUserMicrophoneDisableChanged

All members Mic Usage Permission Change Event
const roomEngine = new TUIRoomEngine();
roomEngine.on(TUIRoomEvents.onAllUserMicrophoneDisableChanged, ({ isDisable }) => {
console.log('roomEngine.onAllUserMicrophoneDisableChanged', isDisable);
});
The parameters are shown in the table below:
Parameter
Type
Meaning
isDisable
boolean
Allow Mic Usage

onSendMessageForAllUserDisableChanged

All members Send Message Permission Change Event
const roomEngine = new TUIRoomEngine();
roomEngine.on(TUIRoomEvents.onSendMessageForAllUserDisableChanged, ({ isDisable }) => {
console.log('roomEngine.onSendMessageForAllUserDisableChanged', isDisable);
});
The parameters are shown in the table below:
Parameter
Type
Meaning
isDisable
boolean
Allow Sending Text Message

onRoomMaxSeatCountChanged

Room Maximum Seat Count Change Event
const roomEngine = new TUIRoomEngine();
roomEngine.on(TUIRoomEvents.onRoomMaxSeatCountChanged, ({ maxSeatNumber }) => {
console.log('roomEngine.onRoomMaxSeatCountChanged', maxSeatNumber);
});
The parameters are shown in the table below:
Parameter
Type
Meaning
maxSeatNumber
number
Maximum Seat Count

onRemoteUserEnterRoom

Remote User Entered Room Event
const roomEngine = new TUIRoomEngine();
roomEngine.on(TUIRoomEvents.onRemoteUserEnterRoom, ({ roomId, userInfo }) => {
console.log('roomEngine.onRemoteUserEnterRoom', roomId, userInfo);
});
The parameters are shown in the table below:
Parameter
Type
Meaning
roomId
string
Room ID
userInfo
User Information

onRemoteUserLeaveRoom

Remote User Leave Room Event
const roomEngine = new TUIRoomEngine();
roomEngine.on(TUIRoomEvents.onRemoteUserLeaveRoom, ({ roomId, userInfo }) => {
console.log('roomEngine.onRemoteUserLeaveRoom', roomId, userInfo);
});
The parameters are shown in the table below:
Parameter
Type
Meaning
roomId
string
Room ID
userInfo
User Information

onUserRoleChanged

User Role Change Event
const roomEngine = new TUIRoomEngine();
roomEngine.on(TUIRoomEvents.onUserRoleChanged, ({ userId, userRole }) => {
console.log('roomEngine.onUserRoleChanged', userId, userRole);
});
The parameters are shown in the table below:
Parameter
Type
Meaning
userId
string
User Id
userRole
TUIRole
User Changed Role

onUserVideoStateChanged

User Video Status Change Event
const roomEngine = new TUIRoomEngine();
roomEngine.on(TUIRoomEvents.onUserVideoStateChanged, ({ userId, streamType, hasVideo, reason }) => {
console.log('roomEngine.onUserVideoStateChanged', userId, streamType, hasVideo, reason);
});
The parameters are shown in the table below:
Parameter
Type
Meaning
userId
string
User Id
streamType
User Stream Type
hasVideo
boolean
Has Video streams
reason
Change Reason, Self-operation/Host-operation

onUserAudioStateChanged

User Audio Status Change Event
const roomEngine = new TUIRoomEngine();
roomEngine.on(TUIRoomEvents.onUserAudioStateChanged, ({ userId, hasAudio, reason }) => {
console.log('roomEngine.onUserAudioStateChanged', userId, hasAudio, reason);
});
The parameters are shown in the table below:
Parameter
Type
Meaning
userId
string
User Id
hasVideo
boolean
Has Audio streams
reason
Change Reason, Self-operation/Host-operation

onSendMessageForUserDisableChanged

Member Camera Usage Permission Change Event
const roomEngine = new TUIRoomEngine();
roomEngine.on(TUIRoomEvents.onSendMessageForAllUserDisableChanged, ({ isDisable }) => {
console.log('roomEngine.onSendMessageForAllUserDisableChanged', isDisable);
});
The parameters are shown in the table below:
Parameter
Type
Meaning
isDisable
boolean
Allow Sending Text Message

onUserVoiceVolumeChanged

User Volume Change Event
const roomEngine = new TUIRoomEngine();
roomEngine.on(TUIRoomEvents.onUserVoiceVolumeChanged, ({ userVolumeList }) => {
userVolumeList.forEach(userVolume => {
console.log('roomEngine.onUserVoiceVolumeChanged', userVolume.userId, userVolume.volume);
})
});
The parameters are shown in the table below:
Parameter
Type
Meaning
userVolumeList
Array.<object>
Volume of all users in the room, including userId and volume information, volume range is 1-100

onUserNetworkQualityChanged

User Network Quality Change Event
const roomEngine = new TUIRoomEngine();
roomEngine.on(TUIRoomEvents.onUserNetworkQualityChanged, ({ userNetworkList }) => {
userNetworkList.forEach(userNetwork => {
console.log('roomEngine.onUserNetworkQualityChanged', userNetwork.userId, userNetwork.volume);
})
});
The parameters are shown in the table below:
Parameter
Type
Meaning
networkMap
Traverse Network Quality Level

onSeatListChanged

Seat List Change Event
const roomEngine = new TUIRoomEngine();
roomEngine.on(TUIRoomEvents.onSeatListChanged, ({ seatList, seatedList, leftList }) => {
console.log('roomEngine.onSeatListChanged',seatList, seatedList, leftList);
});
The parameters are shown in the table below:
Parameter
Type
Meaning
seatList
Array.<TUISeatInfo>
Seat List
seatedList
Array.<TUISeatInfo>
New Seat Information
leftList
Array.<TUISeatInfo>
Left Seat Information

onKickedOffSeat

Seat List Change Event
const roomEngine = new TUIRoomEngine();
roomEngine.on(TUIRoomEvents.onKickedOffSeat, ({ userId }) => {
console.log('roomEngine.onKickedOffSeat', userId);
});
The parameters are shown in the table below:
Parameter
Type
Meaning
userId
String
Kicked off Seat User Id

onRequestReceived

Error Event
const roomEngine = new TUIRoomEngine();
roomEngine.on(TUIRoomEvents.onRequestReceived, ({ request }) => {
console.log('roomEngine.onRequestReceived', request);
});
The parameters are shown in the table below:
Parameter
Type
Meaning
request
Request Received

onRequestCancelled

Request Cancelled Event
const roomEngine = new TUIRoomEngine();
roomEngine.on(TUIRoomEvents.onRequestCancelled, ({ requestId, userId }) => {
console.log('roomEngine.onRequestCancelled', requestId, userId);
});
The parameters are shown in the table below:
Parameter
Type
Meaning
requestId
string
Request Id
userId
string
User Id of Cancelled Request

onReceiveTextMessage

Receive Text Message Event
const roomEngine = new TUIRoomEngine();
roomEngine.on(TUIRoomEvents.onReceiveTextMessage, ({ roomId, message }) => {
console.log('roomEngine.onReceiveTextMessage', roomId, message);
});
The parameters are shown in the table below:
Parameter
Type
Meaning
roomId
string
Room Id
message
Receive Text Message

onReceiveCustomMessage

Receive Custom Message Event
const roomEngine = new TUIRoomEngine();
roomEngine.on(TUIRoomEvents.onReceiveCustomMessage, ({ roomId, message }) => {
console.log('roomEngine.onReceiveCustomMessage', roomId, message);
});
The parameters are shown in the table below:
Parameter
Type
Meaning
roomId
string
Room Id
message
Receive Text Message

onDeviceChange

Device Change Event
const roomEngine = new TUIRoomEngine();
roomEngine.on(TUIRoomEvents.onDeviceChange, ({ deviceId, type, state }) => {
console.log('roomEngine.onDeviceChange', deviceId, type, state);
});
The parameters are shown in the table below:
Parameter
Type
Meaning
deviceId
string
Device Id
type
Device Type
state
Device Change Status

onUserScreenCaptureStopped

Screen Sharing Stopped Event, when the user uses the built-in browser stop sharing button to end screen sharing, the user will receive the 'onUserScreenCaptureStopped' event to modify the screen sharing status.
const roomEngine = new TUIRoomEngine();
roomEngine.on(TUIRoomEvents.onUserScreenCaptureStopped, () => {
console.log('roomEngine.onUserScreenCaptureStopped', deviceId, type, state);
});


Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback