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 ポリシー
プライバシーポリシー
データ処理とセキュリティ契約
用語集

Live Stream List Live Stream List(Android)

PDF
フォーカスモード
フォントサイズ
最終更新日: 2025-11-21 14:25:06

Feature Preview

This document provides a detailed introduction to the Live Stream List Page in TUILiveKit. You can directly integrate our pre-built live stream list page into your existing project, or deeply customize the page style, layout, and features according to your specific needs.
Double-Column Waterfall Flow: Default view, simultaneously displaying previews for 2 live rooms.
Single-Column Waterfall Flow: Default view, simultaneously displaying a preview for 1 live room.
Double-Column Waterfall Flow
Single-Column Waterfall Flow








Note:
When previewing live room screens, the preview duration is counted into the viewer's audio/video duration. For detailed billing information, please refer to Pricing.

Quick Start

Step 1. Activate the Service

Refer to the Activate Service document to enable the Free trial or official package.

Step 2. Code Integration

Refer to Preparations guide to integrate the TUILiveKit SDK.

Step 3. Add the Live Stream List Page

The LiveListView component is a dedicated view for displaying the live stream list. It automatically pulls the live room list, supports different display styles (single-column and double-column).
Kotlin
Java
import android.content.Context
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.trtc.uikit.livekit.features.livelist.LiveListView
import com.trtc.uikit.livekit.features.livelist.Style

class YourActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
// 1. Create and initialize waterfall layout view
val view = createLiveListView(this)
// 2. Add the created LiveListView to your Activity or Fragment
setContentView(view)
}

fun createLiveListView(context: Context): LiveListView {
val liveListView = LiveListView(context)
// This code is a two-column waterfall layout initialization example. If you need to use a single column waterfall layout, change the initialization code to liveListView.init(this, Style.SINGLE_COLUMN)
liveListView.init(this, Style.DOUBLE_COLUMN)
return liveListView
}
}
import android.content.Context;
import android.os.Bundle;

import androidx.appcompat.app.AppCompatActivity;

import com.trtc.uikit.livekit.features.livelist.LiveListView;
import com.trtc.uikit.livekit.features.livelist.Style;

public class YourActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// 1. Create and initialize waterfall layout view
LiveListView view = createLiveListView(this);
// 2. Add the created LiveListView to your Activity or Fragment
setContentView(view);
}

private LiveListView createLiveListView(Context context) {
LiveListView liveListView = new LiveListView(context);
// This code is a two-column waterfall layout initialization example. If you need to use a single column waterfall layout, change the initialization code to liveListView.init(this, Style.SINGLE_COLUMN, null, null);
liveListView.init(this, Style.DOUBLE_COLUMN, null, null);
return liveListView;
}
}

Step 4. Navigate to the Audience Viewing Page

You can customize the page navigation by setting a click listener. For audience viewing page implementation, see Audience Viewing:

Example Code:
Kotlin
Java
fun createLiveListView(context: Context): LiveListView {
val liveListView = LiveListView(context)
// This code is a two-column waterfall layout initialization example. If you need to use a single column waterfall layout, change the initialization code to liveListView.init(this, Style.SINGLE_COLUMN)
liveListView.init(this, Style.DOUBLE_COLUMN)

liveListView.setOnItemClickListener { view, liveInfo ->
click live list item to redirect to audience viewing page
val intent = Intent(context, YourAudienceActivity::class.java)
intent.putExtra("liveId", liveInfo.roomId)
context.startActivity(intent)
}
return liveListView
}
private LiveListView createLiveListView(Context context) {
LiveListView liveListView = new LiveListView(context);
// This code is a two-column waterfall layout initialization example. If you need to use a single column waterfall layout, change the initialization code to liveListView.init(this, Style.SINGLE_COLUMN, null, null);
liveListView.init(this, Style.DOUBLE_COLUMN, null, null);

liveListView.setOnItemClickListener((view, liveInfo) -> {
click live list item to redirect to audience viewing page
Intent intent = new Intent(context, YourAudienceActivity.class);
intent.putExtra("liveId", liveInfo.roomId);
context.startActivity(intent);
});
return liveListView;
}

Customize Your UI Layout

TUILiveKit provides flexible interfaces to customize the live list waterfall component. You can customize the data source and list item styles according to your business needs.

Customize Data Source

If your backend has a separate live list data, you can customize the data source by implementing the LiveListDataSource interface instead of using the component's default list data.
Kotlin
Java
// 1. Import dependency
import com.trtc.uikit.livekit.features.livelist.LiveListDataSource;

// 2. Customize the data source by implementing LiveListDataSource
val dataSource = object : LiveListDataSource {
override fun fetchLiveList(param: FetchLiveListParam,callback: LiveListCallback) {
// Connect to your own business backend and return data to the UI component in the following format
val liveInfoList = mutableListOf<TUILiveListManager.LiveInfo>()
val liveInfo = TUILiveListManager.LiveInfo().apply {
roomInfo = TUIRoomDefine.RoomInfo().apply {
roomId = "live_123456"
name = "live_123456"
}
}
liveInfoList.add(liveInfo)
val cursor = "aabbccdd"
callback.onSuccess(cursor, liveInfoList)
}
}

// 3. Import a custom dataSource during initialization
liveListView.init(this, Style.DOUBLE_COLUMN, dataSource = dataSource)
// 1. Import dependency
import com.trtc.uikit.livekit.features.livelist.LiveListDataSource;

// 2. Customize the data source by implementing LiveListDataSource
LiveListDataSource dataSource = (param, callback) -> {
// Connect to your own business backend and return data to the UI component in the following format
List<TUILiveListManager.LiveInfo> liveInfoList = new ArrayList<>();
TUILiveListManager.LiveInfo liveInfo = new TUILiveListManager.LiveInfo();
liveInfo.roomInfo = new TUIRoomDefine.RoomInfo();
liveInfo.roomInfo.roomId = "live_123456";
liveInfo.roomInfo.name = "live_123456";
liveInfoList.add(liveInfo);
String cursor = "aabbccdd";
callback.onSuccess(cursor, liveInfoList);
};

// 3. Import a custom dataSource during initialization
liveListView.init(this, Style.DOUBLE_COLUMN, null, dataSource);

Custom View

The bottom of the waterfall list items displays the video stream or live cover by default. If you need to customize the UI elements at the top of the list items (such as the host's avatar, live title, etc.), you can do so by implementing the LiveListViewAdapter interface.
Kotlin
Java
// 1. Import dependency
import com.trtc.uikit.livekit.features.livelist.LiveListViewAdapter;

// 2. Implement LiveListViewAdapter to customize widgets
val liveListViewAdapter = object : LiveListViewAdapter {
override fun createLiveInfoView(liveInfo: TUILiveListManager.LiveInfo): View {
// Custom view
val widgetView = YourView(context)
widgetView.init(liveInfo)
return widgetView
}


override fun updateLiveInfoView(view: View, liveInfo: TUILiveListManager.LiveInfo) {
// Refresh the bound data in the view
val widgetView = view as YourView
widgetView.updateLiveInfoView(liveInfo)
}
}

// 3. Import a custom liveListViewAdapter during initialization
liveListView.init(this, Style.DOUBLE_COLUMN, adapter = liveListViewAdapter)
// 1. Import dependency
import com.trtc.uikit.livekit.features.livelist.LiveListViewAdapter;

// 2. Implement LiveListViewAdapter to customize widgets
LiveListViewAdapter liveListViewAdapter = new LiveListViewAdapter() {
@Override
public View createLiveInfoView(TUILiveListManager.LiveInfo liveInfo) {
// Custom view
CustomView widgetView = new CustomView(context);
widgetView.init(liveInfo);
return widgetView;
}


@Override
public void updateLiveInfoView(View view, TUILiveListManager.LiveInfo liveInfo) {
// Refresh the bound data in the view
CustomView widgetView = (CustomView) view;
widgetView.updateLiveInfoView(liveInfo);
}
};

// 3. Import a custom liveListViewAdapter during initialization
liveListView.init(this, Style.DOUBLE_COLUMN, liveListViewAdapter, null);

Next Steps

Congratulations! You have successfully integrated the Live Stream List feature. Next, you can implement features such as Host Live Streaming and Audience Viewing. Please refer to the table below:
Feature
Description
Integration Guide
Host Streaming
The complete workflow for a host to start a stream, including pre-stream setup and various in-stream interactions.
Audience Viewing
Audience can watch live streaming after entering the anchor's live streaming room, with features like audience mic connection, live room information, online audience, and bullet screen display.

FAQs

What should I do if the page shows no live streams after integrating the live list feature?

If you see a blank page, you need to check if you have completed the Complete Login. To test this feature, you can use two devices: one device to start a broadcast, and the other on the live list page to pull the list of ongoing live streams.

What is the difference between single-column and double-column waterfall flows?

A single-column waterfall flow previews one live room at a time, while a double-column waterfall flow previews two live rooms simultaneously. You can choose the appropriate layout based on your design requirements.

Is there a charge for previewing live streams?

Yes, the duration of previewing a live room is counted towards the audience's audio/video duration, which is a paid service. For detailed
Pricing, you can refer to the relevant content in the documentation.


ヘルプとサポート

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

フィードバック