static TUIRoomEngine createInstance()
void destroyInstance()
static Future<TUIActionCallback> login(int sdkAppId,String userId,String userSig)
Parameter | Type | Meaning |
sdkAppId | int | Get sdkAppId information from Application Info |
userId | String | User ID |
userSig | String | UserSig |
static Future<TUIActionCallback> logout()
static Future<TUIActionCallback> setSelfInfo(String userName, String avatarURL)
Parameter | Type | Meaning |
userName | String | User Name |
avatarUrl | String | User avatar URL address |
static Future<TUIActionCallback> setLoginUserInfo(TUILoginUserInfo userInfo)
Parameter | Type | Meaning |
userInfo | TUILoginUserInfo | User information |
static TUILoginUserInfo 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 |
Future<TUIActionCallback> createRoom(TUIRoomInfo roomInfo)
Parameter | Type | Meaning |
roomInfo | Room data |
Future<TUIActionCallback> destroyRoom()
Future<TUIValueCallBack<TUIRoomInfo>> enterRoom(String roomId)
Parameter | Type | Meaning |
roomId | String | Room ID |
Future<TUIActionCallback> exitRoom(bool syncWaiting)
Parameter | Type | Meaning |
syncWaiting | bool | Whether to synchronize leaving the room |
TUIRequest connectOtherRoom(String roomId,String userId,int timeout,TUIRequestCallback? requestCallback)
Parameter | Type | Meaning |
roomId | String | Room ID |
userId | String | User ID |
timeout | int | Time |
callback | TUIRequestCallback | Connect to other rooms Callback |
Future<TUIActionCallback> disconnectOtherRoom()
Future<TUIValueCallBack<TUIRoomInfo>> fetchRoomInfo()
Future<TUIActionCallback> updateRoomNameByAdmin(String roomName)
Parameter | Type | Meaning |
roomName | String | Room ID |
Future<TUIActionCallback> updateRoomSpeechModeByAdmin(TUISpeechMode mode)
Parameter | Type | Meaning |
mode | Management mode |
void setLocalVideoView(TUIVideoStreamType streamType,int viewId)
Parameter | Type | Meaning |
streamType | Local streams type | |
viewId | int | The int64 type value of the pointer to the view to be rendered, through this viewId, can be converted to the corresponding native platform view, and the video screen will be rendered on this view. |
Future<TUIActionCallback> openLocalCamera(bool isFront,TUIVideoQuality quality)
Parameter | Type | Meaning |
isFront | bool | Whether to use Front Camera |
quality | Video Quality |
void closeLocalCamera()
void updateVideoQuality(TUIVideoQuality quality)
Parameter | Type | Meaning |
quality | Video Quality |
void updateVideoQualityEx(TUIVideoStreamType streamType, TUIRoomVideoEncoderParams params);
Parameter | Type | Meaning |
streamType | TUIVideoStreamType | Video Stream type |
params | TUIRoomVideoEncoderParams | Encoding parameters of video encoder |
void setVideoResolutionMode(TUIVideoStreamType streamType, TUIResolutionMode resolutionMode);
Parameter | Type | Meaning |
streamType | TUIVideoStreamType | Video Stream type |
resolutionMode | TUIResolutionMode | Video resolution mode |
void enableGravitySensor(bool enable);
Parameter | Type | Meaning |
enable | bool | Whether to enable |
void startPushLocalVideo()
void stopPushLocalVideo()
Future<void> startScreenSharing({String appGroup = ''})
Future<void> stopScreenSharing()
Future<TUIActionCallback> openLocalMicrophone(TUIAudioQuality quality)
Parameter | Type | Meaning |
quality | Audio Quality |
void closeLocalMicrophone()
void updateAudioQuality(TUIAudioQuality quality)
Parameter | Type | Meaning |
quality | Audio Quality |
Future<TUIActionCallback> muteLocalAudio()
Future<TUIActionCallback> unMuteLocalAudio()
void setRemoteVideoView(String userId,TUIVideoStreamType streamType,int viewId)
Parameter | Type | Meaning |
userId | String | User ID |
streamType | User streams type | |
viewId | int | The int64 type value of the pointer to the view to be rendered, through this viewId, can be converted to the corresponding native platform view, and the video screen will be rendered on this view. |
void startPlayRemoteVideo(String userId,TUIVideoStreamType streamType,TUIPlayCallback? callback)
Parameter | Type | Meaning |
userId | String | User ID |
streamType | User streams type | |
callback | TUIPlayCallback? | Playback Operation result Callback |
void stopPlayRemoteVideo(String userId,TUIVideoStreamType 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 | bool | Whether to mute |
Future<TUIValueCallBack<TUIUserListResult>> getUserList(int nextSequence)
Parameter | Type | Meaning |
nextSequence | int | 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 |
Future<TUIValueCallBack<TUIUserInfo>> getUserInfo(String userId)
Parameter | Type | Meaning |
userId | String | Get Learn more of the user by userId |
Future<TUIActionCallback> changeUserRole(String userId,TUIRole role)
Parameter | Type | Meaning |
userId | String | User ID |
role | User Role |
Future<TUIActionCallback> kickRemoteUserOutOfRoom(String userId)
Parameter | Type | Meaning |
userId | String | User ID |
Future<TUIActionCallback> addCategoryTagForUsers(int tag, List<String> userList);
Parameter | Type | Meaning |
tag | int | Tag type. Number type, greater than or equal to 1000, you can customize |
userList | List<String> | User list |
Future<TUIActionCallback> removeCategoryTagForUsers(int tag, List<String> userList);
Parameter | Type | Meaning |
tag | int | Tag type. Number type, greater than or equal to 1000, you can customize |
userList | List<String> | User list |
Future<TUIValueCallBack<TUIUserListResult>> getUserListByTag(int tag, int nextSequence);
Parameter | Type | Meaning |
tag | int | Tag type. Number type, greater than or equal to 1000, you can customize |
nextSequence | int | 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 |
Future<TUIActionCallback> disableDeviceForAllUserByAdmin(TUIMediaDevice device,bool isDisable)
Parameter | Type | Meaning |
device | Device | |
isDisable | bool | Whether to Disable |
TUIRequest openRemoteDeviceByAdmin(String userId,TUIMediaDevice device,int timeout,TUIRequestCallback? requestCallback)
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 |
requestCallback | TUIRequestCallback? | Operation result Callback |
Future<TUIActionCallback> closeRemoteDeviceByAdmin(String userId,TUIMediaDevice device)
Parameter | Type | Meaning |
userId | String | User ID |
device | Device |
TUIRequest applyToAdminToOpenLocalDevice(TUIMediaDevice device,int timeout,TUIRequestCallback? requestCallback)
Parameter | Type | Meaning |
device | Device | |
timeout | int | Timeout Duration, Unit in Seconds. If Set to 0, SDK Will Not Perform Timeout Detection, Nor Will It Trigger Timeout Callback |
callback | TUIRequestCallback | Operation Result Callback |
Future<TUIActionCallback> setMaxSeatCount(int maxSeatCount)
Parameter | Type | Meaning |
maxSeatCount | int | Maximum number of seats |
Future<TUIActionCallback> lockSeatByAdmin(int seatIndex,TUISeatLockParams lockParams)
Parameter | Type | Meaning |
seatIndex | int | Seat number |
lockParams | Lock microphone parameter |
Future<TUIValueCallBack<List<TUISeatInfo>>> getSeatList()
TUIRequest takeSeat(int seatIndex,int timeout,TUIRequestCallback? requestCallback)
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 |
requestCallback | TUIRequestCallback? | Call interface Callback, used to notify the request Callback status |
Future<TUIActionCallback> leaveSeat()
TUIRequest takeUserOnSeatByAdmin(int seatIndex,String userId,int timeout,TUIRequestCallback? requestCallback)
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 |
requestCallback | TUIRequestCallback? | Call interface Callback, used to notify the request Callback status |
Future<TUIActionCallback> kickUserOffSeatByAdmin(int seatIndex,String userId)
Parameter | Type | Meaning |
seatIndex | int | Seat number |
userId | String | User ID |
Future<TUIActionCallback> sendTextMessage(String message)
Parameter | Type | Meaning |
message | String | Text message Content |
Future<TUIActionCallback> sendCustomMessage(String message)
Parameter | Type | Meaning |
message | String | Custom message Content |
Future<TUIActionCallback> disableSendingMessageByAdmin(String userId,bool isDisable)
Parameter | Type | Meaning |
userId | String | User ID |
isDisable | bool | Whether to Disable |
Future<TUIActionCallback> disableSendingMessageForAllUser(bool isDisable)
Parameter | Type | Meaning |
isDisable | bool | Whether to Disable |
Future<TUIActionCallback> cancelRequest(String requestId)
Parameter | Type | Meaning |
requestId | String | Request ID |
Future<TUIActionCallback> responseRemoteRequest(String requestId,bool agree)
Parameter | Type | Meaning |
requestId | String | Request ID |
agree | bool | Whether to agree |
Future<int?> switchCamera(bool isFrontCamera);
Parameter | Type | Meaning |
isFrontCamera | bool | Is front camera |
void setBeautyLevel(int beautyStyle, int beautyLevel);
Parameter | Type | Meaning |
beautyStyle | int | beauty style |
beautyLevel | int | beauty level |
void setWhitenessLevel(int whitenessLevel);
Parameter | Type | Meaning |
whitenessLevel | int | whiteness level |
void callExperimentalAPI(String jsonStr);
Parameter | Type | Meaning |
jsonStr | String | Api infomation |
Was this page helpful?