static TUIRoomEngine createInstance()
void destroyInstance()
void static login(Context context,int sdkAppId,String userId,String userSig,TUIRoomDefine.ActionCallback callback)
Parameter | Type | Meaning |
context | Context | Android Context |
sdkAppId | int | Get sdkAppId information from Application Info |
userId | String | User ID |
userSig | String | UserSig |
callback | TUIRoomDefine.ActionCallback | API Callback for notifying the success or failure of the interface call |
static void logout(TUIRoomDefine.ActionCallback callback)
Parameter | Type | Meaning |
callback | TUIRoomDefine.ActionCallback | Callback of API, used to Notify the Success or Failure of the API call |
static void setSelfInfo(String userName, String avatarURL, TUIRoomObserver.ActionCallback callback)
Parameter | Type | Meaning |
userName | int | User Name |
avatarUrl | String | User avatar URL address |
callback | TUIRoomDefine.ActionCallback | Callback of API, used to Notify the Success or Failure of the API call |
static TUIRoomDefine.LoginUserInfo getSelfInfo()
void addObserver(TUIRoomObserver observer)
Parameter | Type | Meaning |
observer | TUIRoomObserver | TUIRoomEngine Event Callback |
void removeObserver(TUIRoomObserver observer)
Parameter | Type | Meaning |
observer | TUIRoomObserver | TUIRoomEngine Event Callback |
void createRoom(TUIRoomDefine.RoomInfo roomInfo, TUIRoomDefine.ActionCallback callback)
Parameter | Type | Meaning |
roomInfo | Room data | |
callback | TUIRoomDefine.ActionCallback | Callback of API, used to Notify the Success or Failure of the API call |
void destroyRoom(TUIRoomDefine.ActionCallback callback)
Parameter | Type | Meaning |
callback | TUIRoomDefine.ActionCallback | Callback of API, used to Notify the Success or Failure of the API call |
void enterRoom(String roomId, TUIRoomDefine.GetRoomInfoCallback callback)
Parameter | Type | Meaning |
roomId | String | Room ID |
callback | TUIRoomDefine.GetRoomInfoCallback | Get the entered Room data Callback |
void exitRoom(boolean isSyncWaiting, TUIRoomDefine.ActionCallback callback);
Parameter | Type | Meaning |
isSyncWaiting | boolean | Whether to synchronize leaving the room |
callback | TUIRoomDefine.ActionCallback | Leave Room Result Callback |
TUIRoomDefine.Request connectOtherRoom(String roomId,String userId,int timeout,TUIRoomDefine.RequestCallback callback);
Parameter | Type | Meaning |
roomId | String | Room ID |
userId | String | User ID |
timeout | int | Time |
callback | TUIRoomDefine.RequestCallback | Connect to other rooms Callback |
void disconnectOtherRoom(TUIRoomDefine.ActionCallback callback);
Parameter | Type | Meaning |
callback | TUIRoomDefine.ActionCallback | Disconnect with other rooms Connection result Callback |
void fetchRoomInfo(TUIRoomDefine.GetRoomInfoCallback callback);
Parameter | Type | Meaning |
callback | TUIRoomDefine.GetRoomInfoCallback | Get Room data Callback |
void updateRoomNameByAdmin(String roomName, TUIRoomDefine.ActionCallback callback);
Parameter | Type | Meaning |
roomName | String | Room ID |
callback | TUIRoomDefine.ActionCallback | Update Operation result Callback |
void updateRoomSpeechModeByAdmin(TUIRoomDefine.SpeechMode mode, TUIRoomDefine.ActionCallback callback);
Parameter | Type | Meaning |
mode | Management mode | |
callback | TUIRoomDefine.ActionCallback | Callback of API, used to Notify the Success or Failure of the API call |
void setLocalVideoView(TUIRoomDefine.VideoStreamType streamType,TUIVideoView view);
Parameter | Type | Meaning |
streamType | Local streams type | |
view | TUIVideoView | To be rendered view, Video Rendering on this view |
void openLocalCamera(boolean isFront,TUIRoomDefine.VideoQuality quality,TUIRoomDefine.ActionCallback callback);
Parameter | Type | Meaning |
isFront | boolean | Whether to use Front Camera |
quality | Video Quality | |
callback | TUIRoomDefine.ActionCallback | Open Camera Operation result Callback |
void closeLocalCamera();
void updateVideoQuality(TUIRoomDefine.VideoQuality quality);
Parameter | Type | Meaning |
quality | Video Quality |
void startScreenSharing();
void stopScreenSharing();
void startPushLocalVideo();
void stopPushLocalVideo();
void openLocalMicrophone(TUIRoomDefine.AudioQuality quality, TUIRoomDefine.ActionCallback callback);
Parameter | Type | Meaning |
quality | Audio Quality | |
callback | TUIRoomDefine.ActionCallback | Open mic Operation result Callback |
void closeLocalMicrophone();
void updateAudioQuality(TUIRoomDefine.AudioQuality quality);
Parameter | Type | Meaning |
quality | Audio Quality |
void startPushLocalAudio();
void stopPushLocalAudio();
void setRemoteVideoView(String userId,TUIRoomDefine.VideoStreamType streamType,TUIVideoView view);
Parameter | Type | Meaning |
userId | String | User ID |
streamType | User streams type | |
view | TUIVideoView | Playback Remote user streams view |
void startPlayRemoteVideo(String userId,TUIRoomDefine.VideoStreamType streamType,TUIRoomDefine.PlayCallback callback);
Parameter | Type | Meaning |
userId | String | User ID |
streamType | User streams type | |
callback | TUIRoomDefine.PlayCallback | Playback Operation result Callback |
void stopPlayRemoteVideo(String userId,TUIRoomDefine.VideoStreamType streamType);
Parameter | Type | Meaning |
userId | String | User ID |
streamType | User streams type |
void muteRemoteAudioStream(String userId, boolean isMute);
Parameter | Type | Meaning |
userId | String | User ID |
isMute | boolean | Whether to mute |
void getUserList(long nextSequence, TUIRoomDefine.GetUserListCallback callback);
Parameter | Type | Meaning |
nextSequence | long | 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 | TUIRoomDefine.GetUserListCallback | Get User list Callback |
void getUserInfo(String userId, TUIRoomEngineDef.GetUserInfoCallback callback);
Parameter | Type | Meaning |
userId | String | Get Learn more of the user by userId |
callback | TUIRoomDefine.GetUserInfoCallback | Get User Learn more Callback |
void changeUserRole(String userId,TUIRoomDefine.Role role,TUIRoomDefine.ActionCallback callback);
Parameter | Type | Meaning |
userId | String | User ID |
role | User Role | |
callback | TUIRoomDefine.ActionCallback | Change Role Operation result Callback |
void kickRemoteUserOutOfRoom(String userId, TUIRoomDefine.ActionCallback callback);
Parameter | Type | Meaning |
userId | String | User ID |
callback | TUIRoomDefine.ActionCallback | Operation result Callback |
void disableDeviceForAllUserByAdmin(TUIRoomDefine.MediaDevice device,boolean isDisable,TUIRoomDefine.ActionCallback callback);
Parameter | Type | Meaning |
device | Device | |
isDisable | boolean | Whether to Disable |
callback | TUIRoomDefine.ActionCallback | Operation result Callback |
TUIRoomDefine.Request openRemoteDeviceByAdmin(String userId,TUIRoomDefine.MediaDevice device,int timeout,TUIRoomDefine.RequestCallback callback);
Parameter | Type | Meaning |
userId | String | User ID |
device | Device | |
timeout | int | Timeout in seconds, if set to 0, SDK will not do timeout detection and will not trigger timeout Callback |
callback | TUIRoomDefine.ActionCallback | Operation result Callback |
void closeRemoteDeviceByAdmin(String userId,TUIRoomDefine.MediaDevice device,TUIRoomDefine.ActionCallback callback);
Parameter | Type | Meaning |
device | Device | |
isDisable | boolean | Whether to Disable |
callback | TUIRoomDefine.ActionCallback | Operation result Callback |
TUIRoomDefine.Request applyToAdminToOpenLocalDevice(TUIRoomDefine.MediaDevice device,int timeout,TUIRoomDefine.RequestCallback callback);
Parameter | Type | Meaning |
device | Device | |
timeout | int | Timeout in seconds, if set to 0, SDK will not do timeout detection and will not trigger timeout Callback |
callback | TUIRoomDefine.ActionCallback | Operation result Callback |
void setMaxSeatCount(int maxSeatCount, TUIRoomDefine.ActionCallback callback);
Parameter | Type | Meaning |
maxSeatCount | int | Maximum number of seats |
callback | TUIRoomDefine.ActionCallback | Callback of API, used to Notify the Success or Failure of the API call |
void lockSeatByAdmin(int seatIndex,TUIRoomDefine.SeatLockParams lockParams,TUIRoomDefine.ActionCallback callback);
Parameter | Type | Meaning |
seatIndex | int | Seat number |
lockParams | Lock microphone parameter | |
callback | TUIRoomDefine.ActionCallback | Callback of API, used to Notify the Success or Failure of the API call |
void getSeatList(TUIRoomDefine.GetSeatListCallback callback);
Parameter | Type | Meaning |
callback | TUIRoomDefine.GetSeatListCallback | Get seat list Callback |
TUIRoomDefine.Request takeSeat(int seatIndex,int timeout,TUIRoomDefine.RequestCallback callback);
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 | TUIRoomDefine.RequestCallback | Call interface Callback, used to notify the request Callback status |
void leaveSeat(TUIRoomDefine.ActionCallback callback);
Parameter | Type | Meaning |
callback | TUIRoomDefine.ActionCallback | Callback of API, used to Notify the Success or Failure of the API call |
TUIRoomDefine.Request takeUserOnSeatByAdmin(int seatIndex,String userId,int timeout,TUIRoomDefine.RequestCallback callback);
Parameter | Type | Meaning |
seatIndex | int | Seat number |
userId | String | User ID |
timeout | int | Timeout in seconds, if set to 0, SDK will not do timeout detection and will not trigger timeout Callback |
callback | TUIRoomDefine.RequestCallback | Call interface Callback, used to notify the request Callback status |
void kickUserOffSeatByAdmin(int seatIndex, String userId, TUIRoomDefine.ActionCallback callback);
Parameter | Type | Meaning |
seatIndex | int | Seat number |
userId | String | User ID |
callback | TUIRoomDefine.RequestCallback | Call interface Callback, used to notify the request Callback status |
void sendTextMessage(String message,TUIRoomDefine.ActionCallback callback);
Parameter | Type | Meaning |
message | String | Text message Content |
callback | TUIRoomDefine.ActionCallback | Callback of API, used to Notify the Success or Failure of the API call |
void sendCustomMessage(String message,TUIRoomDefine.ActionCallback callback);
Parameter | Type | Meaning |
message | String | Custom message Content |
callback | TUIRoomDefine.ActionCallback | Callback of API, used to Notify the Success or Failure of the API call |
void disableSendingMessageByAdmin(String userId,boolean isDisable,TUIRoomDefine.ActionCallback callback);
Parameter | Type | Meaning |
userId | String | User ID |
isDisable | boolean | Whether to Disable |
callback | TUIRoomDefine.ActionCallback | Callback of API, used to Notify the Success or Failure of the API call |
void disableSendingMessageForAllUser(boolean isDisable,TUIRoomDefine.ActionCallback callback);
Parameter | Type | Meaning |
isDisable | boolean | Whether to Disable |
callback | TUIRoomDefine.ActionCallback | Callback of API, used to Notify the Success or Failure of the API call |
void cancelRequest(String requestId, TUIRoomDefine.ActionCallback callback);
Parameter | Type | Meaning |
requestId | String | Request ID |
callback | TUIRoomDefine.ActionCallback | Callback of API, used to Notify the Success or Failure of the API call |
void responseRemoteRequest(String requestId,boolean agree,TUIRoomDefine.ActionCallback callback);
Parameter | Type | Meaning |
requestId | String | Request ID |
agree | boolean | Whether to agree |
callback | TUIRoomEngineDef.ActionCallback | Callback of API, used to Notify the Success or Failure of the API call |
TRTCCloud getTRTCCloud();
TXDeviceManager getDeviceManager();
TXAudioEffectManager getAudioEffectManager();
TXBeautyManager getBeautyManager();
Was this page helpful?