Copyright (c) 2024 Tencent. All rights reserved.
Module: TUILiveConnectionManager @ TUIKitEngine
Function: Live-Connection APIS, the functions on this webpage only support to LIVE room type.
TUILiveConnectionManager
|
| Callback for connected users changed. |
| Callback for received the connection invitation |
| Callback for canceled the connection invitation |
| Callback for accepted the connection invitation |
| Callback for rejected the connection invitation |
| Callback for timeout the connection invitation |
| Add event callback |
| Remove event callback |
| Request connection invitation |
| Cancel request about connection invitation |
| Accept the connection invitation |
| Reject the connection invitation |
| Exit the connection. |
StructType
EnumType
|
| Connection Request Status |
onConnectionUserListChanged
onConnectionUserListChanged
void onConnectionUserListChanged | |
| |
| |
Callback for connected users changed.
|
connectedList | List of connected users. |
joinedList | List of joined connected users. |
leavedList | List of leaved connected users. |
onConnectionRequestReceived
onConnectionRequestReceived
void onConnectionRequestReceived | |
| |
| |
Callback for received the connection invitation
|
extensionInfo | Extension info。 |
inviteeList | |
inviter | |
onConnectionRequestCancelled
onConnectionRequestCancelled
void onConnectionRequestCancelled | |
Callback for canceled the connection invitation
onConnectionRequestAccept
onConnectionRequestAccept
void onConnectionRequestAccept | |
Callback for accepted the connection invitation
onConnectionRequestReject
onConnectionRequestReject
void onConnectionRequestReject | |
Callback for rejected the connection invitation
onConnectionRequestTimeout
onConnectionRequestTimeout
void onConnectionRequestTimeout | |
| |
Callback for timeout the connection invitation
addObserver
Add event callback
|
observer | The instance being listened to. |
removeObserver
Remove event callback
|
observer | The instance being listened to. |
requestConnection
| |
| |
| |
| ConnectionRequestCallback callback) |
Request connection invitation
|
extensionInfo | Extension info. |
roomIdList | The list of room IDs will be invited. |
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. |
cancelConnectionRequest
void cancelConnectionRequest | |
| TUIRoomDefine.ActionCallback callback) |
Cancel request about connection invitation
|
roomIdList | The list of room IDs whose connection requests will be canceled. |
acceptConnection
| |
| TUIRoomDefine.ActionCallback callback) |
Accept the connection invitation
|
roomId | The room ID of the inviter about connection invitation. |
rejectConnection
| |
| TUIRoomDefine.ActionCallback callback) |
Reject the connection invitation
|
roomId | The room ID of the inviter about connection invitation. |
disconnect
| (TUIRoomDefine.ActionCallback callback) |
Exit the connection.
Calling this interface will exit the room connection state, and can only be called in the connected state.
TUIConnectionCode
Connection Request Status
|
UNKNOWN | -1 | default. |
SUCCESS | 0 | Request success. |
ROOM_NOT_EXISTS | 1 | Request room not exist. |
CONNECTING | 2 | The room you are invited to connect to is already in the invitation list or is already connected. |
CONNECTING_OTHER_ROOM | 3 | The room you are invited to connect to is connecting with other rooms. |
CONNECTION_FULL | 4 | The current number of connections has reached the maximum limit. |
RETRY | 5 | Please try again. |
TUIConnectionUser
Connection User Info
|
avatarUrl | The user avatar url of the connection user. |
joinConnectionTime | The Timestamp of when the user joined the connection. |
roomId | The room id of the connection user. |
userId | The user id of the connection user. |
userName | The user name of the connection user. |