TUIRoom
is based on Tencent Real-Time Communication (TRTC) and Instant Messaging (IM). Its features include:
TUIRoom
is an open-source class depending on two closed-source Tencent Cloud SDKs. For the specific implementation process, please see Group Audio/Video Room (for Windows and macOS).
TUIRoom
API OverviewTUIRoomCore
API | Description |
---|---|
GetInstance | Gets a singleton object. |
DestroyInstance | Terminates a singleton object. |
SetCallback | Sets event callback. |
API | Description |
---|---|
login | Logs in. |
logout | Logs out. |
CreateRoom | Creates a room (called by anchor). |
DestroyRoom | Terminates a room (called by anchor). |
EnterRoom | Enters a room (called by participant). |
LeaveRoom | Exits a room (called by participant or anchor). |
GetRoomInfo | Gets the room information. |
GetRoomUsers | Gets the information of all users in the room. |
GetUserInfo | Gets the information of a user. |
TransferRoomMaster | Transfers the anchor permission (called by anchor). |
API | Description |
---|---|
StartCameraPreview | Enables the preview of the local video. |
StopCameraPreview | Stops local video capturing and preview. |
UpdateCameraPreview | Updates the local video rendering window. |
StartLocalAudio | Enables mic capturing. |
StopLocalAudio | Stops mic capturing. |
StartSystemAudioLoopback | Enables system audio capturing. |
StopSystemAudioLoopback | Disables system audio capturing. |
SetVideoMirror | Sets the mirroring preview mode of the local image. |
API | Description |
---|---|
StartRemoteView | Subscribes to and plays back the remote video image of a specified member. |
StopRemoteView | Unsubscribes from and stops the playback of a remote video image. |
UpdateRemoteView | Updates the video rendering window of a remote user. |
API | Description |
---|---|
SendChatMessage | Sends a chat message. |
SendCustomMessage | Sends a custom message. |
API | Description |
---|---|
MuteUserMicrophone | Enables/Disables the mic of a specified user. |
MuteAllUsersMicrophone | Enables/Disables the mic of all users and syncs the status to room information. |
MuteUserCamera | Enables/Disables the camera of a specified user. |
MuteAllUsersCamera | Enables/Disables the camera of all users and syncs the status to room information. |
MuteChatRoom | Mutes/Unmutes the chat room (called by anchor). |
KickOffUser | Removes a specified user in the room (called by anchor). |
StartCallingRoll | Starts calling roll by the anchor. |
StopCallingRoll | Stops calling roll by the anchor. |
ReplyCallingRoll | Replies to roll call by a member. |
SendSpeechInvitation | Invites a member to speak by the anchor. |
CancelSpeechInvitation | Cancels invitation to a member for speech by the anchor. |
ReplySpeechInvitation | Accepts/Rejects the speech invitation from the anchor by a member. |
SendSpeechApplication | Applies for speech by a member. |
CancelSpeechApplication | Cancels speech application by a member. |
ReplySpeechApplication | Approves/Rejects the speech application of a member by the anchor. |
ForbidSpeechApplication | Forbids speech application by the anchor. |
SendOffSpeaker | Stops the speech of a member by the anchor. |
SendOffAllSpeakers | Stops the speech of all members by the anchor. |
ExitSpeechState | Stops speaking by a member and changes their role to audience. |
API | Description |
---|---|
GetDeviceManager | Gets the local settings management object ITXDeviceManager . |
GetScreenShareManager | Gets the screen sharing management object IScreenShareManager . |
API | Description |
---|---|
StartCloudRecord | Starts on-cloud recording. |
StopCloudRecord | Stops on-cloud recording. |
API | Description |
---|---|
SetBeautyStyle | Sets a beauty filter. |
API | Description |
---|---|
SetVideoQosPreference | Sets network bandwidth limit parameters. |
API | Description |
---|---|
GetSDKVersion | Gets the SDK version. |
TUIRoomCoreCallback
API OverviewAPI | Description |
---|---|
OnError | Callback for error. |
API | Description |
---|---|
OnLogin | Login. |
OnLogout | Logout. |
OnCreateRoom | Room creation. |
OnDestroyRoom | Room dismissal. |
OnEnterRoom | Room entry. |
OnExitRoom | Room exit. |
OnFirstVideoFrame | The first video frame. |
OnUserVoiceVolume | Volume level. |
OnRoomMasterChanged | Anchor change. |
API | Description |
---|---|
OnRemoteUserEnter | A remote user entered the room. |
OnRemoteUserLeave | A remote user exited the room. |
OnRemoteUserCameraAvailable | Whether a remote user enabled the camera. |
OnRemoteUserScreenAvailable | Whether a remote user enabled screen sharing. |
OnRemoteUserAudioAvailable | Whether a remote user enabled mic. |
OnRemoteUserEnterSpeechState | A remote user started speaking. |
OnRemoteUserExitSpeechState | A remote user stopped speaking. |
API | Description |
---|---|
OnReceiveChatMessage | A text message was received. |
OnReceiveCustomMessage | A custom message was received. |
API | Description |
---|---|
OnReceiveSpeechInvitation | A member received a speech invitation from the anchor. |
OnReceiveInvitationCancelled | A member received a speech invitation cancellation from the anchor. |
OnReceiveReplyToSpeechInvitation | The anchor received the acceptance to a speech invitation by a member. |
OnReceiveSpeechApplication | The anchor received a speech application from a member. |
OnSpeechApplicationCancelled | A member canceled a speech application. |
OnReceiveReplyToSpeechApplication | The anchor approved a speech application. |
OnSpeechApplicationForbidden | The anchor rejected a speech application. |
OnOrderedToExitSpeechState | A member was asked to stop speaking. |
OnCallingRollStarted | The anchor started a roll call. |
OnCallingRollStopped | The anchor stopped a roll call. |
OnMemberReplyCallingRoll | A member replied to roll call. |
OnChatRoomMuted | The anchor muted/unmuted the room. |
OnMicrophoneMuted | The anchor disabled the mic. |
OnCameraMuted | The anchor disabled the camera. |
API | Description |
---|---|
OnStatistics | Statistics on technical metrics. |
OnNetworkQuality | Network quality. |
API | Description |
---|---|
OnScreenCaptureStarted | Screen sharing started. |
OnScreenCaptureStopped | Screen sharing stopped. |
API | Description |
---|---|
OnRecordError | Recording error. |
OnRecordComplete | Recording completion. |
OnRecordProgress | Recording progress. |
API | Description |
---|---|
OnTestSpeakerVolume | Speaker volume level. |
OnTestMicrophoneVolume | Mic volume level. |
OnAudioDeviceCaptureVolumeChanged | System capturing volume level adjustment. |
OnAudioDevicePlayoutVolumeChanged | System playback volume level adjustment. |
TUIRoomCore
This API is used to get a TUIRoomCore singleton object.
static TUIRoomCore* GetInstance();
static void DestroyInstance();
This API is used to set the event callback of TUIRoomCore. You can use TUIRoomCoreCallback
to get different status notifications of TUIRoomCore.
virtual void SetCallback(const TUIRoomCoreCallback* callback) = 0;
This API is used to log in to the Tencent backend server.
virtual int Login(int sdk_appid, const std::string& user_id, const std::string& user_sig) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
sdk_appid | int | You can view SDKAppID in Application Management > Application Info of the TRTC console. |
user_id | string | ID of the current user, which is a string that can contain letters (a-z and A-Z), digits (0-9), hyphens (-), and underscores (_). We recommend you set it based on your business account system. |
user_sig | string | Tencent Cloud's proprietary security signature. For more information on how to get it, please see UserSig. |
This API is used to log out of the Tencent backend server.
virtual int Logout() = 0;
This API is used to create a room (called by the anchor).
virtual int CreateRoom(const std::string& room_id, TUISpeechMode speech_mode) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
room_id | string | Room ID. You need to assign and manage the IDs in a centralized manner. |
speech_mode | TUISpeechMode | Speech mode. |
Generally, the anchor calls the APIs in the following steps:
CreateRoom()
to create a room, the result of which is returned via OnCreateRoom
.EnterRoom()
to enter the room.StartCameraPreview()
to enable camera capturing and preview.StartLocalAudio()
to enable the local mic.This API is used to terminate a room (called by the anchor).
virtual int DestroyRoom() = 0;
This API is used to enter a room (called by a participant).
virtual int EnterRoom(const std::string& room_id) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
room_id | string | Room ID. |
Generally, a participant enters a room in the following steps:
EnterRoom
and passes in room_id
to enter the room.startCameraPreview()
to enable camera preview and calls StartLocalAudio()
to enable mic capturing.OnRemoteUserCameraAvailable
event and calls StartRemoteView()
to start playback.This API is used to exit a room (called by a participant).
virtual int LeaveRoom() = 0;
This API is used to get the room information.
virtual TUIRoomInfo GetRoomInfo() = 0;
This API is used to get the information of all users in the room.
virtual std::vector GetRoomUsers() = 0;
This API is used to get the information of a user in the room.
virtual const TUIUserInfo* GetUserInfo(const std::string& user_id) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
user_id | string | User ID. |
This API is used to set the user attributes.
virtual int SetSelfProfile(const std::string& user_name, const std::string& avatar_url) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
user_name | string | User name. |
avatar_url | string | User profile photo URL. |
This API is used to transfer a group to another user.
virtual int TransferRoomMaster(const std::string& user_id) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
user_id | string | User ID. |
This API is used to start the preview of the local camera.
virtual int StartCameraPreview(const liteav::TXView& view) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
view | liteav::TXView | Window handle. |
This API is used to stop the preview of the local camera.
virtual int StopCameraPreview() = 0;
This API is used to update the preview image of the local video.
virtual int UpdateCameraPreview(const liteav::TXView& view) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
view | liteav::TXView | Window handle. |
This API is used to enable the local audio device.
virtual int StartLocalAudio(const liteav::TRTCAudioQuality& quality) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
view | liteav::TXView | Window handle. |
This API is used to disable the local audio device.
virtual int StopLocalAudio() = 0;
This API is used to enable system audio capturing.
virtual int StartSystemAudioLoopback() = 0;
This API is used to disable system audio capturing.
virtual int StopSystemAudioLoopback() = 0;
This API is used to set mirroring mode.
virtual int SetVideoMirror(bool mirror) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
mirror | bool | Whether to enable the mirroring mode. |
This API is used to subscribe to a remote user's video stream.
virtual int StartRemoteView(const std::string& user_id, const liteav::TXView& view,
TUIStreamType type = TUIStreamType::kStreamTypeCamera) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
user_id | string | ID of the user whose video image is to be played back. |
liteav::TXView | TXView | view control that carries the video image. |
type | TUIStreamType | Stream type. |
This API is used to unsubscribe from and stop the playback of a remote video image.
virtual int StopRemoteView(const std::string& user_id,
TUIStreamType type = TUIStreamType::kStreamTypeCamera) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
user_id | string | ID of the user whose video image is to be stopped. |
type | TUIStreamType | Stream type. |
This API is used to updates the rendering window of a remote video.
virtual int UpdateRemoteView(const std::string& user_id, TUIStreamType type, liteav::TXView& view) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
user_id | string | User ID. |
type | TUIStreamType | Stream type. |
view | liteav::TXView | Rendering window handle. |
This API is used to send text messages.
virtual int SendChatMessage(const std::string& message) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
message | string | Message content. |
Sending Custom Messages
virtual int SendCustomMessage(const std::string& message) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
message | string | Message content. |
This API is used to enable/disable the mic of the specified user.
virtual int MuteUserMicrophone(const std::string& user_id, bool mute, Callback callback) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
user_id | string | User ID. |
mute | bool | Whether to disable. |
callback | Callback | API callback. |
This API is used to enable/disable the mic of all users.
virtual int MuteAllUsersMicrophone(bool mute) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
mute | bool | Whether to disable. |
This API is used to enable/disable the camera of the specified user.
virtual int MuteUserCamera(const std::string& user_id, bool mute, Callback callback) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
user_id | string | User ID. |
mute | bool | Whether to disable. |
callback | Callback | API callback. |
This API is used to enable/disable the camera of all users.
virtual int MuteAllUsersCamera(bool mute) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
mute | bool | Whether to disable. |
This API is used to mute/unmute the chat room.
virtual int MuteChatRoom(bool mute) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
mute | bool | Whether to disable. |
This API is used by the anchor to remove a member.
virtual int KickOffUser(const std::string& user_id, Callback callback) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
user_id | string | User ID. |
callback | Callback | API callback. |
This API is used by the anchor to start roll call.
virtual int StartCallingRoll() = 0;
This API is used by the anchor to stop roll call.
virtual int StopCallingRoll() = 0;
This API is used by a member to reply to roll call.
virtual int ReplyCallingRoll(Callback callback) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
callback | Callback | API callback. |
This API is used by the anchor to invite a member to speak.
virtual int SendSpeechInvitation(const std::string& user_id, Callback callback) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
user_id | string | User ID. |
callback | Callback | API callback. |
This API is used by the anchor to cancel the speech invitation to a member.
virtual int CancelSpeechInvitation(const std::string& user_id, Callback callback) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
user_id | string | User ID. |
callback | Callback | API callback. |
This API is used by a member to accept/reject the speech invitation from the anchor.
virtual int ReplySpeechInvitation(bool agree, Callback callback) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
agree | bool | Whether to approve. |
callback | Callback | API callback. |
This API is used by a member to apply to speak.
virtual int SendSpeechApplication(Callback callback) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
callback | Callback | API callback. |
This API is used by a member to cancel the speech application.
virtual int CancelSpeechApplication(Callback callback) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
callback | Callback | API callback. |
This API is used by the anchor to approve/reject the speech application of a member.
virtual int ReplySpeechApplication(const std::string& user_id, bool agree, Callback callback) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
user_id | string | User ID. |
callback | Callback | API callback. |
This API is used by the anchor to forbid speech application.
virtual int ForbidSpeechApplication(bool forbid) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
forbid | bool | Whether to forbid. |
This API is used by the anchor to stop the speech of the specified member.
virtual int SendOffSpeaker(const std::string& user_id, Callback callback) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
user_id | string | User ID. |
callback | Callback | API callback. |
This API is used by the anchor to stop the speech of all members.
virtual int SendOffAllSpeakers(Callback callback) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
callback | Callback | API callback. |
This API is used for a member to stop speaking and change their role to audience.
virtual int ExitSpeechState() = 0;
This API is used to get the device management object pointer.
virtual liteav::ITXDeviceManager* GetDeviceManager() = 0;
This API is used to get the screen sharing management object pointer.
virtual IScreenShareManager* GetScreenShareManager() = 0;
This API is used to start on-cloud recording.
virtual int StartCloudRecord() = 0;
This API is used to stop on-cloud recording.
virtual int StopCloudRecord() = 0;
This API is used to set effect levels of beauty, brightening, and rosy skin filters.
virtual int SetBeautyStyle(liteav::TRTCBeautyStyle style, uint32_t beauty_level,
uint32_t whiteness_level, uint32_t ruddiness_level) = 0;
You can do the following using TXBeautyManager
:
0
indicates that the filter is disabled. The larger the value, the more obvious the effect.0
indicates that the filter is disabled. The larger the value, the more obvious the effect.The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
style | liteav::TRTCBeautyStyle | Beauty filter style. |
beauty_level | uint32_t | strength of the beauty filter. |
whiteness_level | uint32_t | Strength of the skin brightening filter. |
ruddiness_level | uint32_t | Strength of the rosy skin filter. |
set QoS parameters
virtual int SetVideoQosPreference(TUIVideoQosPreference preference) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
preference | TUIVideoQosPreference | Network bandwidth limit policy. |
This API is used to get SDK version information.
virtual const char* GetSDKVersion() = 0;
void OnError(int code, const std::string& message);
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
code | int | Error code |
message | string | Error message. |
virtual void OnLogin(int code, const std::string& message) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
code | int | Error code |
message | string | Login message or error message of login failure. |
virtual void OnLogout(int code, const std::string& message) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
code | int | Error code |
message | string | Error message. |
Room creation.
virtual void OnCreateRoom(int code, const std::string& message) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
code | int | Error code |
message | string | Error message. |
Room dismissal.
virtual void OnDestroyRoom(int code, const std::string& message) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
code | int | Error code |
message | string | Error message. |
Room entry.
virtual void OnEnterRoom(int code, const std::string& message) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
code | int | Error code |
message | string | Error message. |
Room exit.
virtual void OnExitRoom(TUIExitRoomType type, const std::string& message) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
type | TUIExitRoomType | Room exit type. |
message | string | Error message. |
Rendering the first frame of the local video or a remote user started.
virtual void OnFirstVideoFrame(const std::string& user_id, const TUIStreamType stream_type) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
user_id | string | User ID. |
stream_type | TUIStreamType | Stream type. |
User volume level.
virtual void OnUserVoiceVolume(const std::string& user_id, int volume)
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
user_id | string | User ID. |
volume | int | User volume level. Value range: 0–100. |
Anchor change.
virtual void OnRoomMasterChanged(const std::string& user_id) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
user_id | string | User ID. |
A remote user entered the room.
virtual void OnRemoteUserEnter(const std::string& user_id) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
user_id | string | User ID. |
A remote user exited the room.
virtual void OnRemoteUserLeave(const std::string& user_id) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
user_id | string | User ID. |
Whether a remote user enabled the camera.
virtual void OnRemoteUserCameraAvailable(const std::string& user_id, bool available) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
user_id | string | User ID. |
available | bool | true: enabled; false: disabled. |
Whether a remote user enabled screen sharing.
virtual void OnRemoteUserScreenAvailable(const std::string& user_id, bool available) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
user_id | string | User ID. |
available | bool | true: enabled; false: disabled. |
Whether a remote user enabled mic.
virtual void OnRemoteUserAudioAvailable(const std::string& user_id, bool available) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
user_id | string | User ID. |
available | bool | true: enabled; false: disabled. |
A remote user started speaking.
virtual void OnRemoteUserEnterSpeechState(const std::string& user_id) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
user_id | string | User ID. |
A remote user stopped speaking.
virtual void OnRemoteUserExitSpeechState(const std::string& user_id) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
user_id | string | User ID. |
Callback for receiving a text message.
virtual void OnReceiveChatMessage(const std::string& user_id, const std::string& message) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
user_id | string | User ID. |
message | string | Text message. |
Callback for receiving a custom message.
virtual void OnReceiveCustomMessage(const std::string& user_id, const std::string& message) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
user_id | string | User ID. |
message | string | Custom message. |
A user received a speech invitation from the anchor.
virtual void OnReceiveSpeechInvitation() = 0;
A user received a speech invitation cancellation from the anchor.
virtual void OnReceiveInvitationCancelled() = 0;
The anchor received the acceptance to a speech invitation by a member.
virtual void OnReceiveReplyToSpeechInvitation(const std::string& user_id, bool agree) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
user_id | string | User ID. |
agree | bool | Whether the invitation was accepted. |
The anchor received a speech application from a member.
virtual void OnReceiveSpeechApplication(const std::string& user_id) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
user_id | string | User ID. |
A user canceled a speech application.
virtual void OnSpeechApplicationCancelled(const std::string& user_id) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
user_id | string | User ID. |
The anchor approved a speech application.
virtual void OnReceiveReplyToSpeechApplication(bool agree) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
agree | bool | Whether to approve. |
The anchor forbidden a speech application.
virtual void OnSpeechApplicationForbidden(bool forbidden) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
forbidden | bool | Whether to forbid. |
A member was asked to stop speaking.
virtual void OnOrderedToExitSpeechState() = 0;
The anchor started a roll call.
virtual void OnCallingRollStarted() = 0;
The anchor stopped a roll call.
virtual void OnCallingRollStopped() = 0;
A member replied to roll call.
virtual void OnMemberReplyCallingRoll(const std::string& user_id) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
user_id | string | User ID. |
The anchor muted/unmuted the room.
virtual void OnChatRoomMuted(bool muted) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
muted | bool | Whether to disable. |
The anchor disabled the mic.
virtual void OnMicrophoneMuted(bool muted) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
muted | bool | Whether to disable. |
The anchor disabled the camera.
virtual void OnCameraMuted(bool muted) = 0;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
muted | bool | Whether to disable. |
Callback of technical metric statistics.
virtual void OnStatistics(const liteav::TRTCStatistics& statis) {}
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
statis | liteav::TRTCStatistics | Statistics. |
Network quality.
virtual void OnNetworkQuality(const liteav::TRTCQualityInfo& local_quality, liteav::TRTCQualityInfo* remote_quality,
uint32_t remote_quality_count) {}
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
local_quality | liteav::TRTCQualityInfo | Local user quality information. |
remote_quality | liteav::TRTCQualityInfo* | Pointer to the remote user quality information. |
remote_quality_count | uint32_t | Number of remote users. |
Screen sharing started.
virtual void OnScreenCaptureStarted() {}
Screen sharing stopped.
void OnScreenCaptureStopped(int reason) {}
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
reason | int | Reason for stop. 0: the user stopped proactively; 1: stopped due to preemption by another application. |
Recording error.
virtual void OnRecordError(TXLiteAVLocalRecordError error, const std::string& messgae) {}
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
error | TXLiteAVLocalRecordError | Error message. |
messgae | string | Error description. |
Recording completion.
virtual void OnRecordComplete(const std::string& path) {}
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
path | string | Error description. |
Recording progress.
virtual void OnRecordProgress(int duration, int file_size) {}
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
duration | int | File duration. |
file_size | int | File size. |
Speaker volume level.
virtual void OnTestSpeakerVolume(uint32_t volume) {}
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
volume | uint32_t | Volume level. |
Mic volume level.
virtual void OnTestMicrophoneVolume(uint32_t volume) {}
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
volume | uint32_t | Volume level. |
System capturing volume level adjustment.
virtual void OnAudioDeviceCaptureVolumeChanged(uint32_t volume, bool muted) {}
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
volume | uint32_t | Volume level. |
muted | bool | Whether to disable. |
System playback volume level adjustment.
virtual void OnAudioDevicePlayoutVolumeChanged(uint32_t volume, bool muted) {}
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
volume | uint32_t | Volume level. |
muted | bool | Whether to disable. |
Was this page helpful?