TUILiveKit host streaming is powered by PusherView, a ready-to-use, fully featured interface designed for live streaming applications. It supports pre-stream preview, live video broadcasting, real-time audience interaction, and post-stream settlement, enabling rapid integration into your app.Host Preview Before Going Live | Host Live Streaming | Host and Audience Co-hosting |
![]() | ![]() | ![]() |
PusherView, please make sure you have logged in; otherwise, the live broadcast will fail.NSCameraUsageDescription, NSMicrophoneUsageDescription plist and statement audio background mode (UIBackgroundModes - > audio, That is, Target → Signing & Capabilities → Background Modes → Audio, AirPlay, and Picture in Picture. The component will apply for camera and microphone permissions at runtime.import 'package:flutter/material.dart';import 'package:tencent_live_uikit/tencent_live_uikit.dart';class PusherPage extends StatelessWidget {const PusherPage({super.key, required this.liveID});final String liveID;@overrideWidget build(BuildContext context) {return Scaffold(backgroundColor: Colors.black,// 1. The comment input bar and bottom safe area are handled by the component; do not compress the body in the host pageresizeToAvoidBottomInset: false,body: PusherView(// 2. Pass the live room ID (required)liveID: liveID,// 3. Set the exit callback: triggered when closing the preview or exiting the settlement pageonExit: () {final NavigatorState navigator = Navigator.of(context);if (navigator.canPop()) {navigator.pop();}},),);}}
liveID must be non-null and no longer than 48 bytes (UTF-8 encoded). You can generate it from your backend or use custom rules (the demo uses live_$userID).import 'package:flutter/material.dart';import 'pusher_page.dart';void enterPusherPage(BuildContext context, String liveID) {Navigator.of(context).push(MaterialPageRoute<void>(builder: (_) => PusherPage(liveID: liveID),fullscreenDialog: true,),);}
Property | Description |
liveID (required) | Live room ID. Must be non-null and not exceed 48 bytes (UTF-8 encoded). Used to create the co-hosting store and video views. |
onExit | VoidCallback? Triggered when the user closes the pre-stream preview or exits the settlement page. The component releases the session first. |
Stage | Description |
Pre-stream Preview | Camera preview, stream title and cover setup, beauty filter and audio effect tuning. Tap start streaming to begin countdown. |
Live Streaming | The component calls AtomicPusher.startPush to start streaming, and displays live comments, gifts, co-hosting, online audience, and other interactive UIs. |
Post-stream Settlement | After ending the stream, shows session statistics. When the user clicks exit, triggers onExit. |
Feature | Description | Integration Guide |
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. | |
Live Stream List | Display the live stream list interface and features, including the live stream list and room information display. |
iOS | Android |
![]() | ![]() |
Apakah halaman ini membantu?
Anda juga dapat Menghubungi Penjualan atau Mengirimkan Tiket untuk meminta bantuan.
masukan