TUILiveKit UI component library.TUILiveKit UI components deliver a complete, interactive live streaming workflow. Once integrated, you can quickly build a fully-featured, interactive live streaming platform.Host Preview Before Going Live | Host Live Streaming | Audience Viewing | Host and Audience Co-hosting |
![]() | ![]() | ![]() | ![]() |

{"name": "entry","version": "1.0.0","dependencies": {"tuilivekit": "file:../../TUILiveKit","@tencentcloud/atomicxcore": "5.3.0"}}
build-profile.json5, add the component module under modules. Make sure the srcPath matches the directory name's case exactly:{"app": {"products": [{"name": "default","targetSdkVersion": "6.1.1(24)","compatibleSdkVersion": "6.0.0(20)","runtimeOS": "HarmonyOS","buildOption": {"strictMode": {"caseSensitiveCheck": true,"useNormalizedOHMUrl": true}}}]},"modules": [{"name": "entry","srcPath": "./entry"},{"name": "tuilivekit","srcPath": "../TUILiveKit"}]}
ohpm install --all
entry/src/main/module.json5:{"module": {"name": "entry","type": "entry","mainElement": "EntryAbility","deviceTypes": ["phone"],"requestPermissions": [{"name": "ohos.permission.INTERNET"},{"name": "ohos.permission.GET_NETWORK_INFO"},{"name": "ohos.permission.CAMERA","reason": "$string:app_name","usedScene": {"abilities": ["EntryAbility"],"when": "inuse"}},{"name": "ohos.permission.MICROPHONE","reason": "$string:app_name","usedScene": {"abilities": ["EntryAbility"],"when": "inuse"}}]}}
bundleName in AppScope/app.json5, and complete debug signing setup in DevEco Studio under File > Project Structure > Signing Configs.import { LoginStore } from '@tencentcloud/atomicxcore'@Componentstruct LoginService {private readonly loginStore: LoginStore = LoginStore.shared()login(): void {// 1. Call the login API. The userSig should be issued by your business backendthis.loginStore.login(1400000001, // Replace with the SDKAppID from the service activation console'denny', // Replace with your UserID'xxxxxxxxxxx', // Replace with the UserSig generated by your backendgetContext(this),).then(() => {// 2. Login successfulconsole.info('login success')}).catch((error: Error) => {console.error(`login failed: ${error.message}`)})}build() {Column() {}}}
Parameter | Type | Description |
SDKAppID | Int | |
UserID | String | The unique ID for the current user. Must contain only English letters, numbers, hyphens, and underscores. |
userSig | String | A ticket for Tencent Cloud authentication. Please note: Development Environment: You can use the local GenerateTestUserSig.genTestSig function to generate a UserSig or generate a temporary UserSig via the UserSig Generation Tool.Production Environment: To prevent key leakage, you must use a server-side method to generate UserSig. For details, see Generating UserSig on the Server. |
import { LoginEvent, LoginStore } from '@tencentcloud/atomicxcore'@Componentstruct LoginEventObserver {private readonly loginStore: LoginStore = LoginStore.shared()observeLoginEvents(): void {this.loginStore.loginEventEmitter.subscribe(this, (event: LoginEvent) => {if (event === LoginEvent.KICKED_OFFLINE) {console.info('kicked offline')} else if (event === LoginEvent.LOGIN_EXPIRED) {console.info('login expired')}})}build() {Column() {}}}
Feature | Description | Integration Guide |
Video Live Streaming | Includes a full suite of features such as host broadcasting, audience viewing, interactive co-hosting, beauty filters, gifts, and bullet chat. | |
Live Stream List | Display the live stream list interface and features, including the live stream list and room information display. |
フィードバック