tencent cloud

Feedback

VoiceRoomDefine

Last updated: 2024-12-03 17:45:08

    Type Definition

    Type
    Description
    Layout modes of the seat position list support element layout, grid layout, vertical layout, and custom layout
    Alignment of seat position layout
    Request type (apply to speak and invite to speak)
    Size
    Size of the seat position layout
    Microphone position layout configuration information
    Seating Layout Row Configuration Information
    Request Callback
    Seat view adapter

    LayoutMode

    Layout modes of the seat position list
    Type
    Description
    FOCUS
    Element Layout
    GRID
    Grid Layout
    VERTICAL
    Vertical layout
    FREE
    Customized Layout

    SeatViewLayoutRowAlignment

    Alignment of seat position layout
    Type
    Description
    START
    Seat position near the start
    END
    Seat position near the end
    CENTER
    Seat position near the middle
    SPACE_BETWEEN
    No space before the first and after the last seat positions, evenly distribute the remaining space between other seat positions
    SPACE_AROUND
    Distribute half of the space before the first and after the last seat positions, evenly distribute the remaining space between other seat positions
    SPACE_EVENLY
    Evenly distribute the remaining space between all seat positions

    RequestType

    Request type
    Type
    Description
    APPLY_TO_TAKE_SEAT
    Apply to speak
    INVITE_TO_TAKE_SEAT
    Invite to speak

    Size

    Size of the seat position layout
    Type
    Description
    width
    Layout width
    height
    Layout height

    SeatViewLayoutConfig

    Microphone position layout configuration information
    Type
    Description
    rowConfigs
    List of all row configuration information in the seat layout, refer to SeatViewLayoutRowConfig for content.
    rowSpacing
    Seat row spacing

    SeatViewLayoutRowConfig

    Seating Layout Row Configuration Information
    Type
    Description
    count
    Number of seats displayed in this row
    seatSpacing
    Horizontal spacing of each seat in this row (effective only when the alignment is START, END, or CENTER)
    seatSize
    Size of the seat layout in this row
    alignment
    Alignment of the layout in this row (SeatViewLayoutRowAlignment)

    RequestCallback

    Request to speak/Invite to speak callback
    API
    Description
    Request accepted
    Request rejected
    Request canceled
    onTimeout
    Request timeout
    onError
    Request Exception

    SeatViewAdapter

    Seat View Adapter Interface, you can customize the display UI of each seat by implementing this interface.
    API
    Description
    Callback when creating a single seat layout.
    Callback when updating the seat view.
    Callback when updating user volume.

    Event Callback Details

    onAccepted

    Application to speak/invite to speak request accepted.
    void onAccepted(TUIRoomDefine.UserInfo userInfo);
    Parameter:
    Parameter
    Type
    Description
    userInfo
    UserInfo
    Response to the current request's user information
    Returned value: void

    onRejected

    Application to speak/invite to speak request rejected.
    void onRejected(TUIRoomDefine.UserInfo userInfo);
    Parameter:
    Parameter
    Type
    Description
    userInfo
    UserInfo
    Response to the current request's user information
    Returned value: void

    onCancelled

    Application to speak/invite to speak request canceled.
    void onCancelled(TUIRoomDefine.UserInfo userInfo);
    Parameter:
    Parameter
    Type
    Description
    userInfo
    UserInfo
    User information for the canceled request
    Returned value: void

    onTimeout

    Application to speak/invite to speak request timed out.
    void onTimeout(TUIRoomDefine.UserInfo userInfo);
    Parameter:
    Parameter
    Type
    Description
    userInfo
    UserInfo
    User information for the initiated request
    Returned value: void

    onError

    Application to speak/invite to speak request error.
    void onError(TUIRoomDefine.UserInfo userInfo, TUICommonDefine.Error error, String message);
    Parameter:
    Parameter
    Type
    Description
    userInfo
    UserInfo
    User information for the initiated request
    error
    TUICommonDefine.Error
    Error code
    message
    String
    Error message
    Returned value: void

    createSeatView

    Callback when creating a single seat layout, you need to return your custom view, and the core view will help you create the view.
    View createSeatView(SeatGridView seatGridView, TUIRoomDefine.SeatInfo seatInfo);
    Parameter:
    Parameter
    Type
    Description
    seatGridView
    SeatGridView
    Core components of voice chat room
    seatInfo
    SeatInfo
    Seat information
    Returned value: View

    updateSeatView

    Callback when updating the seat view, you can update your seat view based on the seatInfo information returned by the callback.
    void updateSeatView(SeatGridView seatGridView, TUIRoomDefine.SeatInfo seatInfo, View seatView);
    Parameter:
    Parameter
    Type
    Description
    seatGridView
    SeatGridView
    Core components of voice chat room
    seatInfo
    SeatInfo
    Seat information
    seatView
    View
    Current updated seat view
    Return Value:void

    updateUserVolume

    Callback when updating user volume, you can update your seat view based on the returned volume.
    void updateUserVolume(SeatGridView seatGridView, int volume, View seatView);
    Parameter:
    Parameter
    Type
    Description
    seatGridView
    SeatGridView
    Core components of voice chat room
    volume
    int
    Volume level
    seatView
    View
    Current seat layout view with volume changes
    Return 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