tencent cloud

Feedback

TUIRoomEngine

Last updated: 2023-10-30 10:57:09

    TUIRoomEngine API Introduction

    TUIRoomEngine API is a No UI Interface for Conference Component, you can use this API to custom encapsulate according to your business needs.

    createTUIRoomEngine

    Create TUIRoomEngine Instance
    tuikit::TUIRoomEngine* createTUIRoomEngine();

    destroyTUIRoomEngine

    Destroy TUIRoomEngine Instance
    void destroyTUIRoomEngine(tuikit::TUIRoomEngine* roomEngine);
    Parameter
    Type
    Meaning
    roomEngine
    tuikit::TUIRoomEngine*
    TUIRoomEngine Instance Pointer, this pointer can only be obtained through the CreateTUIRoomEngine Interface.

    login

    Login interface, you need to initialize user information before entering the room and perform a series of operations.
    static void login(int sdkAppId, const char* userId, const char* userSig, TUICallback* callback);
    The parameters are as follows:
    Parameter
    Type
    Meaning
    sdkAppId
    int
    SDKAppID of Tencent Cloud communication application
    userId
    const char*
    User ID for Differentiate different users
    userSig
    const char*
    UserSig for Tencent Cloud flow authentication
    callback
    TUICallback*
    API Callback for notifying the success or failure of the interface call

    logout

    Logout interface, there will be actively leave the room operation, destroy resources.
    static void logout(TUICallback* callback);

    setSelfInfo

    Set local user name and avatar.
    static void SetSelfInfo(const char* userName, const char* avatarUrl, TUICallback* callback);
    The parameters are as follows:
    Parameter
    Type
    Meaning
    userName
    const char*
    User Name
    avatarUrl
    const char*
    User avatar URL address
    callback
    TUICallback*
    Callback of API, used to Notify the Success or Failure of the API call

    getSelfInfo

    Get the basic information of the local user login.
    static TUILoginUserInfo GetSelfInfo();

    addObserver

    Add TUIRoomEngine Event Callback.
    virtual void AddObserver(TUIRoomObserver* observer) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    observer
    TUIRoomObserver*
    Callback Instance Pointer, you can get various event notifications (such as: Error Code, Remote User Enter Room, Audio and Video Status Parameters, etc.) through TUIRoomObserver.

    removeObserver

    Remove TUIRoomEngine Event Callback.
    virtual void removeObserver(TUIRoomObserver* observer) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    observer
    TUIRoomObserver*
    TUIRoomEngine Event Callback

    createRoom

    Create room.
    virtual void createRoom(const TUIRoomInfo& roomInfo, TUICallback* callback) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    roomInfo
    const TUIRoomInfo&
    Room data
    callback
    TUICallback*
    Callback of API, used to Notify the Success or Failure of the API call

    destroyRoom

    Destroy Room.
    virtual void destroyRoom(TUICallback* callback) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    callback
    TUICallback*
    Callback of API, used to Notify the Success or Failure of the API call

    enterRoom

    Entered room.
    virtual void enterRoom(const char* roomId, TUIValueCallback<TUIRoomInfo>* callback) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    roomId
    const char*
    Room ID
    callback
    TUIValueCallback<TUIRoomInfo>*
    Get the entered Room data Callback

    exitRoom

    Exit Room.
    virtual void exitRoom(bool syncWaiting, TUICallback* callback) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    syncWaiting
    bool
    Whether to synchronize leaving the room
    callback
    TUICallback*
    Leave Room Result Callback

    connectOtherRoom

    Connect to other rooms.
    virtual TUIRequest connectOtherRoom(const char* roomId, const char* userId, int timeout, TUIRequestCallback* callback) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    roomId
    const char*
    Room ID
    userId
    const char*
    User ID
    timeout
    int
    Time
    callback
    TUIRequestCallback*
    Callback of API, used to Notify the Success or Failure of the API call

    disConnectOtherRoom

    Disconnect from other rooms
    virtual void disConnectOtherRoom(TUICallback* callback) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    callback
    TUICallback*
    Callback of API, used to Notify the Success or Failure of the API call

    fetchRoomInfo

    Get Room data.
    virtual void fetchRoomInfo(TUIValueCallback<TUIRoomInfo>* callback) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    callback
    TUIValueCallback<TUIRoomInfo>*
    Callback of API, used to Notify the Success or Failure of the API call

    updateRoomNameByAdmin

    Update Room ID
    virtual void updateRoomNameByAdmin(const char* roomName, TUICallback* callback) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    roomName
    const char*
    Room ID
    callback
    TUICallback*
    Callback of API, used to Notify the Success or Failure of the API call

    updateRoomSpeechModeByAdmin

    Set Management mode.
    virtual void updateRoomSpeechModeByAdmin(TUISpeechMode mode, TUICallback* callback) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    mode
    TUISpeechMode
    Management mode
    callback
    TUICallback*
    Callback of API, used to Notify the Success or Failure of the API call

    setLocalVideoView

    Set Local user Video Rendering View control
    virtual void setLocalVideoView(TUIVideoStreamType streamType, const TUIVideoView& view) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    streamType
    TUIVideoStreamType
    Local streams type
    view
    const TUIVideoView&
    To be rendered view, Video Rendering on this view

    openLocalCamera

    Open Local Camera, Start Video Capturing.
    virtual void openLocalCamera(bool isFront, TUIVideoQuality quality, TUICallback* callback) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    isFront
    bool
    Is it a front Camera (Invalid on Windows)
    quality
    TUIVideoQuality
    Video Quality
    callback
    TUICallback*
    Callback of API, used to Notify the Success or Failure of the API call

    closeLocalCamera

    Close Local Camera.
    virtual void closeLocalCamera() = 0;

    updateVideoQuality

    Set Local Video Parameter.
    virtual void updateVideoQuality(TUIVideoQuality quality) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    quality
    TUIVideoQuality
    Video Quality

    startScreenSharing

    Start Screen sharing.
    virtual void startScreenSharing(const TUISourceId& sourceId, TUICallback* callback) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    sourceId
    const TUISourceId&
    Handle of the Screen Sharing window or screen, which can be obtained by calling GetScreenSharingTargetList
    callback
    TUICallback*
    Callback of API, used to Notify the Success or Failure of the API call

    stopScreenSharing

    Stop Screen sharing.
    virtual void stopScreenSharing() = 0;

    getScreenSharingTargetList

    Get Sharing Object List.
    virtual void getScreenSharingTargetList(TUIListCallback<TUIShareTarget>* list) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    list
    TUIListCallback<TUIShareTarget>*
    Callback of API, used to Notify the Success or Failure of the API call

    selectScreenSharingTarget

    Select Screen Sharing Target.
    virtual void selectScreenSharingTarget(const TUISourceId& sourceId) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    sourceId
    const TUISourceId&
    Screen Sharing window or screen handle, can call GetScreenSharingTargetList to get.

    startPushLocalVideo

    Start Pushing Local Video.
    virtual void startPushLocalVideo() = 0;

    stopPushLocalVideo

    Stop Pushing Local Video.
    virtual void stopPushLocalVideo() = 0;

    openLocalMicrophone

    Open Local mic.
    virtual void openLocalMicrophone(TUIAudioQuality quality, TUICallback* callback) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    quality
    TUIAudioQuality
    Audio Quality
    callback
    TUICallback*
    Callback of API, used to Notify the Success or Failure of the API call

    closeLocalMicrophone

    Close Local mic.
    virtual void closeLocalMicrophone() = 0;

    updateAudioQuality

    Update Local Audio Codec Quality setting.
    virtual void updateAudioQuality(TUIAudioQuality quality) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    quality
    TUIAudioQuality
    Audio Quality

    startPushLocalAudio

    Start Pushing Local Audio.
    virtual void startPushLocalAudio() = 0;

    stopPushLocalAudio

    Stop Pushing Local Audio.
    virtual void stopPushLocalAudio() = 0;

    setRemoteVideoView

    Set Remote user Video Rendering View control.
    virtual void setRemoteVideoView(const char* userId, TUIVideoStreamType streamType, const TUIVideoView& view) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    userId
    const char*
    Remote User ID
    streamType
    TUIVideoStreamType
    Stream Type
    view
    const TUIVideoView&
    const TUIVideoView&
    Rendering Window Handle

    startPlayRemoteVideo

    Start Playback Remote user Video streams
    virtual void startPlayRemoteVideo(const char* userId, TUIVideoStreamType streamType, TUIPlayCallback* callback) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    userId
    const char*
    User ID
    streamType
    TUIVideoStreamType
    User streams type
    callback
    TUIPlayCallback*
    Callback of API, used to Notify the Success or Failure of the API call

    stopPlayRemoteVideo

    Stop Playback Remote user Video streams.
    virtual void stopPlayRemoteVideo(const char* userId, TUIVideoStreamType streamType) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    userId
    const char*
    User ID
    streamType
    TUIVideoStreamType
    User streams type

    muteRemoteAudioStream

    Mute Remote user
    virtual void muteRemoteAudioStream(const char* userId, bool isMute) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    userId
    const char*
    User ID
    isMute
    bool
    Whether to mute

    getUserList

    Get current User list in the room,.
    virtual void getUserList(uint64_t nextSequence, TUIValueCallback<TUIUserListResult>* callback) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    nextSequence
    uint64_t
    Pagination Fetch Flag, fill in 0 for the first Fetch, if the nextSeq in the Callback is not 0, you need to do Pagination, pass in the nextSeq to Fetch again until the nextSeq in the Callback is 0
    callback
    TUIValueCallback<TUIUserListResult>*
    Callback of API, used to Notify the Success or Failure of the API call

    getUserInfo

    Get User Learn more.
    virtual void getUserInfo(const char* userId, TUIValueCallback<TUIUserInfo>* callback) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    userId
    const char*
    User ID
    callback
    TUIValueCallback<TUIUserInfo>*
    Callback of API, used to Notify the Success or Failure of the API call

    changeUserRole

    Change user Role, only Administrator or Group owner can call
    virtual void changeUserRole(const char* userId, TUIRole role, TUICallback* callback) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    userId
    const char*
    User ID
    role
    TUIRole
    User Role
    callback
    TUICallback*
    Callback of API, used to Notify the Success or Failure of the API call

    kickRemoteUserOutOfRoom

    Kick user out of the room.
    virtual void kickRemoteUserOutOfRoom(const char* userId, TUICallback* callback) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    userId
    const char*
    User ID
    callback
    TUICallback*
    Callback of API, used to Notify the Success or Failure of the API call

    disableDeviceForAllUserByAdmin

    Control the permission status of whether all users in the current room can open Audio and Video streams capturing devices, such as: Prohibit All from turning on the mic, Prohibit All from turning on the Camera, Prohibit All from turning on Screen Sharing
    (Currently only available in Meeting Scenario, and only Administrator or Group Owner can invoke).
    virtual void disableDeviceForAllUserByAdmin(TUIMediaDevice device, bool isDisable, TUICallback* callback) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    device
    TUIMediaDevice
    Device
    isDisable
    bool
    Whether to Disable
    callback
    TUICallback*
    Callback of API, used to Notify the Success or Failure of the API call

    openRemoteDeviceByAdmin

    Request remote users to open media devices
    (Currently only available in the conference scene, and only administrators or group owners can call).
    virtual TUIRequest openRemoteDeviceByAdmin(const char* userId, TUIMediaDevice device, int timeout, TUIRequestCallback* callback) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    userId
    const char*
    User ID
    device
    TUIMediaDevice
    Device
    timeout
    int
    Timeout in seconds, if set to 0, SDK will not do timeout detection and will not trigger timeout Callback
    callback
    TUIRequestCallback*
    Callback of API, used to Notify the Success or Failure of the API call

    closeRemoteDeviceByAdmin

    Close remote users' media devices
    (Currently only available in the conference scene, and only administrators or group owners can call).
    virtual void closeRemoteDeviceByAdmin(const char* userId, TUIMediaDevice device, TUICallback* callback) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    userId
    const char*
    User ID
    device
    TUIMediaDevice
    Device
    callback
    TUICallback*
    Callback of API, used to Notify the Success or Failure of the API call

    applyToAdminToOpenLocalDevice

    Request to open local media devices
    (Currently only available in the conference scene, and only ordinary members can call).
    virtual TUIRequest applyToAdminToOpenLocalDevice(TUIMediaDevice device, int timeout, TUIRequestCallback* callback) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    device
    TUIMediaDevice
    Device
    timeout
    int
    Timeout in seconds, if set to 0, SDK will not do timeout detection and will not trigger timeout Callback
    callback
    TUIRequestCallback*
    Callback of API, used to Notify the Success or Failure of the API call

    setMaxSeatCount

    Set Maximum number of seats, only supported when entering the room and creating the room
    When roomType is RoomType.CONFERENCE (Education and Conference scene), maxSeatCount value is not limited;
    When roomType is RoomType.LIVE_ROOM (Live broadcast scene), maxSeatCount is limited to 16;
    virtual void setMaxSeatCount(uint32_t maxSeatCount, TUICallback* callback) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    maxSeatCount
    uint32_t
    Maximum number of seats
    callback
    TUICallback*
    Callback of API, used to Notify the Success or Failure of the API call

    getSeatList

    Get seat list
    virtual void getSeatList(TUIListCallback<TUISeatInfo>* callback) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    callback
    TUIListCallback<TUISeatInfo>*
    Callback of API, used to Notify the Success or Failure of the API call

    lockSeatByAdmin

    Lock seat.
    virtual void lockSeatByAdmin(int seatIndex, const TUISeatLockParams& lockParams, TUICallback* callback) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    seatIndex
    int
    Seat number
    lockParams
    TUISeatLockParams
    Lock microphone parameter
    callback
    TUICallback*
    Callback of API, used to Notify the Success or Failure of the API call

    takeSeat

    Get seat list.
    virtual TUIRequest takeSeat(int seatIndex, int timeout, TUIRequestCallback* callback) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    seatIndex
    int
    Seat number
    timeout
    int
    Timeout in seconds, if set to 0, SDK will not do timeout detection and will not trigger timeout Callback
    callback
    TUIRequestCallback*
    Callback of API, used to Notify the Success or Failure of the API call

    leaveSeat

    Local off microphone.
    virtual void leaveSeat(TUICallback* callback) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    callback
    TUICallback*
    Callback of API, used to Notify the Success or Failure of the API call

    takeUserOnSeatByAdmin

    Host/Administrator Invite User on microphone.
    virtual TUIRequest takeUserOnSeatByAdmin(int seatIndex, const char* userId, int timeout, TUIRequestCallback* callback) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    seatIndex
    int
    Seat number
    userId
    const char*
    User ID
    timeout
    int
    Timeout in seconds, if set to 0, SDK will not do timeout detection and will not trigger timeout Callback
    callback
    TUIRequestCallback*
    Callback of API, used to Notify the Success or Failure of the API call

    kickUserOffSeatByAdmin

    Host/Administrator Take User off microphone.
    virtual void kickUserOffSeatByAdmin(int seatIndex, const char* userId, TUICallback* callback) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    seatIndex
    int
    Seat number
    userId
    const char*
    User ID
    callback
    TUICallback*
    Callback of API, used to Notify the Success or Failure of the API call

    sendTextMessage

    Send Text message.
    virtual void sendTextMessage(const char* message, TUICallback* callback) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    message
    const char*
    Text message Content
    callback
    TUICallback*
    Callback of API, used to Notify the Success or Failure of the API call

    sendCustomMessage

    Send Custom message.
    virtual void sendCustomMessage(const char* message, TUICallback* callback) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    message
    const char*
    Custom message Content
    callback
    TUICallback*
    Callback of API, used to Notify the Success or Failure of the API call

    disableSendingMessageByAdmin

    Disable Remote user's Text message sending Ability (only Administrator or Group owner can call).
    virtual void disableSendingMessageByAdmin(const char* userId, bool isDisable, TUICallback* callback) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    userId
    const char*
    User ID
    isDisable
    bool
    Whether to Disable
    callback
    TUICallback*
    Callback of API, used to Notify the Success or Failure of the API call

    disableSendingMessageForAllUser

    Disable all users' Text message sending Ability (only Administrator or Group owner can call)
    virtual void disableSendingMessageForAllUser(bool isDisable, TUICallback* callback) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    isDisable
    bool
    Whether to Disable
    callback
    TUICallback*
    Callback of API, used to Notify the Success or Failure of the API call

    cancelRequest

    Cancel sent Request.
    virtual void cancelRequest(const char* requestId, TUICallback* callback) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    requestId
    const char*
    Request ID
    callback
    TUICallback*
    Callback of API, used to Notify the Success or Failure of the API call

    responseRemoteRequest

    Reply to Remote user's Request.
    virtual void responseRemoteRequest(const char* requestId, bool agree, TUICallback* callback) = 0;
    The parameters are as follows:
    Parameter
    Type
    Meaning
    requestId
    const char*
    Request ID
    agree
    bool
    Whether to agree
    callback
    TUICallback*
    Callback of API, used to Notify the Success or Failure of the API call

    getTRTCCloud

    Get TRTCCloud Instance.
    virtual void* getTRTCCloud() = 0;

    getDeviceManager

    Get deviceManager.
    virtual liteav::ITXDeviceManager* getDeviceManager() = 0;

    getAudioEffectManager

    Get Audio management.
    virtual liteav::ITXAudioEffectManager* getAudioEffectManager() = 0;
    
    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