static TUIRoomEngine sharedInstance()
void destroySharedInstance()
static Future<TUIActionCallback> login(int sdkAppId,String userId,String userSig)
Parameters | Type | Meaning |
sdkAppId | int | Get sdkAppId information from Application Information |
userId | String | User ID |
userSig | String |
static Future<TUIActionCallback> logout()
static Future<TUIActionCallback> setSelfInfo(String userName, String avatarURL)
Parameters | Type | Meaning |
userName | String | Username |
avatarUrl | String | User's profile photo |
static Future<TUIActionCallback> setLoginUserInfo(TUILoginUserInfo userInfo)
Parameters | Type | Meaning |
userInfo | TUILoginUserInfo | User Information |
static TUILoginUserInfo getSelfInfo()
void addObserver(TUIRoomObserver observer)
Parameters | Type | Meaning |
observer | TUIRoomObserver | TUIRoomEngine event callback |
void removeObserver(TUIRoomObserver observer)
Parameters | Type | Meaning |
observer | TUIRoomObserver | TUIRoomEngine event callback |
Future<TUIActionCallback> createRoom(TUIRoomInfo roomInfo)
Parameters | Type | Meaning |
roomInfo | Room Basic Information |
Future<TUIActionCallback> destroyRoom()
Future<TUIValueCallBack<TUIRoomInfo>> enterRoom(String roomId,{TUIRoomType roomType = TUIRoomType.conference,TUIEnterRoomOptions? options})
Parameters | Type | Meaning |
roomId | String | Room number, string type |
roomType | TUIRoomType | Room type |
options | TUIEnterRoomOptions | Optional parameters for entering the room |
Future<TUIActionCallback> exitRoom(bool syncWaiting)
Parameters | Type | Meaning |
syncWaiting | bool | Whether to exit the room synchronously |
TUIRequest connectOtherRoom(String roomId,String userId,int timeout,TUIRequestCallback? requestCallback)
Parameters | Type | Meaning |
roomId | String | Room ID |
userId | String | User ID |
timeout | int | Time |
callback | TUIRequestCallback | Callback for connecting to other rooms request |
Future<TUIActionCallback> disconnectOtherRoom()
Future<TUIValueCallBack<TUIRoomInfo>> fetchRoomInfo()
Future<TUIActionCallback> updateRoomNameByAdmin(String roomName)
Parameters | Type | Meaning |
roomName | String | Room Name |
Future<TUIActionCallback> updateRoomSeatModeByAdmin(TUISeatMode mode)
Parameters | Type | Meaning |
mode | Room mode |
void setLocalVideoView(int viewId)
Parameters | Type | Meaning |
viewId | int | int64 type value of the pending view pointer, this viewId can be converted to the corresponding native platform's view, and the video footage will be rendered on this view |
Future<TUIActionCallback> openLocalCamera(bool isFront,TUIVideoQuality quality)
Parameters | Type | Meaning |
isFront | bool | Whether to use the front-facing camera |
quality | Video Quality |
void closeLocalCamera()
void updateVideoQuality(TUIVideoQuality quality)
Parameters | Type | Meaning |
quality | Video Quality |
void updateVideoQualityEx(TUIVideoStreamType streamType, TUIRoomVideoEncoderParams params);
Parameters | Type | Meaning |
streamType | TUIVideoStreamType | Video stream type |
params | TUIRoomVideoEncoderParams | Video Encoder Parameters |
void setVideoResolutionMode(TUIVideoStreamType streamType, TUIResolutionMode resolutionMode);
Parameters | Type | Meaning |
streamType | TUIVideoStreamType | Video stream type |
resolutionMode | TUIResolutionMode | Resolution Mode |
void enableGravitySensor(bool enable);
Parameters | Type | Meaning |
enable | bool | Whether Enabled |
void startPushLocalVideo()
void stopPushLocalVideo()
Future<void> startScreenSharing({String appGroup = ''})
Future<void> stopScreenSharing()
Future<TUIActionCallback> openLocalMicrophone(TUIAudioQuality quality)
Parameters | Type | Meaning |
quality | Audio Quality |
void closeLocalMicrophone()
void updateAudioQuality(TUIAudioQuality quality)
Parameters | Type | Meaning |
quality | Audio Quality |
Future<TUIActionCallback> muteLocalAudio()
Future<TUIActionCallback> unMuteLocalAudio()
void setRemoteVideoView(String userId,TUIVideoStreamType streamType,int viewId)
Parameters | Type | Meaning |
userId | String | User ID |
streamType | User stream type | |
viewId | int | int64 type value of the pending view pointer, this viewId can be converted to the corresponding native platform's view, and the video footage will be rendered on this view |
void startPlayRemoteVideo(String userId,TUIVideoStreamType streamType,TUIPlayCallback? callback)
Parameters | Type | Meaning |
userId | String | User ID |
streamType | User stream type | |
callback | TUIPlayCallback? | Playback result callback |
void stopPlayRemoteVideo(String userId,TUIVideoStreamType streamType)
Parameters | Type | Meaning |
userId | String | User ID |
streamType | User stream type |
void muteRemoteAudioStream(String userId, boolean isMute);
Parameters | Type | Meaning |
userId | String | User ID |
isMute | bool | Whether to mute |
Future<TUIValueCallBack<TUIUserListResult>> getUserList(int nextSequence)
Parameters | Type | Meaning |
nextSequence | int | Pagination pull flag. Fill in 0 for the first pull. If nextSeq is not zero in the callback, pagination is needed. Pass in nextSeq to pull again until nextSeq is zero in the callback |
Future<TUIValueCallBack<TUIUserInfo>> getUserInfo(String userId)
Parameters | Type | Meaning |
userId | String | Get detailed information of this user based on userId |
Future<TUIActionCallback> changeUserRole(String userId,TUIRole role)
Parameters | Type | Meaning |
userId | String | User ID |
role | User Role |
Future<TUIActionCallback> changeUserNameCard(String userId, String nameCard);
Parameters | Type | Meaning |
userId | String | User ID |
nameCard | String | User Nickname |
Future<TUIActionCallback> kickRemoteUserOutOfRoom(String userId)
Parameters | Type | Meaning |
userId | String | User ID |
Future<TUIActionCallback> addCategoryTagForUsers(int tag, List<String> userList);
Parameters | Type | Meaning |
tag | int | Mark type. Numeric type, greater than or equal to 1000. You can define it yourself. |
userList | List<String> | User list |
Future<TUIActionCallback> removeCategoryTagForUsers(int tag, List<String> userList);
Parameters | Type | Meaning |
tag | int | Type. Numeric type, greater than or equal to 1000. You can define it yourself. |
userList | List<String> | User list |
Future<TUIValueCallBack<TUIUserListResult>> getUserListByTag(int tag, int nextSequence);
Parameters | Type | Meaning |
tag | int | Type. Numeric type, greater than or equal to 1000. You can define it yourself. |
nextSequence | int | Pagination pull flag. Fill in 0 for the first pull. If nextSequence is not zero in the callback, pagination is needed. Pass it in to pull again until it is zero |
Future<TUIActionCallback> setCustomInfoForUser(String userId,HashMap<String, String> customInfo);
Parameters | Type | Meaning |
userId | String | userId |
customInfo | HashMap<String, String> | Customized Information |
Future<TUIActionCallback> disableDeviceForAllUserByAdmin(TUIMediaDevice device,bool isDisable)
Parameters | Type | Meaning |
device | Device | |
isDisable | bool | Whether to disable |
TUIRequest openRemoteDeviceByAdmin(String userId,TUIMediaDevice device,int timeout,TUIRequestCallback? requestCallback)
Parameters | Type | Meaning |
userId | String | User ID |
device | Device | |
timeout | int | Timeout period, unit: seconds. If set to 0, the SDK will not perform timeout detection and will not trigger a timeout callback |
requestCallback | TUIRequestCallback? | Operation result callback |
Future<TUIActionCallback> closeRemoteDeviceByAdmin(String userId,TUIMediaDevice device)
Parameters | Type | Meaning |
userId | String | User ID |
device | Device |
TUIRequest applyToAdminToOpenLocalDevice(TUIMediaDevice device,int timeout,TUIRequestCallback? requestCallback)
Parameters | Type | Meaning |
device | Device | |
timeout | int | Timeout period, unit: seconds. If set to 0, the SDK will not perform timeout detection and will not trigger a timeout callback |
callback | TUIRequestCallback? | Operation result callback |
Future<TUIActionCallback> setMaxSeatCount(int maxSeatCount)
Parameters | Type | Meaning |
maxSeatCount | int | Maximum Number of Microphones |
Future<TUIValueCallBack<List<TUIRequest>>> getSeatApplicationList();
Future<TUIActionCallback> lockSeatByAdmin(int seatIndex,TUISeatLockParams lockParams)
Parameters | Type | Meaning |
seatIndex | int | Microphone slot number |
lockParams | Mute Microphone parameter |
Future<TUIValueCallBack<List<TUISeatInfo>>> getSeatList()
TUIRequest takeSeat(int seatIndex,int timeout,TUIRequestCallback? requestCallback)
Parameters | Type | Meaning |
seatIndex | int | Microphone slot number |
timeout | int | Timeout period, unit: seconds. If set to 0, the SDK will not perform timeout detection and will not trigger a timeout callback |
requestCallback | TUIRequestCallback? | Invoke interface callback to notify the request status |
Future<TUIActionCallback> leaveSeat()
Future<TUIActionCallback> moveToSeat(int targetSeatIndex);
Parameters | Type | Meaning |
seatIndex | int | Microphone slot number |
TUIRequest takeUserOnSeatByAdmin(int seatIndex,String userId,int timeout,TUIRequestCallback? requestCallback)
Parameters | Type | Meaning |
seatIndex | int | Microphone slot number |
userId | String | User ID |
timeout | int | Timeout period, unit: seconds. If set to 0, the SDK will not perform timeout detection and will not trigger a timeout callback |
requestCallback | TUIRequestCallback? | Invoke interface callback to notify the request status |
Future<TUIActionCallback> kickUserOffSeatByAdmin(int seatIndex,String userId)
Parameters | Type | Meaning |
seatIndex | int | Microphone slot number |
userId | String | User ID |
Future<TUIActionCallback> disableSendingMessageByAdmin(String userId,bool isDisable)
Parameters | Type | Meaning |
userId | String | User ID |
isDisable | bool | Whether to disable |
Future<TUIActionCallback> disableSendingMessageForAllUser(bool isDisable)
Parameters | Type | Meaning |
isDisable | bool | Whether to disable |
Future<TUIActionCallback> cancelRequest(String requestId)
Parameters | Type | Meaning |
requestId | String | Request ID |
Future<TUIActionCallback> responseRemoteRequest(String requestId,bool agree)
Parameters | Type | Meaning |
requestId | String | Request ID |
agree | bool | Do you agree? |
void callExperimentalAPI(String jsonStr);
Parameters | Type | Meaning |
jsonStr | String | Interface Information |
void setBeautyLevel(int beautyStyle, int beautyLevel);
Parameters | Type | Meaning |
beautyStyle | int | Beauty filter style |
beautyLevel | int | Beauty filter effect level |
void setWhitenessLevel(int whitenessLevel);
Parameters | Type | Meaning |
whitenessLevel | int | Brightening filter effect level |
dynamic getExtension(TUIExtensionType extensionType);
Parameters | Type | Meaning |
extensionType | TUIExtensionType | Plugin Type |
TUIRoomDeviceManager getMediaDeviceManager();
Was this page helpful?