tencent cloud

All product documents
Tencent Real-Time Communication
VideoLiveKit
Last updated: 2025-02-24 16:06:18
VideoLiveKit
Last updated: 2025-02-24 16:06:18

API Introduction

VideoLiveKit is a live streaming component with a UI interface, using the VideoLiveKit API, you can quickly implement an online live streaming scenario through simple interfaces. If you want to experience and debug interactive live streaming, please refer to Run Demo. If you want to integrate our feature directly into your project, please read Quick Integration (TUILiveKit).
Note:
If you have your own UI design and want to develop with LiveKit business, we also provide the more flexible and comprehensive RTC Room Engine SDK. You can learn more about its features by checking our RTC Room Engine SDK API documentation.

API Overview

API
Description
Create a VideoLiveKit instance (Singleton Pattern)
startLive
Start a live room using roomId.
stopLive
End the live stream.
joinLive
Join a live room using roomId.
leaveLive
Leave the live stream.

API Details

createInstance

Obtain a VideoLiveKit instance.
static func createInstance() -> VideoLiveKit
Returned value: VideoLiveKit

startLive

Start a live room using roomId.
func startLive(roomId: String)
Parameter:
Parameter
Type
Description
Meaning
roomId
String
Mandatory
Live Streaming Room ID

stopLive

Join a live streaming room by roomId.
func stopLive(onSuccess: TUISuccessBlock?, onError: TUIErrorBlock?)
Parameters:
Parameter
Type
Description
Meaning
onSuccess
TUISuccessBlock?
Optional
Success callback. Specific type: () -> Void?
onError
TUIErrorBlock?
Optional
Callback failure. Specific type: (TUIError, String)?

joinLive

Join a live room using roomId.
func joinLive(roomId: String)
Parameter:
Parameter
Type
Description
Meaning
roomId
String
Mandatory
Live Streaming Room ID

leaveLive

Join a live streaming room through roomId.
func leaveLive(onSuccess: TUISuccessBlock?, onError: TUIErrorBlock?)
Parameter:
Parameter
Type
Description
Meaning
onSuccess
TUISuccessBlock?
Optional
Success callback. Specific type: () -> Void?
onError
TUIErrorBlock?
Optional
Callback failure. Specific type: (TUIError, String)?
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

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
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon