tencent cloud

Tencent Real-Time Communication

お知らせ・リリースノート
製品アップデート情報
Tencent Cloudオーディオビデオ端末SDKの再生アップグレードおよび承認チェック追加に関するお知らせ
TRTCアプリケーションのサブスクリプションパッケージサービスのリリースに関する説明について
製品の説明
製品概要
基礎概念
製品の機能
製品の強み
ユースケース
性能データ
購入ガイド
Billing Overview
無料時間の説明
Monthly subscription
Pay-as-you-go
TRTC Overdue and Suspension Policy
課金に関するよくあるご質問
Refund Instructions
初心者ガイド
Demo体験
Call
コンポーネントの説明(TUICallKit)
Activate the Service
Run Demo
クイック導入
オフライン通知
Conversational Chat
クラウドレコーディング(TUICallKit)
AI Noise Reduction
インターフェースのカスタマイズ
Calls integration to Chat
Additional Features
No UI Integration
Server APIs
Client APIs
Solution
ErrorCode
公開ログ
よくある質問
ライブ配信
Billing of Video Live Component
Overview
Activating the Service (TUILiveKit)
Demo のクイックスタート
No UI Integration
UI Customization
Live Broadcast Monitoring
Video Live Streaming
Voice Chat Room
Advanced Features
Client APIs
Server APIs
Error Codes
Release Notes
FAQs
RTC Engine
Activate Service
SDKのダウンロード
APIコードサンプル
Usage Guidelines
クライアント側 API
高度な機能
RTC RESTFUL API
History
Introduction
API Category
Room Management APIs
Stream mixing and relay APIs
On-cloud recording APIs
Data Monitoring APIs
Pull stream Relay Related interface
Web Record APIs
AI Service APIs
Cloud Slicing APIs
Cloud Moderation APIs
Making API Requests
Call Quality Monitoring APIs
Usage Statistics APIs
Data Types
Appendix
Error Codes
コンソールガイド
アプリケーション管理
使用統計
監視ダッシュボード
開発支援
Solution
Real-Time Chorus
よくあるご質問
課金関連問題
機能関連
UserSig関連
ファイアウォールの制限の対応関連
インストールパッケージの圧縮に関するご質問
AndriodおよびiOS関連
Web端末関連
Flutter関連
Electron関連
TRTCCalling Web関連
オーディオビデオ品質関連
その他のご質問
旧バージョンのドキュメント
TUIRoom(Web)の統合
TUIRoom (Android)の統合
TUIRoom (iOS)の統合
TUIRoom (Flutter)の統合
TUIRoom (Electron)の統合
TUIRoom APIのクエリー
クラウドレコーディングと再生の実現(旧)
Protocols and Policies
セキュリティコンプライアンス認証
セキュリティホワイトペーパー
情報セキュリティの説明
Service Level Agreement
Apple Privacy Policy: PrivacyInfo.xcprivacy
TRTC ポリシー
プライバシーポリシー
データ処理とセキュリティ契約
用語集

Audience List Component(Web Desktop Browser)

PDF
フォーカスモード
フォントサイズ
最終更新日: 2025-10-20 11:09:49
This document provides a detailed introduction to the Audience List Component (LiveAudienceList). You can refer to the sample code in this document for seamless integration into your existing project, or customize the style and layout according to your needs by following the component customization section in the document.


Core Features

Feature Category
Specific capabilities
Real-time audience show
Display the online audience list in the live streaming room in real time, support avatar and nickname display, and provide a clear audience information view, enabling hosts to intuitively understand audience composition.
Responsive design
Component support includes UI solutions for desktop and mobile terminals, automatically adapting to different device screen dimensions to provide consistent user experience and meet multi-platform live streaming needs.
Customizable UI
Provide flexible slot mechanism, support customization of audience tags, profile photo style and other elements, enabling you to customize the display effect of the audience list based on business needs, creating a unique visual experience.

Component Integration

Step 1: Configuring the Environment and Activating the Service

Before performing quick integration, you need to refer to preparations, meet the required environment configuration and activate the corresponding service.

Step 2: Dependency Installation

npm
pnpm
yarn
npm install tuikit-atomicx-vue3 @tencentcloud/uikit-base-component-vue3 --save
pnpm add tuikit-atomicx-vue3 @tencentcloud/uikit-base-component-vue3
yarn add tuikit-atomicx-vue3 @tencentcloud/uikit-base-component-vue3

Step 3: Integrating the Audience List Component

Introduce and use the audience list component in your project. You can copy the following example code directly to display the live broadcast audience list in your project.
<template>
<UIKitProvider theme="dark" language="zh-CN">
<div class="app">
<div class="live-audience-container">
<LiveAudienceList class="live-audience-list"/>
</div>
</div>
</UIKitProvider>
</template>

<script setup lang="ts">
import { onMounted } from 'vue';
import { UIKitProvider } from '@tencentcloud/uikit-base-component-vue3';
import { LiveAudienceList, useLoginState, useLiveState } from 'tuikit-atomicx-vue3';

const { login } = useLoginState();
const { joinLive } = useLiveState();

async function initLogin() {
try {
await login({
sdkAppId: 0, // SDKAppID, see Step 1 to get
userId: '', // UserID, see Step 1 to get
userSig: '', // userSig, see Step 1 to get
});
} catch (error) {
console.error('login error:', error);
}
}

onMounted(async () => {
await initLogin();
await joinLive({
liveId: 'input the corresponding live streaming room LiveId', // enter live room
});
});
</script>

<style>.live-audience-container{display:flex;height:100%;width:300px;padding:20px}.live-audience-list{width:100%;height:100%}</style>

Component Customization

Audience List Component provides flexible custom slots, supporting adjustment of audience tags, unique identifiers and other elements' style and layout based on your needs. Below are slot usage examples.

Component Slot

Name
Parameter
Description
customAudienceInfo
audience: AudienceInfo
Customize audience information display UI
// Example of using the customAudienceInfo slot
<LiveAudienceList>
<CustomAudienceInfo #customAudienceInfo />
</LiveAudienceList>
AudienceInfo defines the basic info and status of each audience in a live streaming room:
Parameter
Type
Description
userId
string
The audience's unique identifier must be unique across the entire system.
userName
string
The name displayed for the audience in the live stream supports Chinese and English characters. If empty, the userId is displayed.
avatarUrl
string
The complete URL of the audience avatar supports HTTPS protocol.
isMessageDisabled
boolean
Whether the audience is muted. true indicates muted, false indicates normal speaking.
joinTime
number
Timestamp of audience entering the live room, for sorting and statistics
interface AudienceInfo {
userId: string; // Audience unique ID
userName?: string; // Audience display name (optional)
avatarUrl?: string; // Audience avatar URL (optional)
isMessageDisabled?: boolean; // Whether muted (optional)
joinTime?: number; // Entry timestamp (optional)
}

Component Properties

Attribute name
Type
Default Value
Description
height
string
'500px'
Component height, supports CSS units (px, %, vh)
style
CSSProperties
{}
Custom style object used to override component default style

Custom Slot Example

To help you better experience and understand the audience list component's customAudienceInfo slot customization capability, we provide a custom personal info example scenario for your reference. You can refer to the above step 3 and incrementally copy the following code into your project to achieve a similar effect.
<template>
<LiveAudienceList>
<template #customAudienceInfo="{ audience }">
<div class="custom-audience-info">
avatar
<img
:src="audience.avatarUrl || defaultAvatar"
:alt="audience.userName || audience.userId"
class="audience-avatar"
/>
audience information
<div class="audience-details">
<span class="audience-name">{{ audience.userName || audience.userId }}</span>
<span class="join-time">{{ formatJoinTime(audience.joinTime) }}</span>
</div>
status indicator
<div v-if="audience.isMessageDisabled" class="muted-indicator">🔇</div>
</div>
</template>
</LiveAudienceList>
</template>

<script setup lang="ts">
import { LiveAudienceList } from 'tuikit-atomicx-vue3';

const defaultAvatar = 'xxx'; // Input default avatar Url

const formatJoinTime = (timestamp?: number) => { // Format join time
if (!timestamp) return 'just now join';
const now = Date.now();
const diff = now - timestamp;
const minutes = Math.floor(diff / (1000 * 60));
const hours = Math.floor(diff / (1000 * 60 * 60));
const days = Math.floor(diff / (1000 * 60 * 60 * 24));
if (days > 0) return `${days} days ago join`;
if (hours > 0) return `${hours} hours ago join`;
if (minutes > 0) return `${minutes} minutes ago join`;
return 'just now join';
};
</script>

<style scoped>.custom-audience-info{display:flex;align-items:center;gap:12px;padding:8px;border-radius:8px;transition:background-color .2s ease}.custom-audience-info:hover{background-color:var(--uikit-color-gray-1)}.audience-avatar{width:40px;height:40px;border-radius:50%;object-fit:cover;border:2px solid var(--uikit-color-gray-3)}.audience-details{flex:1;display:flex;flex-direction:column;gap:4px}.audience-name{font-size:14px;font-weight:500;color:var(--text-color-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.join-time{font-size:12px;color:var(--text-color-secondary)}.muted-indicator{font-size:16px;opacity:.6}</style>



ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック