tencent cloud

Feedback

UIKit API

Last updated: 2024-10-17 16:10:44

    API Introduction

    VoiceRoomKit is a voice chat room component with UI interface, using the VoiceRoomKit API, you can quickly implement a voice chat room through simple interfaces. If you want to experience and debug the voice chat room, please read Demo Rapid Deployment. If you want to integrate our feature directly into your project, please read Quick Integration (TUILiveKit).

    API Overview

    API
    Description
    Obtain a VoiceRoomKit object instance.
    Create a voice chat room live streaming room.
    enterRoom
    Enter a voice chat room live streaming room using roomId.

    API Details

    createInstance

    Obtain a VoiceRoomKit object instance.
    static func createInstance() -> VoiceRoomKit
    Return Value:VoiceRoomKit

    createRoom

    Create a voice chat room live streaming room.
    func createRoom(roomId: String, params: CreateRoomParams)
    Parameter:
    Parameter
    Type
    Note
    Default value
    Meaning
    roomId
    String
    Mandatory
    -
    Live Streaming Room ID
    params
    Mandatory
    -
    Create Live Room Parameters
    Return Value:void

    enterRoom

    Enter a voice chat room live streaming room using roomId.
    func enterRoom(roomId: String)
    Parameter:
    Parameter
    Type
    Note
    Default value
    Meaning
    roomId
    String
    Mandatory
    -
    Live Streaming Room ID
    Return Value:void

    VoiceRoomDefine Introduction

    VoiceRoomKit is the UIKit layer data model class for voice chat rooms, mainly including the following data structures:

    CreateRoomParams

    Parameters object when creating a voice chat room live streaming, mainly including the following configuration parameters:
    Parameter
    Type
    Note
    Default value
    Meaning
    roomName
    String
    
    ""
    Voice chat room name
    maxAnchorCount
    Int
    
    10
    Maximum number of users on stage
    seatMode
    Mandatory
    
    Mic On Mode is divided into the following two types:
    TUISeatModeFreeToTake: Free to Join the Podium mode, where the audience can join the mic freely without applying.
    TUISeatModeApplyToTake: Apply to Join the Mic mode, where the audience needs the host's or administrator's approval to join the mic.
    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