tencent cloud

Feedback

TUILiveConnectionManager

Last updated: 2024-12-05 16:57:27
    Copyright (c) 2024 Tencent. All rights reserved.
    Module: TUILiveConnectionManager @ TUIKitEngine
    Function: Live-Connection APIS, the functions on this webpage only support to TUIRoomTypeLive room type.
    
    TUILiveConnectionManager

    TUILiveConnectionObserver

    FuncList
    DESC
    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

    TUILiveConnectionManager

    FuncList
    DESC
    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

    FuncList
    DESC
    Connection User Info

    EnumType

    EnumType
    DESC
    Connection Request Status

    onConnectionUserListChanged:joinedList:leavedList:

    onConnectionUserListChanged:joinedList:leavedList:
    - (void)onConnectionUserListChanged:
    (NSArray<TUIConnectionUser*> *)connectedList
    joinedList:
    (NSArray<TUIConnectionUser*> *)joinedList
    leavedList:
    (NSArray<TUIConnectionUser*> *)leavedList

    Callback for connected users changed.

    Param
    DESC
    connectedList
    List of connected users.
    joinedList
    List of joined connected users.
    leavedList
    List of leaved connected users.

    onConnectionRequestReceived:inviteeList:extensionInfo:

    onConnectionRequestReceived:inviteeList:extensionInfo:
    - (void)onConnectionRequestReceived:
    (TUIConnectionUser *)inviter
    inviteeList:
    (NSArray<TUIConnectionUser*> *)inviteeList
    extensionInfo:
    (NSString*)extensionInfo

    Callback for received the connection invitation

    Param
    DESC
    extensionInfo
    Extension info。
    inviteeList
    The list of TUIConnectionUser about the invitee in current connection.
    inviter
    The TUIConnectionUser about the inviter.

    onConnectionRequestCancelled:

    onConnectionRequestCancelled:
    - (void)onConnectionRequestCancelled:
    (TUIConnectionUser *)inviter

    Callback for canceled the connection invitation

    Param
    DESC
    inviter
    The TUIConnectionUser about the inviter.

    onConnectionRequestAccept:

    onConnectionRequestAccept:
    - (void)onConnectionRequestAccept:
    (TUIConnectionUser *)invitee

    Callback for accepted the connection invitation

    Param
    DESC
    invitee
    The TUIConnectionUser about the invitee.

    onConnectionRequestReject:

    onConnectionRequestReject:
    - (void)onConnectionRequestReject:
    (TUIConnectionUser *)invitee

    Callback for rejected the connection invitation

    Param
    DESC
    invitee
    The TUIConnectionUser about the invitee.

    onConnectionRequestTimeout:invitee:

    onConnectionRequestTimeout:invitee:
    - (void)onConnectionRequestTimeout:
    (TUIConnectionUser *)inviter
    invitee:
    (TUIConnectionUser *)invitee

    Callback for timeout the connection invitation

    Param
    DESC
    invitee
    The TUIConnectionUser about the invitee.
    inviter
    The TUIConnectionUser about the inviter.

    addObserver:

    addObserver:
    - (void)addObserver:
    (id<TUILiveConnectionObserver>)observer

    Add event callback

    Param
    DESC
    observer
    The instance being listened to.

    removeObserver:

    removeObserver:
    - (void)removeObserver:
    (id<TUILiveConnectionObserver>)observer

    Remove event callback

    Param
    DESC
    observer
    The instance being listened to.

    requestConnection:timeout:extensionInfo:onSuccess:onError:

    requestConnection:timeout:extensionInfo:onSuccess:onError:
    - (void)requestConnection:
    (NSArray<NSString *> *)roomIdList
    timeout:
    (NSTimeInterval)timeout
    extensionInfo:
    (NSString*)extensionInfo
    onSuccess:
    (TUIConnectionRequestBlock)onSuccess
    onError:
    (TUIErrorBlock)onError

    Request connection invitation

    Param
    DESC
    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:onSuccess:onError:

    cancelConnectionRequest:onSuccess:onError:
    - (void)cancelConnectionRequest:
    (NSArray<NSString *> *)roomIdList
    onSuccess:
    (TUISuccessBlock)onSuccess
    onError:
    (TUIErrorBlock)onError

    Cancel request about connection invitation

    Param
    DESC
    roomIdList
    The list of room IDs whose connection requests will be canceled.

    acceptConnection:onSuccess:onError:

    acceptConnection:onSuccess:onError:
    - (void)acceptConnection:
    (NSString *)roomId
    onSuccess:
    (TUISuccessBlock)onSuccess
    onError:
    (TUIErrorBlock)onError

    Accept the connection invitation

    Param
    DESC
    roomId
    The room ID of the inviter about connection invitation.

    rejectConnection:onSuccess:onError:

    rejectConnection:onSuccess:onError:
    - (void)rejectConnection:
    (NSString *)roomId
    onSuccess:
    (TUISuccessBlock)onSuccess
    onError:
    (TUIErrorBlock)onError

    Reject the connection invitation

    Param
    DESC
    roomId
    The room ID of the inviter about connection invitation.

    disconnect:onError:

    disconnect:onError:
    - (void)disconnect:
    (TUISuccessBlock)onSuccess
    onError:
    (TUIErrorBlock)onError

    Exit the connection.

    Calling this interface will exit the room connection state, and can only be called in the connected state.

    TUIConnectionCode

    TUIConnectionCode

    Connection Request Status

    Enum
    Value
    DESC
    TUIConnectionCodeUnknown
    -1
    default.
    TUIConnectionCodeSuccess
    0
    Request success.
    TUIConnectionCodeRoomNotExist
    1
    Request room not exist.
    TUIConnectionCodeConnecting
    2
    The room you are invited to connect to is already in the invitation list or is already connected.
    TUIConnectionCodeConnectingOtherRoom
    3
    The room you are invited to connect to is connecting with other rooms.
    TUIConnectionCodeFull
    4
    The current number of connections has reached the maximum limit.
    TUIConnectionCodeRetry
    5
    Please try again.

    TUIConnectionUser

    TUIConnectionUser

    Connection User Info

    EnumType
    DESC
    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.
    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