tencent cloud

Feedback

LiveCoreViewDefine

Last updated: 2024-11-19 14:51:32

    Type Definition

    Type
    Description
    Set callback events for core control connections.
    Layout mode during connection, supporting grid layout, floating window layout, and custom layout.
    Connection view adapter interface, which allows you to add widgets to each audio and video stream view by implementing this interface.

    ConnectionObserver

    Type
    Description
    Callback for changes in the list of connected users.
    Callback for receiving a connection request.
    Callback for receiving a request to cancel the connection.
    Callback for connection request approval.
    Callback for connection request rejection.
    Callback for connection request timeout.
    Callback for the host disconnecting the mic connection with this viewer.
    Callback for the viewer actively disconnecting.
    Callback for changes in the cross-room connection room list.
    Callback for receiving a cross-room connection request.
    Callback for receiving a request to cancel the cross-room connection.
    Received callback for consent to cross-room connection
    Received callback for cross-room connection rejection
    Received callback for cross-room connection timeout.
    Received callback for cross-room disconnection.
    Received callback for room termination.

    LayoutMode

    Layout mode during connection
    Type
    Description
    GRID_LAYOUT
    Grid Layout.
    FLOAT_LAYOUT
    Floating Window Layout.
    FREE_LAYOUT
    Custom Layout.

    VideoViewAdapter

    Connection view adapter interface, which allows you to add widgets to each audio and video stream view by implementing this interface.
    API
    Description
    Callback when creating a connected audience view. The View created through this API will be displayed on the connected audience's view.
    Callback when updating the connected audience view.
    Callback when creating a connected host view, the View created through this API will be displayed on the connected host's view.
    Callback when updating the connected host view.

    Callback Event Details

    onConnectedUsersUpdated

    Callback for changes in the list of connected users.
    void onConnectedUsersUpdated(List<UserInfo> userList, List<UserInfo> joinList, List<UserInfo> leaveList);
    Parameters:
    Parameter
    Type
    Description
    userList
    List<UserInfo>
    List of connected users
    joinList
    List<UserInfo>
    Newly connected users
    leaveList
    List<UserInfo>
    Users who have left the connection
    Returned value: void

    onUserConnectionRequest

    Callback for receiving a connection request.
    void onUserConnectionRequest(UserInfo inviterUser);
    Parameters:
    Parameter
    Type
    Description
    inviterUser
    UserInfo
    Information of the user applying for connection
    Returned value: void

    onUserConnectionCancelled

    Callback for receiving a request to cancel the connection.
    void onUserConnectionCancelled(UserInfo inviterUser);
    Parameters:
    Parameter
    Type
    Description
    inviterUser
    UserInfo
    Information of the user canceling the connection
    Returned value: void

    onUserConnectionAccepted

    Callback for connection request approval.
    void onUserConnectionAccepted(UserInfo userInfo);
    Parameters:
    Parameter
    Type
    Description
    userInfo
    UserInfo
    Information of users who agreed to the mic connection
    Returned value: void

    onUserConnectionRejected

    Callback for connection request rejection.
    void onUserConnectionRejected(UserInfo userInfo);
    Parameters:
    Parameter
    Type
    Description
    userInfo
    UserInfo
    Information of users who rejected the mic connection
    Returned value: void

    onUserConnectionTimeout

    Callback for connection request timeout.
    void onUserConnectionTimeout(UserInfo userInfo);
    Parameters:
    Parameter
    Type
    Description
    userInfo
    UserInfo
    Information of users whose mic connection request timed out
    Returned value: void

    onUserConnectionTerminated

    Callback for the host disconnecting the mic connection with this viewer.
    vvoid onUserConnectionTerminated();
    Parameter: None
    Returned value: void

    onUserConnectionExited

    Callback for disconnecting a connected user.
    void onUserConnectionExited(UserInfo userInfo);
    Parameters:
    Parameter
    Type
    Description
    userInfo
    UserInfo
    User information
    Returned value: void

    onConnectedRoomsUpdated

    Callback for changes in the connected room list.
    void onConnectedRoomsUpdated(List<RoomInfo> roomList);
    Parameters:
    Parameter
    Type
    Description
    roomList
    List<RoomInfo>
    Room list
    Returned value: void

    onCrossRoomConnectionRequest

    Callback for receiving a cross-room connection request.
    void onCrossRoomConnectionRequest(RoomInfo roomInfo);
    Parameters:
    Parameter
    Type
    Description
    roomInfo
    RoomInfo
    Information of the live room applying for connection
    Returned value: void

    onCrossRoomConnectionCancelled

    Callback for receiving a request to cancel the cross-room connection.
    void onCrossRoomConnectionCancelled(RoomInfo roomInfo);
    Parameters:
    Parameter
    Type
    Description
    roomInfo
    RoomInfo
    Information of the live room cancelling the connection application
    Returned value: void

    onCrossRoomConnectionAccepted

    Callback for receiving the cross-room connection approval.
    void onCrossRoomConnectionAccepted(RoomInfo roomInfo);
    Parameters:
    Parameter
    Type
    Description
    roomInfo
    RoomInfo
    Information of the live room agreeing to the connection
    Returned value: void

    onCrossRoomConnectionRejected

    Callback for receiving the cross-room connection rejection.
    void onCrossRoomConnectionRejected(RoomInfo roomInfo);
    Parameters:
    Parameter
    Type
    Description
    roomInfo
    RoomInfo
    Information of the live room rejecting the connection
    Returned value: void

    onCrossRoomConnectionTimeout

    Received callback for room connection request timeout.
    void onCrossRoomConnectionTimeout(RoomInfo inviter, RoomInfo invitee);
    Parameters:
    Parameter
    Type
    Description
    inviter
    RoomInfo
    Information of the live room applying for connection
    invitee
    RoomInfo
    Information of the live room invited for connection
    Returned value: void

    onCrossRoomConnectionExited

    Callback for changes in the list of connected users.
    void onCrossRoomConnectionExited(RoomInfo roomInfo);
    Parameters:
    Parameter
    Type
    Description
    roomInfo
    RoomInfo
    Information of the live room exiting the connection
    Returned value: void

    onRoomDismissed

    Received callback for live room termination.
    void onRoomDismissed(String roomId);
    Parameters:
    Parameter
    Type
    Description
    roomId
    String
    Room ID
    Returned value: void

    createCoGuestView

    Create an overlay view for audience mic connection. This view will be added to the user's video stream.
    View createCoGuestView(TUIRoomDefine.UserInfo userInfo);
    Parameters:
    Parameter
    Type
    Description
    userInfo
    UserInfo
    Information of the user connected to the mic
    Returned value: View

    updateCoGuestView

    Callback for updating the overlay view. Generally, you don’t need to concern yourself with this callback; you can update your overlay view according to the state of your overlay data, unless your overlay depends on the change in userInfo.
    void updateCoGuestView(TUIRoomDefine.UserInfo userInfo, View coGuestView);
    Parameters:
    Parameter
    Type
    Description
    userInfo
    UserInfo
    Information of the user connected to the mic
    coGuestView
    View
    The widget view created by you through the createCoGuestView API
    Returned value: void

    createCoHostView

    Create the widget view for the connected host, which will be added to the video stream of the connected host.
    View createCoHostView(TUILiveConnectionManager.ConnectionUser connectionUser);
    Parameters:
    Parameter
    Type
    Description
    connectionUser
    ConnectionUser
    Information of the connected host
    Returned value: View

    updateCoHostView

    Callback for updating the widget view. Generally, you do not need to worry about this callback. You can update the widget view you set based on the status of your own widget data, unless your widget relies on changes in connectionUser.
    void updateCoHostView(TUILiveConnectionManager.ConnectionUser connectionUser, View coHostView);
    Parameters:
    Parameter
    Type
    Description
    connectionUser
    ConnectionUser
    Information of the connected host
    coHostView
    View
    The widget view created by you through the createCoHostView API
    Returned value: void
    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