tencent cloud

Feedback

TUIRoomEngine

Last updated: 2024-12-20 16:11:45
    Copyright (c) 2024 Tencent. All rights reserved.
    
    Module: TUIRoomEngine @ TUIKitEngine.
    Function: TUIRoomEngine Main function APIs.
    Version: 12.0
    
    TUIRoomEngine

    TUIRoomEngine

    FuncList
    DESC
    Destroy the TUIRoomEngine instance (singleton mode)
    After creating a TUIRoomEngine instance, you should login with sdkAppId, userId and userSig then you can call TUIRoomEngine instance and other function.
    Log out of your account. If you are in the room, there will be active leaving room and destroying resource operations.
    Update user name and avatar for logged-in user.
    Return the basic information of the logged-in user, including nickname and avatar.
    Update user basic information for logged-in user.
    Set event observer.
    Remove event observer.
    Create a room.
    Dismiss the room.
    Enter a room.
    Enter a room.
    Enter a room.
    Exit the room.
    Fetch room information.
    Fetch room information.
    Update room name (only support for administrators or room owner).
    Update room seat mode (only support for administrators or room owner).
    Update room password.
    Get room metadata.
    Set room metadata, if the key already exists, update its value, if not, add the key.
    Set the local camera to preview the render view.
    Open the local camera.
    Close the local camera.
    Start publishing local video stream, default enabled.
    Stop publishing local video stream.
    Update video encoding quality.
    Set the video encoding parameters.
    Set the video resolution mode (horizontal resolution or vertical resolution).
    Turn on gravity sensing mode. (only availble on mobile OS and the camera capture scene inside the SDK).
    Start screen sharing (only available on mobile OS).
    Stop screen sharing.
    Open local microphone.
    Close the local microphone.
    Update audio encoding quality.
    Pause publishing the local audio stream.
    Resume publishing the local audio stream.
    Enable system audio sharing
    Set the render view for remote user.
    Start playing the remote user's video stream.
    Stop playing the remote user's video stream.
    Mute the remote user's audio stream.
    Get the list of user in the room.
    Get user information.
    Change user role (only support for administrators or room owner).
    Change user nickname in the room (only support to change all user for administrators or room owner, user can only change by self).
    Kick the remote user out of the room (only support for administrators or room owner).
    Add a tag for the user (only support for administrators or room owner).
    Remove tag for user (only support for room owner).
    Get user information in the room based on the tag.
    Set custom information for room users.
    The owner or administrator control that all users whether can open device. For example: all users are prohibited from opening the microphone(only available in the conference scenario).
    Request the remote user to open the media device (only support for administrators or room owner).
    Close remote user media devices (only support for administrators or room owner).
    Apply to open the local media device (available to general users).
    Set the maximum number of seat (only available before entering room and when creating room).
    Get seat list.
    Lock the seat (only support for administrators or room owner).
    Take the seat.
    Leave the seat.
    Move to seat.
    Invite user to take the seat (only support for administrators or room owner).
    Kick off the user from seat (only support for administrators or room owner).
    Get the request list of users who want to take the seat in the room (only support for administrators or room owner).
    Disable the ability of remote users to send messages (only support for administrators or room owner).
    Disable the ability of all users to send messages (only support for administrators or room owner).
    Cancel request.
    Response request.
    Set the beauty level.
    Set whitening level.
    Get the extension.
    Get device management class.
    Get live-connection management class.
    Get live-battle management class.
    Call experimental APIs.

    destroySharedInstance

    destroySharedInstance

    Destroy the TUIRoomEngine instance (singleton mode)

    Note
    The function supports the CONFERENCE and LIVE room types.Use destroySharedInstance to release the singleton object.

    login

    login
    void login
    (Context context
    
    int sdkAppId
    
    String userId
    
    String userSig
    
    TUIRoomDefine.ActionCallback callback)

    After creating a TUIRoomEngine instance, you should login with sdkAppId, userId and userSig then you can call TUIRoomEngine instance and other function.

    Param
    DESC
    sdkAppId
    It is Application ID. You can see the SDKAppId by creating an application in the TRTC Console.
    userId
    User ID, it is the unique identifier used by Tencent Cloud to distinguish users.
    userSig
    The user signature designed by Tencent Cloud based on the UserId, which is used to access Tencent Cloud services. More details, see UserSig
    Note
    The function supports the CONFERENCE and LIVE room types.
    If a user is kicked off while online, the SDK will notify you through the $onKickedOffLine$ callback in $TUIRoomObserver$.

    logout

    logout
    void logout
    (TUIRoomDefine.ActionCallback callback)

    Log out of your account. If you are in the room, there will be active leaving room and destroying resource operations.

    Note
    The function supports the CONFERENCE and LIVE room types.

    setSelfInfo

    setSelfInfo
    void setSelfInfo
    (String userName
    
    String avatarURL
    
    TUIRoomDefine.ActionCallback callback)

    Update user name and avatar for logged-in user.

    Param
    DESC
    avatarURL
    User avatar URL.
    userName
    User name.
    Note
    The function supports the CONFERENCE and LIVE room types.

    getSelfInfo

    getSelfInfo

    Return the basic information of the logged-in user, including nickname and avatar.

    Note
    The function supports the CONFERENCE and LIVE room types.

    Return Desc:

    LoginUserInfo User login information.

    setSelfInfo

    setSelfInfo
    void setSelfInfo
    (TUIRoomDefine.LoginUserInfo userInfo
    
    TUIRoomDefine.ActionCallback callback)

    Update user basic information for logged-in user.

    Param
    DESC
    userInfo
    Local user information.
    Note
    The function supports the CONFERENCE and LIVE room types.

    addObserver

    addObserver
    void addObserver
    (TUIRoomObserver observer)

    Set event observer.

    Param
    DESC
    observer
    Listening instance.
    Note
    The function supports the CONFERENCE and LIVE room types.
    You can use TUIRoomObserver to receive roomEngine events. More details, see TUIRoomObserver.

    removeObserver

    removeObserver
    void removeObserver
    (TUIRoomObserver observer)

    Remove event observer.

    Param
    DESC
    observer
    The event observer to be removed.
    Note
    The function supports the CONFERENCE and LIVE room types.

    createRoom

    createRoom
    void createRoom
    (TUIRoomDefine.RoomInfo roomInfo
    
    TUIRoomDefine.ActionCallback callback)

    Create a room.

    Param
    DESC
    roomInfo
    Room information. More details, see TUIRoomInfo.
    Note
    The function supports the CONFERENCE and LIVE room types.
    You can create a conference room or live room through this API.

    destroyRoom

    destroyRoom
    void destroyRoom
    (TUIRoomDefine.ActionCallback callback)

    Dismiss the room.

    Note
    The function supports the CONFERENCE and LIVE room types.
    After the room was dismissed, the SDK notifies the users in the room through the onRoomDismissed callback in $TUIRoomObserver$.

    enterRoom

    enterRoom
    void enterRoom
    (String roomId
    
    TUIRoomDefine.GetRoomInfoCallback callback)

    Enter a room.

    Param
    DESC
    roomId
    Room ID.
    Note
    The function only supports the CONFERENCE room type.
    The limit on the number of rooms that a single device can enter at the same time is: 1 for conference and 3 for live . If the limit is exceeded, the device will exit the earliest joined room. When multiple devices log in with the same account, only one device is allowed to enter a conference room with the same ID. When other devices try to enter, the earlier entered device will be kicked out.
    After entered the room, the SDK will notify the user in the room through the $onRemoteUserEnterRoom$ callback in $TUIRoomObserver$.

    enterRoom

    enterRoom
    void enterRoom
    (String roomId
    
    TUIRoomDefine.RoomType roomType
    
    TUIRoomDefine.GetRoomInfoCallback callback)

    Enter a room.

    Param
    DESC
    roomId
    Room ID.
    roomType
    Room type. More details, see TUIRoomType.
    Note
    The function supports the CONFERENCE and LIVE room types.
    The limit on the number of rooms that a single device can enter at the same time is: 1 for conference and 3 for live . If the limit is exceeded, the device will exit the earliest joined room. When multiple devices log in with the same account, only one device is allowed to enter a conference room with the same ID. When other devices try to enter, the earlier entered device will be kicked out.
    After entered the room, the SDK will notify the user in the room through the $onRemoteUserEnterRoom$ callback in $TUIRoomObserver$.

    enterRoom

    enterRoom
    void enterRoom
    (String roomId
    
    TUIRoomDefine.RoomType roomType
    
    TUIRoomDefine.EnterRoomOptions options
    
    TUIRoomDefine.GetRoomInfoCallback callback)

    Enter a room.

    Param
    DESC
    options
    Roon options. More details, see TUIEnterRoomOptions.
    roomId
    Room ID.
    roomType
    Room type. More details, see TUIRoomType.
    Note
    The function supports the CONFERENCE and LIVE room types.
    The limit on the number of rooms that a single device can enter at the same time is: 1 for conference and 3 for live . If the limit is exceeded, the device will exit the earliest joined room. When multiple devices log in with the same account, only one device is allowed to enter a conference room with the same ID. When other devices try to enter, the earlier entered device will be kicked out.
    After entering the room, the SDK will notify the user in the room through the $onRemoteUserEnterRoom$ callback in $TUIRoomObserver$.

    exitRoom

    exitRoom
    void exitRoom
    (boolean syncWaiting
    
    TUIRoomDefine.ActionCallback callback)

    Exit the room.

    Param
    DESC
    syncWaiting
    true: wait for exit request finished, false: exit immediately.
    Note
    The function supports the CONFERENCE and LIVE room types.
    After left the room, the SDK will notify the user in the room through the onRemoteUserLeaveRoom callback in $TUIRoomObserver$.

    fetchRoomInfo

    fetchRoomInfo
    void fetchRoomInfo
    (TUIRoomDefine.GetRoomInfoCallback callback)

    Fetch room information.

    Note
    The function supports the CONFERENCE and LIVE room types.
    You can get room information through this API.

    fetchRoomInfo

    fetchRoomInfo
    void fetchRoomInfo
    (String roomId
    
    TUIRoomDefine.RoomType roomType
    
    TUIRoomDefine.GetRoomInfoCallback callback)

    Fetch room information.

    Param
    DESC
    roomId
    Room ID.
    roomType
    Room type. More details, see TUIRoomType.
    Note
    The function supports the CONFERENCE and LIVE room types.

    Return Desc:

    Successfully fetched the room information callback, which will include room information of $TUIRoomInfo.

    updateRoomNameByAdmin

    updateRoomNameByAdmin
    void updateRoomNameByAdmin
    (String roomName
    
    TUIRoomDefine.ActionCallback callback)

    Update room name (only support for administrators or room owner).

    Param
    DESC
    roomName
    Room name.
    Note
    The function supports the CONFERENCE and LIVE room types.
    After the room name was updated, the SDK notifies users in the room through the onRoomNameChanged callback in $TUIRoomObserver$.

    updateRoomSeatModeByAdmin

    updateRoomSeatModeByAdmin
    void updateRoomSeatModeByAdmin
    (TUIRoomDefine.SeatMode seatMode
    
    TUIRoomDefine.ActionCallback callback)

    Update room seat mode (only support for administrators or room owner).

    Param
    DESC
    seatMode
    TUISeatModeFreeToTake: Free to take seat mode, users can take the seat without application;
    TUISeatModeApplyToTake: Apply to take seat mode, users can only take the seat after the owner or administrator approved.
    Note
    The function supports the CONFERENCE and LIVE room types.
    After the room seat mode was updated, the SDK will notify users in the room through the onRoomSeatModeChanged callback in $TUIRoomObserver$.

    updateRoomPasswordByAdmin

    updateRoomPasswordByAdmin
    void updateRoomPasswordByAdmin
    (String password
    
    TUIRoomDefine.ActionCallback callback)

    Update room password.

    Param
    DESC
    password
    Room password.
    Note
    The function only supports the CONFERENCE room type.

    getRoomMetadata

    getRoomMetadata
    void getRoomMetadata
    (List<String> keys
    
    TUIRoomDefine.GetRoomMetadataCallback callback)

    Get room metadata.

    Param
    DESC
    keys
    Room metadata key list, if keys are passed as empty, all metadata will be retrieved.
    Note
    The function only supports the LIVE room type.

    setRoomMetadataByAdmin

    setRoomMetadataByAdmin
    void setRoomMetadataByAdmin
    (HashMap<String, String> metadata
    
    TUIRoomDefine.ActionCallback callback)

    Set room metadata, if the key already exists, update its value, if not, add the key.

    Param
    DESC
    metadata
    Key-Value in room metadata.
    Note
    The function only supports the LIVE room type.

    setLocalVideoView

    setLocalVideoView
    void setLocalVideoView
    (TUIVideoView view)

    Set the local camera to preview the render view.

    Param
    DESC
    view
    Render view.
    Note
    The function supports the CONFERENCE and LIVE room types.

    openLocalCamera

    openLocalCamera
    void openLocalCamera
    (boolean isFront
    
    TUIRoomDefine.VideoQuality quality
    
    TUIRoomDefine.ActionCallback callback)

    Open the local camera.

    Param
    DESC
    isFront
    true: front false: rear (only available on mobile OS).
    Note
    The function supports the CONFERENCE and LIVE room types.
    After opened the local camera in the room, the local video stream is published by default, and the SDK notifies the users in the room through the $onUserVideoStateChanged$ callback in $TUIRoomObserver$.

    closeLocalCamera

    closeLocalCamera

    Close the local camera.

    Note
    The function supports the CONFERENCE and LIVE room types.
    After closed the local camera in the room, the SDK notifies users in the room through the onUserVideoStateChanged callback in $TUIRoomObserver$.

    startPushLocalVideo

    startPushLocalVideo

    Start publishing local video stream, default enabled.

    Note
    The function supports the CONFERENCE and LIVE room types.
    After published the local video, if your local camera is opening, the SDK will notify users in the room through the onUserVideoStateChanged callback in $TUIRoomObserver$.

    stopPushLocalVideo

    stopPushLocalVideo

    Stop publishing local video stream.

    Note
    The function supports the CONFERENCE and LIVE room types.
    After stopped published local video, the SDK notifies users in the room through the onUserVideoStateChanged callback in $TUIRoomObserver$.

    updateVideoQuality

    updateVideoQuality
    void updateVideoQuality
    (TUIRoomDefine.VideoQuality quality)

    Update video encoding quality.

    Note
    The function supports the CONFERENCE and LIVE room types.

    updateVideoQualityEx

    updateVideoQualityEx
    void updateVideoQualityEx
    (TUIRoomDefine.VideoStreamType streamType
    
    TUIRoomDefine.RoomVideoEncoderParams params)

    Set the video encoding parameters.

    Param
    DESC
    params
    Encoding parameters of the video. More details, see RoomVideoEncoderParams.
    streamType
    The type of video stream. More details, see VideoStreamType.
    Note
    The function supports the CONFERENCE and LIVE room types.

    setVideoResolutionMode

    setVideoResolutionMode
    void setVideoResolutionMode
    (TUIRoomDefine.VideoStreamType streamType
    
    TUIRoomDefine.ResolutionMode resolutionMode)

    Set the video resolution mode (horizontal resolution or vertical resolution).

    Param
    DESC
    resolutionMode
    Resolution mode. More details, see ResolutionMode.
    streamType
    The type of video stream. More details, see VideoStreamType.
    Note
    The function supports the CONFERENCE and LIVE room types.

    enableGravitySensor

    enableGravitySensor
    void enableGravitySensor
    (boolean enable)

    Turn on gravity sensing mode. (only availble on mobile OS and the camera capture scene inside the SDK).

    Param
    DESC
    enable
    true: Open false: Close.
    Note
    The function supports the CONFERENCE and LIVE room types.
    After turning on gravity sensing, if the device on the collection end rotates, the images on the collection end and the audience will be rendered accordingly to ensure that the image in the field of view is always facing up.

    startScreenSharing

    startScreenSharing

    Start screen sharing (only available on mobile OS).

    Note
    The function supports the CONFERENCE and LIVE room types.
    After screen sharing started, the SDK notifies users in the room through the onUserVideoStateChanged callback in $TUIRoomObserver$.

    stopScreenSharing

    stopScreenSharing

    Stop screen sharing.

    After screen sharing ended, the SDK notifies users in the room through the onUserVideoStateChanged callback in $TUIRoomObserver$ and also notifies you through the onUserScreenCaptureStopped callback.

    openLocalMicrophone

    openLocalMicrophone
    void openLocalMicrophone
    (TUIRoomDefine.AudioQuality quality
    
    TUIRoomDefine.ActionCallback callback)

    Open local microphone.

    Param
    DESC
    quality
    Audio quality.
    Note
    The function supports the CONFERENCE and LIVE room types.
    After opened the local microphone in a room, the SDK notifies users in the room through the onUserAudioStateChanged callback in $TUIRoomObserver$.

    closeLocalMicrophone

    closeLocalMicrophone

    Close the local microphone.

    Note
    The function supports the CONFERENCE and LIVE room types.
    After closed the local microphone in the room, the SDK notifies the users in the room through the onUserAudioStateChanged callback in $TUIRoomObserver$.

    updateAudioQuality

    updateAudioQuality
    void updateAudioQuality
    (TUIRoomDefine.AudioQuality quality)

    Update audio encoding quality.

    Note
    The function supports the CONFERENCE and LIVE room types.

    muteLocalAudio

    muteLocalAudio

    Pause publishing the local audio stream.

    Note
    The function supports the CONFERENCE and LIVE room types.
    If you have opened your microphone and call the API to pause publishing the local audio stream, the SDK will notify the users in the room through the onUserAudioStateChanged callback in $TUIRoomObserver$.

    unmuteLocalAudio

    unmuteLocalAudio
    void unmuteLocalAudio
    (TUIRoomDefine.ActionCallback callback)

    Resume publishing the local audio stream.

    Note
    The function supports the CONFERENCE and LIVE room types.
    If you have opened your microphone and call the API to resume publishing the local audio stream, the SDK will notify the users in the room through the onUserAudioStateChanged callback in $TUIRoomObserver$.

    enableSystemAudioSharing

    enableSystemAudioSharing
    void enableSystemAudioSharing
    (boolean enable)

    Enable system audio sharing

    This API captures system audio data from your device and mixes it into the current audio stream of the SDK. This ensures that other users in the room hear the audio played back by the another app.
    Note
    The function supports the CONFERENCE and LIVE room types.
    Android: You need to use this interface to enable system sound capture first, and it will take effect only when you call startScreenCapture to enable screen sharing.

    setRemoteVideoView

    setRemoteVideoView
    void setRemoteVideoView
    (String userId
    
    TUIRoomDefine.VideoStreamType streamType
    
    TUIVideoView view)

    Set the render view for remote user.

    Param
    DESC
    streamType
    The type of video stream. More details, see VideoStreamType.
    userId
    Remote user ID.
    view
    Render view.
    Note
    The function supports the CONFERENCE and LIVE room types.

    startPlayRemoteVideo

    startPlayRemoteVideo
    void startPlayRemoteVideo
    (String userId
    
    TUIRoomDefine.VideoStreamType streamType
    
    TUIRoomDefine.PlayCallback callback)

    Start playing the remote user's video stream.

    Param
    DESC
    streamType
    The type of video stream. More details, see VideoStreamType.
    userId
    User ID.
    Note
    The function supports the CONFERENCE and LIVE room types.

    stopPlayRemoteVideo

    stopPlayRemoteVideo
    void stopPlayRemoteVideo
    (String userId
    
    TUIRoomDefine.VideoStreamType streamType)

    Stop playing the remote user's video stream.

    Param
    DESC
    streamType
    The type of video stream. More details, see VideoStreamType.
    userId
    User ID.
    Note
    The function supports the CONFERENCE and LIVE room types.

    muteRemoteAudioStream

    muteRemoteAudioStream
    void muteRemoteAudioStream
    (String userId
    
    boolean isMute)

    Mute the remote user's audio stream.

    Param
    DESC
    isMute
    true: pause pulling remote user's audio stream, false: resume pulling remote user's audio stream.
    userId
    User ID.
    Note
    The function supports the CONFERENCE and LIVE room types.

    getUserList

    getUserList
    void getUserList
    (long nextSequence
    
    TUIRoomDefine.GetUserListCallback callback)

    Get the list of user in the room.

    Param
    DESC
    nextSequence
    Filling in 0 for the first request, if the returned data of the callback is not zero, paging is required, continue the operation until it is 0.
    Note
    The function supports the CONFERENCE and LIVE room types.

    getUserInfo

    getUserInfo
    void getUserInfo
    (String userId
    
    TUIRoomDefine.GetUserInfoCallback callback)

    Get user information.

    Param
    DESC
    userId
    User ID.
    Note
    The function supports the CONFERENCE and LIVE room types.

    changeUserRole

    changeUserRole
    void changeUserRole
    (String userId
    
    TUIRoomDefine.Role role
    
    TUIRoomDefine.ActionCallback callback)

    Change user role (only support for administrators or room owner).

    Param
    DESC
    role
    User role. More details, see Role.
    userId
    User ID.
    Note
    The function supports the CONFERENCE and LIVE room types.
    After the user role changed, the SDK will notify the users in the room through the onUserInfoChanged callback in $TUIRoomObserver$.

    changeUserNameCard

    changeUserNameCard
    void changeUserNameCard
    (String userId
    
    String nameCard
    
    TUIRoomDefine.ActionCallback callback)

    Change user nickname in the room (only support to change all user for administrators or room owner, user can only change by self).

    Param
    DESC
    nameCard
    User nickname to set, maximum support is 32 bytes
    userId
    User ID to change.
    Note
    The function only supports the CONFERENCE room type.
    After the user nickname changed, the SDK will notify the users in the room through the onUserInfoChanged callback in $TUIRoomObserver$.

    kickRemoteUserOutOfRoom

    kickRemoteUserOutOfRoom
    void kickRemoteUserOutOfRoom
    (String userId
    
    TUIRoomDefine.ActionCallback callback)

    Kick the remote user out of the room (only support for administrators or room owner).

    Param
    DESC
    userId
    User ID.
    Note
    The function supports the CONFERENCE and LIVE room types.
    After the remote user is kicked off from the room, the SDK notifies the kicked user through the onKickedOutOfRoom callback in $TUIRoomObserver$ and notifies users in the room through onRemoteUserLeaveRoom.

    addCategoryTagForUsers

    addCategoryTagForUsers
    void addCategoryTagForUsers
    (int tag
    
    List<String> userList
    
    TUIRoomDefine.ActionCallback callback)

    Add a tag for the user (only support for administrators or room owner).

    Param
    DESC
    tag
    Integer type, it is recommended that this value must be greater than or equal to 1000, you can customize it.
    userList
    User list.
    Note
    The function only supports the CONFERENCE room type.

    removeCategoryTagForUsers

    removeCategoryTagForUsers
    void removeCategoryTagForUsers
    (int tag
    
    List<String> userList
    
    TUIRoomDefine.ActionCallback callback)

    Remove tag for user (only support for room owner).

    Param
    DESC
    tag
    Integer type, it is recommended that this value must be greater than or equal to 1000, you can customize it.
    userList
    User list.
    Note
    The function only supports the CONFERENCE room type.

    getUserListByTag

    getUserListByTag
    void getUserListByTag
    (int tag
    
    long nextSequence
    
    TUIRoomDefine.GetUserListCallback callback)

    Get user information in the room based on the tag.

    Param
    DESC
    nextSequence
    Filling in 0 for the first request, if the returned data of the callback is not zero, paging is required, continue the operation until it is 0.
    tag
    Integer type, it is recommended that this value must be greater than or equal to 1000, you can customize it.
    Note
    The function only supports the CONFERENCE room type.

    setCustomInfoForUser

    setCustomInfoForUser
    void setCustomInfoForUser
    (String userId
    
    HashMap<String
    
    byte[]> customInfo
    
    TUIRoomDefine.ActionCallback callback)

    Set custom information for room users.

    Param
    DESC
    customInfo
    Custom information.
    userId
    User userId.
    Note
    The function only supports the CONFERENCE room type.

    disableDeviceForAllUserByAdmin

    disableDeviceForAllUserByAdmin
    void disableDeviceForAllUserByAdmin
    (TUIRoomDefine.MediaDevice device
    
    boolean isDisable
    
    TUIRoomDefine.ActionCallback callback)

    The owner or administrator control that all users whether can open device. For example: all users are prohibited from opening the microphone(only available in the conference scenario).

    Param
    DESC
    device
    Device. More details, see: MediaDevice.
    isDisable
    true: disable user to open device, false: enable user to open device.
    Note
    The function only supports the CONFERENCE room type.
    After the API call is successful:
    If the device type is MICROPHONE , the SDK will notify the users in the room through onAllUserMicrophoneDisableChanged in $TUIRoomObserver$.
    If the device type is CAMERA , the SDK will notify the users in the room through onAllUserCameraDisableChanged in $TUIRoomObserver$.
    If the device type is SCREEN_SHARING , the SDK will notify the users in the room through onScreenShareForAllUserDisableChanged in $TUIRoomObserver$.

    openRemoteDeviceByAdmin

    openRemoteDeviceByAdmin
    Request openRemoteDeviceByAdmin
    (String userId
    
    TUIRoomDefine.MediaDevice device
    
    int timeout
    
    TUIRoomDefine.RequestCallback callback)

    Request the remote user to open the media device (only support for administrators or room owner).

    Param
    DESC
    device
    Media device. More details, see: MediaDevice.
    timeout
    Timeout time, in seconds. If it is set to 0, the SDK will not execute timeout detection and will not trigger a timeout callback.
    userId
    User ID.
    Note
    The function only supports the CONFERENCE room type.
    After calling the API, the SDK will notify the requested user through onRequestReceived in $TUIRoomObserver$.

    Return Desc:

    TUIRequest Request body.

    closeRemoteDeviceByAdmin

    closeRemoteDeviceByAdmin
    void closeRemoteDeviceByAdmin
    (String userId
    
    TUIRoomDefine.MediaDevice device
    
    TUIRoomDefine.ActionCallback callback)

    Close remote user media devices (only support for administrators or room owner).

    Param
    DESC
    device
    Media device. More details, see: MediaDevice.
    userId
    User ID.
    Note
    The function only supports the CONFERENCE room type.
    After the API call is successful:
    If the device type is MICROPHONE, the SDK will notify the users in the room through onUserAudioStateChanged in $TUIRoomObserver$.
    If the device type is CAMERA or SCREEN_SHARING, the SDK will notify the users in the room through onUserVideoStateChanged in $TUIRoomObserver$.

    applyToAdminToOpenLocalDevice

    applyToAdminToOpenLocalDevice
    Request applyToAdminToOpenLocalDevice
    (TUIRoomDefine.MediaDevice device
    
    int timeout
    
    TUIRoomDefine.RequestCallback callback)

    Apply to open the local media device (available to general users).

    Param
    DESC
    device
    Media device. More details, see:MediaDevice.
    timeout
    Timeout time, in seconds. If it is set to 0, the SDK will not execute timeout detection and will not trigger a timeout callback.
    Note
    The function only supports the CONFERENCE room type.
    After the API call is successful, the SDK will notify the requested user through onRequestRequestReceived in $TUIRoomObserver$.

    Return Desc:

    TUIRequest: Request body.

    setMaxSeatCount

    setMaxSeatCount
    void setMaxSeatCount
    (int maxSeatCount
    
    TUIRoomDefine.ActionCallback callback)

    Set the maximum number of seat (only available before entering room and when creating room).

    Param
    DESC
    maxSeatCount
    Maximum number of seat.

    getSeatList

    getSeatList
    void getSeatList
    (TUIRoomDefine.GetSeatListCallback callback)

    Get seat list.

    Note
    The function supports the CONFERENCE and LIVE room types.

    lockSeatByAdmin

    lockSeatByAdmin
    void lockSeatByAdmin
    (int seatIndex
    
    TUIRoomDefine.SeatLockParams lockParams
    
    TUIRoomDefine.ActionCallback callback)

    Lock the seat (only support for administrators or room owner).

    Param
    DESC
    lockParams
    Seat lock parameter. More details, see: $TUISeatLockParam$.
    seatIndex
    Seat index.
    Note
    The function supports the CONFERENCE and LIVE room types.
    If the lockParams is lockSeat, it means that the current seat can not be taken by all users and the user will be kicked off if the seat was taken.
    If the lockParams is lockVideo/lockAudio, it means that the current seat can not publish video/audio stream.

    takeSeat

    takeSeat
    Request takeSeat
    (int seatIndex
    
    int timeout
    
    TUIRoomDefine.RequestCallback callback)

    Take the seat.

    Param
    DESC
    seatIndex
    Seat index. If the seat is not enabled or the sequence of seats is not concerned, just fill in -1.
    timeout
    Timeout time, in seconds. If it is set to 0, the SDK will not execute timeout detection and will not trigger a timeout callback.
    Note
    The function supports the CONFERENCE and LIVE room types.
    The user can publish audio/video stream after taking the seat when isSeatEnable is true.
    After taking the seat successfully, the SDK will notify the users in the room through $onSeatListChanged$ in $TUIRoomObserver$.
    When the TUISeatMode is ApplyToTake, the operation to take seat need approval from the owner or administrator.
    When the TUISeatMode is FreeToTake, you can take seat freely.

    Return Desc:

    TUIRequest Request body.

    leaveSeat

    leaveSeat
    void leaveSeat
    (TUIRoomDefine.ActionCallback callback)

    Leave the seat.

    Note
    The function supports the CONFERENCE and LIVE room types.
    The user can not publish audio/video stream after leaving the seat when isSeatEnable is true.
    After leaving seat successfully, the SDK will notify the users in the room through onSeatListChanged in $TUIRoomObserver$.

    moveToSeat

    moveToSeat
    void moveToSeat
    (int targetSeatIndex
    
    TUIRoomDefine.ActionCallback callback)

    Move to seat.

    Note
    The function supports the CONFERENCE and LIVE room types.
    After moving seat successfully, the SDK will notify the users in the room through onSeatListChanged in $TUIRoomObserver$.

    takeUserOnSeatByAdmin

    takeUserOnSeatByAdmin
    Request takeUserOnSeatByAdmin
    (int seatIndex
    
    String userId
    
    int timeout
    
    TUIRoomDefine.RequestCallback callback)

    Invite user to take the seat (only support for administrators or room owner).

    Param
    DESC
    seatIndex
    Seat index.
    timeout
    Timeout time, in seconds. If it is set to 0, the SDK will not execute timeout detection and will not trigger a timeout callback.
    userId
    User ID.
    Note
    The function supports the CONFERENCE and LIVE room types.
    After the API call is successful, the SDK will notify the invited user through onRequestReceived in $TUIRoomObserver$.

    Return Desc:

    TUIRequest: Request body.

    kickUserOffSeatByAdmin

    kickUserOffSeatByAdmin
    void kickUserOffSeatByAdmin
    (int seatIndex
    
    String userId
    
    TUIRoomDefine.ActionCallback callback)

    Kick off the user from seat (only support for administrators or room owner).

    Param
    DESC
    seatIndex
    Seat index. If the seat is not enabled and the sequence of seats is not concerned, just fill in -1.
    userId
    User ID.
    Note
    The function supports the CONFERENCE and LIVE room types.
    After the API call is successful, the SDK will notify the users in the room through onSeatListChanged in $TUIRoomObserver$.

    getSeatApplicationList

    getSeatApplicationList
    void getSeatApplicationList
    (TUIRoomDefine.RequestListCallback callback)

    Get the request list of users who want to take the seat in the room (only support for administrators or room owner).

    Note
    The function supports the CONFERENCE and LIVE room types.

    disableSendingMessageByAdmin

    disableSendingMessageByAdmin
    void disableSendingMessageByAdmin
    (String userId
    
    boolean isDisable
    
    TUIRoomDefine.ActionCallback callback)

    Disable the ability of remote users to send messages (only support for administrators or room owner).

    Param
    DESC
    isDisable
    true: disable user to send message, false: enable user to send message.
    userId
    User ID.
    Note
    The function supports the CONFERENCE and LIVE room types.
    After disabling the ability of remote users to send messages, the SDK notifies the disabled user through onSendMessageForUserDisableChanged in $TUIRoomObserver$.

    disableSendingMessageForAllUser

    disableSendingMessageForAllUser
    void disableSendingMessageForAllUser
    (boolean isDisable
    
    TUIRoomDefine.ActionCallback callback)

    Disable the ability of all users to send messages (only support for administrators or room owner).

    Param
    DESC
    isDisable
    true: disable all users to send message, false: enable all users to send message.
    Note
    The function only supports the CONFERENCE room type.
    After disabling the ability of all users to send messages, the SDK notifies users in the room through onSendMessageForAllUserDisableChanged in $TUIRoomObserver$.

    cancelRequest

    cancelRequest
    void cancelRequest
    (String requestId
    
    TUIRoomDefine.ActionCallback callback)

    Cancel request.

    Param
    DESC
    requestId
    Request ID (get from the sent request).
    Note
    The function supports the CONFERENCE and LIVE room types.
    After cancelling a request, the SDK will notify the requested user through onRequestCancelled in $TUIRoomObserver$.
    The API can be used to cancel a request that has been sent.

    responseRemoteRequest

    responseRemoteRequest
    void responseRemoteRequest
    (String requestId
    
    boolean agree
    
    TUIRoomDefine.ActionCallback callback)

    Response request.

    Param
    DESC
    agree
    YES: Agree the request, NO: Reject the request.
    requestId
    Request ID (get from the sent request or notification of the OnRequestReceived event).
    Note
    The function supports the CONFERENCE and LIVE room types.
    When received a request, you can use this API to reply the received request.

    setBeautyLevel

    setBeautyLevel
    void setBeautyLevel
    (int beautyStyle
    
    float beautyLevel)

    Set the beauty level.

    Param
    DESC
    beautyLevel
    Beauty level, the value range is 0 - 9; 0 indicates to disable the filter, and 9 indicates the most obvious effect.
    beautyStyle
    Beauty style: TXBeautyStyleSmooth: Smooth; TXBeautyStyleNature: Natural; TXBeautyStylePitu: Pitu style.
    Note
    The function supports the CONFERENCE and LIVE room types.

    setWhitenessLevel

    setWhitenessLevel
    void setWhitenessLevel
    (float whitenessLevel)

    Set whitening level.

    Param
    DESC
    whitenessLevel
    Whitening level, ranging from 0 - 9; 0 indicates to disable the filter, and 9 indicates the most obvious effect.
    Note
    The function supports the CONFERENCE and LIVE room types.

    getExtension

    getExtension
    Object getExtension
    (TUICommonDefine.ExtensionType extensionType)

    Get the extension.

    Param
    DESC
    extensionType
    Extension type. More deatils, see TUIExtensionType.
    Note
    The function supports the CONFERENCE and LIVE room types.

    getMediaDeviceManager

    getMediaDeviceManager

    Get device management class.

    Note
    The function supports the CONFERENCE and LIVE room types.

    getLiveConnectionManager

    getLiveConnectionManager

    Get live-connection management class.

    Note
    The function supports the LIVE room type.

    getLiveBattleManager

    getLiveBattleManager

    Get live-battle management class.

    Note
    The function supports the LIVE room type.

    callExperimentalAPI

    callExperimentalAPI
    Object callExperimentalAPI
    (String jsonStr)

    Call experimental APIs.

    Note
    The function supports the CONFERENCE and LIVE room types.
    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