Only  $9.9! Get 50,000 minutes with our Starter Plan, perfect for your MVP project.
Only $9.9! Get 50,000 minutes with our Starter Plan, perfect for your MVP project.
Grab It Now 
Conference
Overview
  • Web
    • Integration
    • UI Customization
    • In-Conference Chat
    • Cloud Recording
    • API Documentation
      • API Overview
      • TUIRoomKit
      • TUIRoomEngine
      • TUIRoomEvents
      • TUIRoomEngine Defines
    • FAQs
  • iOS
    • Integration
    • UI Customization
    • Conference Control
    • In-Conference Chat
    • Cloud Recording
    • API Documentation
      • API Overview
      • TUIRoomKit
      • TUIRoomEngine
      • TUIRoomObserver
      • Type Definition
    • FAQs
  • Android
    • Integration
    • UI Customization
    • Conference Control
    • In-Conference Chat
    • Cloud Recording
    • API Documentation
      • API Overview
      • TUIRoomKit
      • TUIRoomEngine
      • TUIRoomObserver
      • Type Definition
    • FAQs
  • Electron
    • Integration
    • UI Customization
    • In-Conference Chat
    • Cloud Recording
    • API Documentation
      • API Overview
      • TUIRoomKit
      • TUIRoomEngine
      • TUIRoomEvent
      • TUIRoomEngine Defines
    • FAQs
  • Windows
    • Integration
    • UI Customization
    • Cloud Recording
    • API Documentation
      • API Overview
      • TUIRoomEngine
      • TUIRoomObserver
      • Type Definition
  • Flutter
    • Integration
    • UI Customization
    • Conference Control
    • Cloud Recording
    • API Documentation
      • API Overview
      • TUIRoomEngine
      • TUIRoomObserver
      • Type Definition
    • FAQs
  • Overview
    • Overview
  • Activate the Service
  • Pricing
    • TRTC Conference Monthly Packages
    • Pay-As-You-Go
    • Free Minutes
  • Error Code
Conference

TUIRoomObserver

TUIRoomObserver Callback Event Details

The TUIRoomObserver class is the corresponding Callback Event class for TUIRoomEngine. You can listen to the Callback Events you are interested in through this Callback Interface.

onError

Error Event Callback
virtual void onError(TUIError errorCode, const char* message) = 0;
The parameters are as follows:
Parameter
Type
Meaning
errorCode
TUIError
Error Code
message
const char*
Error Message

onKickedOffLine

Other terminals login and get kicked off event.
virtual void onKickedOffLine(const char* message) = 0;
The parameters are as follows:
Parameter
Type
Meaning
message
const char*
Kicked out description

onUserSigExpired

User credential timeout event.
virtual void onUserSigExpired() = 0;

onRoomNameChanged

Room name change event.
virtual void onRoomNameChanged(const char* roomId, const char* roomName) = 0;
The parameters are as follows:
Parameter
Type
Meaning
roomId
const char*
Room ID
roomName
const char*
Room Name

onAllUserMicrophoneDisableChanged

Inside the room, all users' mic is disabled event.
virtual void onAllUserMicrophoneDisableChanged(const char* roomId, bool isDisable) = 0;
The parameters are as follows:
Parameter
Type
Meaning
roomId
const char*
Room ID
isDisable
bool
Whether it is disabled

onAllUserCameraDisableChanged

All users' Camera in the Room are disabled event.
virtual void onAllUserCameraDisableChanged(const char* roomId, bool isDisable) = 0;
The parameters are as follows:
Parameter
Type
Meaning
roomId
const char*
Room ID
isDisable
bool
Whether it is disabled

onSendMessageForAllUserDisableChanged

Inside the room, all users' text message sending is disabled event.
virtual void onSendMessageForAllUserDisableChanged(const char* roomId, bool isDisable) = 0;
The parameters are as follows:
Parameter
Type
Meaning
roomId
const char*
Room ID
isDisable
bool
Whether it is disabled

onRoomDismissed

Room dissolution event.
virtual void onRoomDismissed(const char* roomId) = 0;
The parameters are as follows:
Parameter
Type
Meaning
roomId
const char*
Room ID

onKickedOutOfRoom

Kicked out of the room event.
virtual void onKickedOutOfRoom(const char* roomId, const char* message) = 0;
The parameters are as follows:
Parameter
Type
Meaning
roomId
const char*
Room ID
message
const char*
Description of being kicked out

onRoomSpeechModeChanged

Mic control mode changes in the room.
virtual void onRoomSpeechModeChanged(const char* roomId, TUISpeechMode speechMode) = 0;
The parameters are as follows:
Parameter
Type
Meaning
roomId
const char*
Room ID
speechMode
TUISpeechMode
Mic control mode

onRemoteUserEnterRoom

Remote user enters the room event.
virtual void onRemoteUserEnterRoom(const char* roomId, const TUIUserInfo& userInfo) = 0;
The parameters are as follows:
Parameter
Type
Meaning
roomId
const char*
Room ID
userInfo
const TUIUserInfo&
User information

onRemoteUserLeaveRoom

Remote user leaves the room event.
virtual void OnRemoteUserLeaveRoom(const char* roomId, const TUIUserInfo& userInfo) = 0;
The parameters are as follows:
Parameter
Type
Meaning
roomId
const char*
Room ID
userInfo
const TUIUserInfo&
User information

onUserRoleChanged

User role changes event.
virtual void onUserRoleChanged(const char* userId, const TUIRole& userRole) = 0;
The parameters are as follows:
Parameter
Type
Meaning
userId
const char*
User ID
userRole
const TUIRole&
User Role

onUserVideoStateChanged

User Video status changes event.
virtual void onUserVideoStateChanged(const char* userId, TUIVideoStreamType streamType, bool hasVideo, TUIChangeReason reason) = 0;
The parameters are as follows:
Parameter
Type
Meaning
userId
const char*
User ID
streamType
TUIVideoStreamType
Streams type
hasVideo
bool
Whether there are streams
reason
TUIChangeReason
Reason for streams change

onUserAudioStateChanged

User Audio status changes event.
virtual void onUserAudioStateChanged(const char* userId, bool hasAudio, TUIChangeReason reason) = 0;
The parameters are as follows:
Parameter
Type
Meaning
userId
const char*
User ID
hasAudio
bool
Whether there are Audio streams
reason
TUIChangeReason
Reason for Audio streams change

onUserVoiceVolumeChanged

User volume change event.
virtual void onUserVoiceVolumeChanged(TUIMap<const char*, int>* volumeMap) = 0;
The parameters are as follows:
Parameter
Type
Meaning
volumeMap
TUIMap<const char*, int>*
User Volume Map

onSendMessageForUserDisableChanged

User text message sending ability changes event.
virtual void onSendMessageForUserDisableChanged(const char* roomId, const char* userId, bool isDisable) = 0;
The parameters are as follows:
Parameter
Type
Meaning
roomId
const char*
Room ID
userId
const char*
User ID
isDisable
bool
Whether the user is prohibited from sending messages, true: The user is prohibited from sending text and custom messages; false: The user is allowed to send text and custom messages.

onUserNetworkQualityChanged

User network status change event.
virtual void onUserNetworkQualityChanged(TUIList<TUINetwork>* networkList) = 0;
The parameters are as follows:
Parameter
Type
Meaning
networkList
TUIList<TUINetwork>*
User network status list

onUserScreenCaptureStopped

Screen Sharing stopped Callback event.
virtual void onUserScreenCaptureStopped(int reason) = 0;
The parameters are as follows:
Parameter
Type
Meaning
reason
int
Stop reason:
0: User actively stops
1: Screen window closing causes the stop
2: Screen Sharing display screen status change (such as interface being unplugged, Projection mode change, etc.)

onRoomMaxSeatCountChanged

Maximum number of mic slots changes event in the room (only effective in meeting type rooms).
virtual void onRoomMaxSeatCountChanged(const char* roomId, int maxSeatCount) = 0;
The parameters are as follows:
Parameter
Type
Meaning
roomId
const char*
Room ID
maxSeatCount
int
Maximum number of mic slots in the room

onSeatListChanged

Mic slot list changes event.
virtual void onSeatListChanged(TUIList<TUISeatInfo>* seatList, TUIList<TUISeatInfo>* usersSeated, TUIList<TUISeatInfo>* usersLeft) = 0;
The parameters are as follows:
Parameter
Type
Meaning
seatList
TUIList<TUISeatInfo>*
The latest user list on the mic, including newly on mic users
usersSeated
TUIList<TUISeatInfo>*
Newly on mic user list
usersLeft
TUIList<TUISeatInfo>*
Newly off mic user list

onKickedOffSeat

Received the event of user being kicked off mic.
virtual void onKickedOffSeat(const char* userId) = 0;
The parameters are as follows:
Parameter
Type
Meaning
userId
const char*
User ID

onRequestReceived

Received request message event.
virtual void onRequestReceived(const TUIRequest* request) = 0;
The parameters are as follows:
Parameter
Type
Meaning
request
const TUIRequest*
Request content

onRequestCancelled

Received request cancellation event.
virtual void OnRequestCancelled(const char* requestId, const char* userId) = 0;
The parameters are as follows:
Parameter
Type
Meaning
requestId
const char*
Request ID
userId
const char*
User ID

onReceiveTextMessage

Received ordinary text message event.
virtual void onReceiveTextMessage(const char* roomId, const TUIMessage& message) = 0;
The parameters are as follows:
Parameter
Type
Meaning
roomId
const char*
Room ID
message
const TUIMessage&
Message content

onReceiveCustomMessage

Received custom message event.
virtual void onReceiveCustomMessage(const char* roomId, const TUIMessage& message) = 0;
The parameters are as follows:
Parameter
Type
Meaning
roomId
const char*
Room ID
message
const TUIMessage&
Message content