tencent cloud

Feedback

TUIRoom (Windows and macOS)

Last updated: 2024-09-14 16:38:21
    TUIRoom is based on Tencent Real-Time Communication (TRTC) and Tencent Cloud Chat. With TUIRoom:
    The host can create a room, and participants can enter the room ID to join the room.
    The participants can share their screens with each other.
    All room members can send text chat messages and custom messages.
    Note
    All components of TUIKit use two basic PaaS services of Tencent Cloud, namely TRTC and Chat. When you activate TRTC, Chat and the trial edition of the Chat SDK (which supports up to 100 DAUs) will be activated automatically. For the billing details of Chat, see Pricing.
    TUIRoom is an open-source class depending on two closed-source Tencent Cloud SDKs. For the specific implementation process, see Integrating TUIRoom (Windows and macOS).
    The TRTC SDK is used as a low-latency video conference component.
    The Chat SDK (C++ edition) is used to implement chat messages.

    TUIRoom API Overview

    TUIRoomCore basic APIs

    API
    Description
    Gets a singleton object.
    Terminates a singleton object.
    Sets event callbacks.

    Room APIs

    API
    Description
    login
    Logs in.
    logout
    Logs out.
    Creates a room (called by host).
    Closes the room (called by host).
    EnterRoom
    Enters a room (called by participant).
    LeaveRoom
    Leaves a room (called by participant).
    Gets the room information.
    Gets the information of all members in the room.
    Gets the information of a user.
    Transfers the host permissions (called by host).

    Local audio/video operation APIs

    API
    Description
    Enables preview of the local video.
    Stops local video capturing and preview.
    Updates the local video rendering window.
    Enables mic capturing.
    Stops mic capturing.
    Enables system audio capturing.
    Disables system audio capturing.
    Sets the mirror mode for local video preview.

    Remote user APIs

    API
    Description
    Subscribes to and plays back the remote video image of a specified member.
    Unsubscribes from and stops the playback of a remote video image.
    Updates the video rendering window of a remote user.

    Chat message sending APIs

    API
    Description
    Sends a chat message.
    Sends a custom message.

    Room control APIs

    API
    Description
    Enables/Disables the mic of a specified user.
    Enables/Disables the mics of all users and syncs the status to room information.
    Enables/Disables the camera of a specified user.
    Enables/Disables the cameras of all users and syncs the status to room information.
    Enables/Disables chat messages (called by host).
    Removes a specified user from the room (called by host).
    Starts a roll call (called by host).
    Stops a roll call (called by host).
    Replies to a roll call (called by participant).
    Sends a speech invitation to a participant (called by host).
    Cancels a speech invitation sent to a participant (called by host).
    Accepts/Rejects the speech invitation of the host (called by participant).
    Sends a speech request (called by participant).
    Cancels a speech request (called by participant).
    Approves/Rejects the speech request of a participant (called by host).
    Disables requests to speak (called by host).
    Stops the speech of a participant (called by host).
    Stops the speech of all members (called by host).
    Exits the speaker mode (called by participant).

    Basic component APIs

    API
    Description
    Gets the local device management object ITXDeviceManager.
    Gets the screen sharing management object IScreenShareManager.

    On-cloud recording APIs

    API
    Description
    Starts on-cloud recording.
    Stops on-cloud recording.

    Beauty filter APIs

    API
    Description
    Sets beauty filters.

    Settings APIs

    API
    Description
    Sets network QoS control parameters.

    SDK version APIs

    API
    Description
    Gets the SDK version.

    TUIRoomCoreCallback API Overview

    Callbacks for error events

    API
    Description
    OnError
    Callback for error.

    Basic event callbacks

    API
    Description
    OnLogin
    The local user logged in.
    OnLogout
    The local user logged out.
    The room was created.
    The room was closed.
    The local user entered the room.
    The local user left the room.
    Started rendering the first video frame.
    The audio volume of a user.
    The host changed.

    Remote user event callbacks

    API
    Description
    A remote user entered the room.
    A remote user exited the room.
    A remote user enabled/disabled their camera.
    A remote user started/stopped screen sharing.
    A remote user turned on/off their mic.
    A remote user started speaking.
    A remote user stopped speaking.

    Message event callbacks

    API
    Description
    A text chat message was received.
    A custom message was received.

    Room control event callbacks

    API
    Description
    A participant received a speech invitation from the host.
    The speech invitation sent to a participant was canceled by the host.
    A participant accepted the speech invitation sent by the host.
    The host received a speech request from a participant.
    A participant canceled a speech request.
    The host approved a request to speak.
    The host disabled requests to speak.
    A participant was asked to stop speaking.
    The host started a roll call (received by participants)
    The host stopped a roll call (received by participants).
    A participant replied to the roll call (received by the host).
    The host disabled/enabled chat messages.
    The host disabled mic use.
    The host disabled camera use.

    Callbacks for statistics on network quality and technical metrics

    API
    Description
    Statistics on technical metrics.
    Network quality.

    Screen sharing event callbacks

    API
    Description
    Screen sharing started.
    Screen sharing stopped.

    Video recording callbacks

    API
    Description
    Recording error.
    Recording completed.
    The recording progress.

    Local device test callbacks

    API
    Description
    The speaker volume.
    The mic volume.
    The system capturing volume changed.
    The system audio playback volume changed.

    TUIRoomCore Basic APIs

    GetInstance

    This API is used to get a TUIRoomCore singleton object.
    static TUIRoomCore* GetInstance();

    DestroyInstance

    static void DestroyInstance();

    SetCallback

    This API is used to set the event callbacks of TUIRoomCore. You can use TRTCChorusRoomDelegate to get the callbacks.
    virtual void SetCallback(const TUIRoomCoreCallback* callback) = 0;

    Login

    Login
    virtual int Login(int sdk_appid, const std::string& user_id, const std::string& user_sig) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    sdk_appid
    int
    You can view SDKAppID in Application Management > Application Info of the TRTC console.
    user_id
    string
    The 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 own account system.
    user_sig
    string
    Tencent Cloud's proprietary security signature. For how to calculate and use it, see FAQs > UserSig.

    Logout

    Log out
    virtual int Logout() = 0;

    CreateRoom

    This API is used to create a room (called by the host).
    virtual int CreateRoom(const std::string& room_id, TUISpeechMode speech_mode) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    room_id
    string
    The room ID. You need to assign and manage the IDs in a centralized manner.
    speech_mode
    TUISpeechMode
    The speech mode.
    Generally, a host may need to call the following APIs:
    1. The host calls CreateRoom() to create a room, the result of which is returned via OnCreateRoom.
    2. The host calls EnterRoom() to enter the room.
    3. The host calls StartCameraPreview() to enable camera capturing and preview.
    4. The host calls StartLocalAudio() to enable the local mic.

    DestroyRoom

    This API is used to close a room (called by the host).
    virtual int DestroyRoom() = 0;

    EnterRoom

    This API is used to enter a room (called by a participant).
    virtual int EnterRoom(const std::string& room_id) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    room_id
    string
    The room ID.
    Generally, a participant joins a meeting in the following steps:
    1. The participant calls EnterRoom (passing in room_id) to enter the room.
    2. The participant calls startCameraPreview() to enable camera preview and calls StartLocalAudio() to enable mic capturing.
    3. The participant receives the OnRemoteUserCameraAvailable callback and calls StartRemoteView() to start playback.

    LeaveRoom

    This API is used to leave a room (called by a participant).
    virtual int LeaveRoom() = 0;

    GetRoomInfo

    This API is used to get the room information.
    virtual TUIRoomInfo GetRoomInfo() = 0;

    GetRoomUsers

    This API is used to get the information of all members in the room.
    virtual std::vector<TUIUserInfo> GetRoomUsers() = 0;

    GetUserInfo

    This API is used to get the information of a specified member.
    virtual const TUIUserInfo* GetUserInfo(const std::string& user_id) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    user_id
    string
    The user ID.

    SetSelfProfile

    This API is used to set the user profile.
    virtual int SetSelfProfile(const std::string& user_name, const std::string& avatar_url) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    user_name
    string
    The username.
    avatar_url
    string
    The URL of the user profile photo.

    TransferRoomMaster

    This API is used to transfer host permissions to another user.
    virtual int TransferRoomMaster(const std::string& user_id) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    user_id
    string
    The user ID.

    Local Push APIs

    StartCameraPreview

    This API is used to start the preview of the local camera.
    virtual int StartCameraPreview(const liteav::TXView& view) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    view
    liteav::TXView
    The window handle.

    StopCameraPreview

    This API is used to stop the preview of the local camera.
    virtual int StopCameraPreview() = 0;

    UpdateCameraPreview

    This API is used to update the local preview window.
    virtual int UpdateCameraPreview(const liteav::TXView& view) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    view
    liteav::TXView
    The window handle.

    StartLocalAudio

    This API is used to enable the local audio device.
    virtual int StartLocalAudio(const liteav::TRTCAudioQuality& quality) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    view
    liteav::TXView
    The window handle.

    StopLocalAudio

    This API is used to disable the local audio device.
    virtual int StopLocalAudio() = 0;

    StartSystemAudioLoopback

    This API is used to enable system audio capturing.
    virtual int StartSystemAudioLoopback() = 0;

    StopSystemAudioLoopback

    This API is used to disable system audio capturing.
    virtual int StopSystemAudioLoopback() = 0;

    SetVideoMirror

    This API is used to set the mirror mode.
    virtual int SetVideoMirror(bool mirror) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    mirror
    bool
    Whether to mirror the video.

    Remote User APIs

    StartRemoteView

    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 described below:
    Parameter
    Type
    Description
    user_id
    string
    The ID of the user whose video image is to be played back.
    liteav::TXView
    TXView
    The view that loads the video.
    type
    TUIStreamType
    The stream type.

    StopRemoteView

    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 described below:
    Parameter
    Type
    Description
    user_id
    string
    The ID of the user whose video image is to be stopped.
    type
    TUIStreamType
    The stream type.

    UpdateRemoteView

    This API is used to update the rendering window of a remote video.
    virtual int UpdateRemoteView(const std::string& user_id, TUIStreamType type, liteav::TXView& view) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    user_id
    string
    The user ID.
    type
    TUIStreamType
    The stream type.
    view
    liteav::TXView
    The rendering window handle.

    Message Sending APIs

    SendChatMessage

    This API is used to send a text message.
    virtual int SendChatMessage(const std::string& message) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    message
    string
    The message content.

    SendCustomMessage

    This API is used to send a custom message.
    virtual int SendCustomMessage(const std::string& message) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    message
    string
    The message content.

    Room Control APIs

    MuteUserMicrophone

    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 described below:
    Parameter
    Type
    Description
    user_id
    string
    The user ID.
    mute
    bool
    Whether to disable.
    callback
    Callback
    API callback.

    MuteAllUsersMicrophone

    This API is used to enable/disable the mics of all users.
    virtual int MuteAllUsersMicrophone(bool mute) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    mute
    bool
    Whether to disable.

    MuteUserCamera

    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 described below:
    Parameter
    Type
    Description
    user_id
    string
    The user ID.
    mute
    bool
    Whether to disable.
    callback
    Callback
    API callback.

    MuteAllUsersCamera

    This API is used to enable/disable the cameras of all users.
    virtual int MuteAllUsersCamera(bool mute) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    mute
    bool
    Whether to disable.

    MuteChatRoom

    This API is used to disable/enable chat messages.
    virtual int MuteChatRoom(bool mute) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    mute
    bool
    Whether to disable.

    KickOffUser

    This API is used by the host to remove a member from the room.
    virtual int KickOffUser(const std::string& user_id, Callback callback) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    user_id
    string
    The user ID.
    callback
    Callback
    API callback.

    StartCallingRoll

    This API is used by the host to start a roll call.
    virtual int StartCallingRoll() = 0;

    StopCallingRoll

    This API is used by the host to stop a roll call.
    virtual int StopCallingRoll() = 0;

    ReplyCallingRoll

    This API is used by a participant to reply to a roll call.
    virtual int ReplyCallingRoll(Callback callback) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    callback
    Callback
    API callback.

    SendSpeechInvitation

    This API is used by the host to invite a participant to speak.
    virtual int SendSpeechInvitation(const std::string& user_id, Callback callback) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    user_id
    string
    The user ID.
    callback
    Callback
    API callback.

    CancelSpeechInvitation

    This API is used by the host to cancel a speech invitation.
    virtual int CancelSpeechInvitation(const std::string& user_id, Callback callback) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    user_id
    string
    The user ID.
    callback
    Callback
    API callback.

    ReplySpeechInvitation

    This API is used by a participant to accept/reject the host’s invitation to speak.
    virtual int ReplySpeechInvitation(bool agree, Callback callback) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    agree
    bool
    Whether to approve.
    callback
    Callback
    API callback.

    SendSpeechApplication

    This API is used by a participant to send a request to speak.
    virtual int SendSpeechApplication(Callback callback) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    callback
    Callback
    API callback.

    CancelSpeechApplication

    This API is used by a participant to cancel the request to speak.
    virtual int CancelSpeechApplication(Callback callback) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    callback
    Callback
    API callback.

    ReplySpeechApplication

    This API is used by the host to approve/reject a participant’s speech request.
    virtual int ReplySpeechApplication(const std::string& user_id, bool agree, Callback callback) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    user_id
    string
    The user ID.
    callback
    Callback
    API callback.

    ForbidSpeechApplication

    This API is used by the host to disable requests to speak.
    virtual int ForbidSpeechApplication(bool forbid) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    forbid
    bool
    Whether to disable.

    SendOffSpeaker

    This API is used by the host to stop the speech of a participant.
    virtual int SendOffSpeaker(const std::string& user_id, Callback callback) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    user_id
    string
    The user ID.
    callback
    Callback
    API callback.

    SendOffAllSpeakers

    This API is used by the host to stop the speech of all members.
    virtual int SendOffAllSpeakers(Callback callback) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    callback
    Callback
    API callback.

    ExitSpeechState

    This API is used by a participant to exit the speaker mode.
    virtual int ExitSpeechState() = 0;

    Basic Component APIs

    GetDeviceManager

    This API is used to get the device management object pointer.
    virtual liteav::ITXDeviceManager* GetDeviceManager() = 0;

    GetScreenShareManager

    This API is used to get the screen sharing management object pointer.
    virtual IScreenShareManager* GetScreenShareManager() = 0;

    On-Cloud Recording APIs

    StartCloudRecord

    This API is used to start on-cloud recording.
    virtual int StartCloudRecord() = 0;

    StopCloudRecord

    This API is used to stop on-cloud recording.
    virtual int StopCloudRecord() = 0;

    Beauty Filter APIs

    SetBeautyStyle

    This API is used to set the strength of the beauty, skin brightening, and rosy skin effects
    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 the beauty filter manger:
    Set the beauty style to smooth or natural. The smooth style features more obvious skin smoothing effect.
    Set the strength of the beauty effect. Value range: 0-9. 0 indicates to disable the effect. The larger the value, the more obvious the effect.
    Set the skin brightening strength. Value range: 0-9. 0 indicates to disable the effect. The larger the value, the more obvious the effect.
    The parameters are described below:
    Parameter
    Type
    Description
    style
    liteav::TRTCBeautyStyle
    The beauty style.
    beauty_level
    uint32_t
    The strength of the beauty effect.
    whiteness_level
    uint32_t
    The strength of the skin brightening effect.
    ruddiness_level
    uint32_t
    The strength of the rosy skin effect.

    Settings APIs

    SetVideoQosPreference

    This API is used to set network QoS control parameters.
    virtual int SetVideoQosPreference(TUIVideoQosPreference preference) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    preference
    TUIVideoQosPreference
    The network QoS policy.

    SDK Version APIs

    GetSDKVersion

    This API is used to get the SDK version.
    virtual const char* GetSDKVersion() = 0;

    Error Event Callbacks

    OnError

    void OnError(int code, const std::string& message);
    The parameters are described below:
    Parameter
    Type
    Description
    code
    int
    The error code.
    message
    string
    The error message.

    Basic Event Callbacks

    OnLogin

    virtual void OnLogin(int code, const std::string& message) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    code
    int
    The error code.
    message
    string
    The login information or error message for login failure.

    OnLogout

    virtual void OnLogout(int code, const std::string& message) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    code
    int
    The error code.
    message
    string
    The error message.

    OnCreateRoom

    A room was created.
    virtual void OnCreateRoom(int code, const std::string& message) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    code
    int
    The error code.
    message
    string
    The error message.

    OnDestroyRoom

    The room was closed.
    virtual void OnDestroyRoom(int code, const std::string& message) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    code
    int
    The error code.
    message
    string
    The error message.

    OnEnterRoom

    The local user entered the room.
    virtual void OnEnterRoom(int code, const std::string& message) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    code
    int
    The error code.
    message
    string
    The error message.

    OnExitRoom

    The local user left the room.
    virtual void OnExitRoom(TUIExitRoomType type, const std::string& message) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    type
    TUIExitRoomType
    The room exit type.
    message
    string
    The error message.

    OnFirstVideoFrame

    The first video frame of the local user or a remote user was rendered.
    virtual void OnFirstVideoFrame(const std::string& user_id, const TUIStreamType stream_type) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    user_id
    string
    The user ID.
    stream_type
    TUIStreamType
    The stream type.

    OnUserVoiceVolume

    The audio volume of a user.
    virtual void OnUserVoiceVolume(const std::string& user_id, int volume)
    The parameters are described below:
    Parameter
    Type
    Description
    user_id
    string
    The user ID.
    volume
    int
    The volume level. Value range: 0-100.

    OnRoomMasterChanged

    The host changed.
    virtual void OnRoomMasterChanged(const std::string& user_id) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    user_id
    string
    The user ID.

    Remote User Callbacks

    OnRemoteUserEnter

    A remote user entered the room.
    virtual void OnRemoteUserEnter(const std::string& user_id) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    user_id
    string
    The user ID.

    OnRemoteUserLeave

    A remote user exited the room.
    virtual void OnRemoteUserLeave(const std::string& user_id) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    user_id
    string
    The user ID.

    OnRemoteUserCameraAvailable

    A remote user enabled/disabled their camera.
    virtual void OnRemoteUserCameraAvailable(const std::string& user_id, bool available) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    user_id
    string
    The user ID.
    available
    bool
    true: Enabled; false: Disabled.

    OnRemoteUserScreenAvailable

    A remote user started/stopped screen sharing.
    virtual void OnRemoteUserScreenAvailable(const std::string& user_id, bool available) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    user_id
    string
    The user ID.
    available
    bool
    true: Enabled; false: Disabled.

    OnRemoteUserAudioAvailable

    A remote user enabled/disabled their mic.
    virtual void OnRemoteUserAudioAvailable(const std::string& user_id, bool available) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    user_id
    string
    The user ID.
    available
    bool
    true: Enabled; false: Disabled.

    OnRemoteUserEnterSpeechState

    A remote user started speaking.
    virtual void OnRemoteUserEnterSpeechState(const std::string& user_id) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    user_id
    string
    The user ID.

    OnRemoteUserExitSpeechState

    A remote user stopped speaking.
    virtual void OnRemoteUserExitSpeechState(const std::string& user_id) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    user_id
    string
    The user ID.

    Chat Message Event Callbacks

    OnReceiveChatMessage

    A text chat message was received.
    virtual void OnReceiveChatMessage(const std::string& user_id, const std::string& message) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    user_id
    string
    The user ID.
    message
    string
    The message content.

    OnReceiveCustomMessage

    A custom message was received.
    virtual void OnReceiveCustomMessage(const std::string& user_id, const std::string& message) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    user_id
    string
    The user ID.
    message
    string
    The custom message content.

    Room Control Message Callbacks

    OnReceiveSpeechInvitation

    The host sent a speech invitation (received by a participant).
    virtual void OnReceiveSpeechInvitation() = 0;

    OnReceiveInvitationCancelled

    The host canceled the speech invitation (received by a participant).
    virtual void OnReceiveInvitationCancelled() = 0;

    OnReceiveReplyToSpeechInvitation

    A participant accepted/rejected a speech invitation (received by the host).
    virtual void OnReceiveReplyToSpeechInvitation(const std::string& user_id, bool agree) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    user_id
    string
    The user ID.
    agree
    bool
    Whether the invitation was accepted.

    OnReceiveSpeechApplication

    A participant sent a request to speak (received by the host).
    virtual void OnReceiveSpeechApplication(const std::string& user_id) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    user_id
    string
    The user ID.

    OnSpeechApplicationCancelled

    A participant canceled a speech request.
    virtual void OnSpeechApplicationCancelled(const std::string& user_id) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    user_id
    string
    The user ID.

    OnReceiveReplyToSpeechApplication

    The host approved/rejected a request to speak.
    virtual void OnReceiveReplyToSpeechApplication(bool agree) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    agree
    bool
    Whether the request was approved.

    OnSpeechApplicationForbidden

    The host disabled/enabled requests to speak.
    virtual void OnSpeechApplicationForbidden(bool forbidden) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    forbidden
    bool
    Whether requests to speak were disabled.

    OnOrderedToExitSpeechState

    A participant was asked to stop speaking.
    virtual void OnOrderedToExitSpeechState() = 0;

    OnCallingRollStarted

    The host started a roll call (received by participants).
    virtual void OnCallingRollStarted() = 0;

    OnCallingRollStopped

    The host stopped a roll call (received by participants).
    virtual void OnCallingRollStopped() = 0;

    OnMemberReplyCallingRoll

    A participant replied to the roll call (received by the host).
    virtual void OnMemberReplyCallingRoll(const std::string& user_id) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    user_id
    string
    The user ID.

    OnChatRoomMuted

    The host disabled/enabled chat messages.
    virtual void OnChatRoomMuted(bool muted) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    muted
    bool
    Disabled or not.

    OnMicrophoneMuted

    The host disabled mic use.
    virtual void OnMicrophoneMuted(bool muted) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    muted
    bool
    Disabled or not.

    OnCameraMuted

    The host disabled camera use.
    virtual void OnCameraMuted(bool muted) = 0;
    The parameters are described below:
    Parameter
    Type
    Description
    muted
    bool
    Disabled or not.

    Statistics Collection and Quality Callbacks

    OnStatistics

    Callback of technical metric statistics.
    virtual void OnStatistics(const liteav::TRTCStatistics& statis) {}
    The parameters are described below:
    Parameter
    Type
    Description
    statis
    liteav::TRTCStatistics
    Statistics.

    OnNetworkQuality

    Network quality.
    virtual void OnNetworkQuality(const liteav::TRTCQualityInfo& local_quality, liteav::TRTCQualityInfo* remote_quality,
    uint32_t remote_quality_count) {}
    The parameters are described below:
    Parameter
    Type
    Description
    local_quality
    liteav::TRTCQualityInfo
    The network quality of the local user.
    remote_quality
    liteav::TRTCQualityInfo*
    The network quality of remote users.
    remote_quality_count
    uint32_t
    The number of remote users.

    Screen Sharing Event Callbacks

    OnScreenCaptureStarted

    Screen sharing started.
    virtual void OnScreenCaptureStarted() {}

    OnScreenCaptureStopped

    Screen sharing stopped.
    void OnScreenCaptureStopped(int reason) {}
    The parameters are described below:
    Parameter
    Type
    Description
    reason
    int
    The reason screen sharing stopped. 0: The user stopped screen sharing; 1: Screen sharing was interrupted by another application.

    Video Recording Callbacks

    OnRecordError

    Recording error.
    virtual void OnRecordError(TXLiteAVLocalRecordError error, const std::string& messgae) {}
    The parameters are described below:
    Parameter
    Type
    Description
    error
    TXLiteAVLocalRecordError
    The error.
    messgae
    string
    The error message.

    OnRecordComplete

    Recording completed.
    virtual void OnRecordComplete(const std::string& path) {}
    The parameters are described below:
    Parameter
    Type
    Description
    path
    string
    The error description.

    OnRecordProgress

    The recording progress.
    virtual void OnRecordProgress(int duration, int file_size) {}
    The parameters are described below:
    Parameter
    Type
    Description
    duration
    int
    The file duration.
    file_size
    int
    The file size.

    Local Device Test Callbacks

    OnTestSpeakerVolume

    The speaker volume.
    virtual void OnTestSpeakerVolume(uint32_t volume) {}
    The parameters are described below:
    Parameter
    Type
    Description
    volume
    uint32_t
    The volume level.

    OnTestMicrophoneVolume

    The mic volume.
    virtual void OnTestMicrophoneVolume(uint32_t volume) {}
    The parameters are described below:
    Parameter
    Type
    Description
    volume
    uint32_t
    The volume level.

    OnAudioDeviceCaptureVolumeChanged

    The system capturing volume changed.
    virtual void OnAudioDeviceCaptureVolumeChanged(uint32_t volume, bool muted) {}
    The parameters are described below:
    Parameter
    Type
    Description
    volume
    uint32_t
    The volume level.
    muted
    bool
    Whether capturing was disabled.

    OnAudioDevicePlayoutVolumeChanged

    The system playback volume level changed.
    virtual void OnAudioDevicePlayoutVolumeChanged(uint32_t volume, bool muted) {}
    The parameters are described below:
    Parameter
    Type
    Description
    volume
    uint32_t
    The volume level.
    muted
    bool
    Whether playback was disabled.
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support