tencent cloud

Feedback

RoomKit API

Last updated: 2024-03-29 17:53:52
    Module: TUIRoomKit
    Function: Multi-person audio and video main function interface
    Version: 2.1.0
    TUIRoomKit

    TUIRoomKit

    function list
    describe
    Create a TUIRoomKit instance (singleton mode).
    Destroy the TUIRoomKit instance.
    Set up personal information, including username and avatar.
    Create a room.
    enterRoom
    Enter the room.

    createInstance

    Initialize the TUIRoomKit singleton object.
    public static TUIRoomKit createInstance();

    destroyInstance

    Destroy the TUIRoomKit instance.
    public static void destroyInstance();

    setSelfInfo

    Set up personal information, including username and avatar.
    public abstract void setSelfInfo(String userName, String avatarURL,
    TUIRoomDefine.ActionCallback callback);
    parameter
    describe
    userName
    The individual's username.
    avatarURL
    Personal avatar link.
    callback
    Callback for success in setting personal information.

    createRoom

    Create a room.
    public abstract void createRoom(TUIRoomDefine.RoomInfo roomInfo, TUIRoomDefine.ActionCallback callback);
    parameter
    describe
    roomInfo
    Parameters for creating a room, including room number, room name, etc., where roomId is required and the rest can be default values.
    callback
    Callback to determine whether the room is successfully created.

    enterRoom

    Enter the room.
    public abstract void enterRoom(String roomId,
    boolean enableAudio,
    boolean enableVideo,
    boolean isSoundOnSpeaker, TUIRoomDefine.GetRoomInfoCallback callback);
    parameter
    describe
    roomId
    Room number to enter the room.
    enableAudio
    true: When entering the room, turn on the microphone and push local audio data to the remote end. Other members can hear the local sound normally;
    false: When entering the room, only the microphone is turned on and local audio data is not pushed to the remote end. Other members cannot hear the local sound.
    enableVideo
    true: Enter the room, turn on the camera, and push the local video data to the remote end. Other members can see the local picture normally;
    false: When entering the room, the camera will not be turned on and local video data will not be pushed to the remote end. Other members will not be able to see the local video.
    isSoundOnSpeaker
    Whether to use the speaker to play sound, true to use the speaker, false to use the earpiece.
    callback
    Callback whether the room entry is successful.
    
    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