Starter Deal! First 3 month from only  $9.9 /month!
Starter Deal! First 3 month from only  $9.9 /month!
Grab It Now 
Conference
Overview
  • Web
    • Run Sample Demo
    • Integration
    • UI Customization
    • In-Conference Chat
    • Cloud Recording
    • AI Noise Cancellation
    • Robot Streaming
    • More Features
      • Floating Window
    • API Documentation
      • RoomKit API
      • RoomEngine API
        • API Overview
        • TUIRoomEngine
        • TUIRoomEvents
        • TUIRoomEngine Defines
    • FAQs
  • iOS
    • Run Sample Demo
    • Integration
    • UI Customization
    • Conference Control
    • In-Conference Chat
    • Cloud Recording
    • AI Noise Cancellation
    • Robot Streaming
    • More Features
      • Floating Window
    • API Documentation
      • RoomKit API
      • RoomEngine API
        • API Overview
        • TUIRoomEngine
        • TUIRoomObserver
        • Type Definition
    • FAQs
  • Android
    • Run Sample Demo
    • Integration
    • UI Customization
    • Conference Control
    • In-Conference Chat
    • Cloud Recording
    • AI Noise Cancellation
    • Robot Streaming
    • More Features
      • Floating Window
    • API Documentation
      • RoomKit API
      • RoomEngine API
        • API Overview
        • TUIRoomEngine
        • TUIRoomObserver
        • Type Definition
    • FAQs
  • Electron
    • Run Sample Demo
    • Integration
    • UI Customization
    • In-Conference Chat
    • Cloud Recording
    • AI Noise Cancellation
    • Robot Streaming
    • More Features
      • Floating Window
    • API Documentation
      • RoomKit API
      • RoomEngine API
        • API Overview
        • TUIRoomEvent
        • TUIRoomEngine
        • TUIRoomEngine Defines
    • FAQs
  • Flutter
    • Run Sample Demo
    • Integration
    • UI Customization
    • Conference Control
    • Cloud Recording
    • AI Noise Cancellation
    • Robot Streaming
    • More Features
      • Floating Window
    • API Documentation
      • RoomKit API
      • RoomEngine API
        • API Overview
        • TUIRoomEngine
        • TUIRoomObserver
        • Type Definition
    • FAQs
  • Overview
    • Overview
  • Activate the Service
  • Pricing
    • TRTC Conference Monthly Packages
    • Pay-As-You-Go
    • Free Minutes
  • Error Code
Conference

RoomKit API

Introduction

TUIRoomKit is an open source UI layer suite for conference SDK, currently only supports Swift language on the iOS platform. The conference UI can be called up through simple API calls.

TUIRoomKit Interface

API
Description
Initialize the TUIRoomKit singleton object
Destroy the TUIRoomKit singleton object
Set user information (avatar, nickname) (optional)
Create a room
enterRoom
Enter the room

createInstance

Initialize the TUIRoomKit singleton object.
public class func createInstance() -> TUIRoomKit

destroyInstance

Destroy the TUIRoomKit singleton object.
public class func destroyInstance() -> Void

setSelfInfo(optional)

Set user information (avatar, nickname).
public func setSelfInfo(userName: String,
avatarURL: String,
onSuccess: @escaping TUISuccessBlock,
onError: @escaping TUIErrorBlock) -> Void
Parameter
Type
Meaning
userName
String
Username
avatarURL
String
User avatar URL
onSuccess
TUISuccessBlock
Successful callback
onError
TUIErrorBlock
Failure callback

createRoom

Create a room.
public func createRoom(roomInfo: TUIRoomInfo,
onSuccess: @escaping TUISuccessBlock,
onError: @escaping TUIErrorBlock) -> Void
The parameters are as follows:
Parameter
Type
Meaning
roomInfo
Room data
onSuccess
TUISuccessBlock
Successful callback
onError
TUIErrorBlock
Failure callback

enterRoom

Enter the room.
public func enterRoom(roomId: String,
enableAudio: Bool,
enableVideo: Bool,
isSoundOnSpeaker: Bool,
onSuccess: @escaping TUISuccessBlock,
onError: @escaping TUIErrorBlock) -> Void
The parameters are as follows:
Parameter
Type
Meaning
roomId
String
Room ID string
enableAudio
Bool
Whether to turn on the audio when entering the room
enableVideo
Bool
Whether to turn on the video when entering the room
isSoundOnSpeaker
Bool
Whether to turn on the speakers when entering the room
onSuccess
TUISuccessBlock
Successful callback
onError
TUIErrorBlock
Failure callback