Message Sending Component allows users to input emojis and text messages in the bullet screen and send the message to the live streaming room. Users in the live streaming room can receive the message through the Live Streaming Rendering Component and display it on the screen, thereby enhancing the fun of the live stream and making the interaction experience more enjoyable and vivid.BarrageInputView: Message Sending Component that allows users to input emojis and text messages in the barrage and send the message to the live streaming room.BarrageInputView: Message Sending Component, which allows users to input emojis and text messages in the barrage and send the message to the live streaming room.BarrageSendWidget: Message Sending Component, which enables users to input emojis and text messages in the barrage and send the message to the live streaming room.


settings.gradle.kts (or settings.gradle) file in the project root directory: add the jitpack repository dependency (to download the SVGAPlayer third-party library for playing gift svg animations).dependencyResolutionManagement {repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)repositories {google()mavenCentral()// Add jitpack repository urlmaven { url = uri("https://jitpack.io") }}}
dependencyResolutionManagement {repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)repositories {google()mavenCentral()// Add jitpack repository urlmaven { url 'https://jitpack.io' }}}
settings.gradle.kts (or settings.gradle) file in the project root directory. It enables importing the downloaded tuilivekit component into your current project:include(":tuilivekit")
include ':tuilivekit'
build.gradle.kts (or build.gradle) file under the app directory and add the following code in it. It enables declaring the current app's dependency on the newly joined tuilivekit component:api(project(":tuilivekit"))
api project(':tuilivekit')
TRTC SDK, IM SDK, tuiroomengine, and the public library tuicore by default. Developers do not need to separately configure them. If needed, just modify the tuilivekit/build.gradle file to upgrade.proguard-rules.pro file:-keep class com.tencent.** { *; }-keep class com.trtc.uikit.livekit.livestreamcore.** { *; }-keep class com.trtc.uikit.livekit.component.gift.store.model.** { *; }-keep class com.squareup.wire.** { *; }-keep class com.opensource.svgaplayer.proto.** { *; }-keep class com.tcmediax.** { *; }-keep class com.tencent.** { *; }-keep class com.tencent.xmagic.** { *; }-keep class androidx.exifinterface.** {*;}-keep class com.google.gson.** { *;}# Tencent Effect SDK - beauty-keep class com.tencent.xmagic.** { *;}-keep class org.light.** { *;}-keep class org.libpag.** { *;}-keep class org.extra.** { *;}-keep class com.gyailib.**{ *;}-keep class com.tencent.cloud.iai.lib.** { *;}-keep class com.tencent.beacon.** { *;}-keep class com.tencent.qimei.** { *;}-keep class androidx.exifinterface.** { *;}
AndroidManifest.xml file under the app directory, add tools:replace="android:allowBackup" and android:allowBackup="false" in the application node, overwrite the setting within component, and use your own setting.// app/src/main/AndroidManifest.xml<application...// add the following configuration to overwrite the configuration in the dependent sdkandroid:allowBackup="false"tools:replace="android:allowBackup">
Barrage folder from GitHub to your local system.
pod 'TUIBarrage' dependency in the Podfile file of your project.target 'xxxx' do......pod 'TUIBarrage', :path => '../Component/Barrage/TUIBarrage.podspec'// The path is the relative path between your Podfile file and TUIBarrage.Podspec file.end
Podfile file, first use the terminal to cd into the xxxx.xcodeproj directory, then create it with the following command:pod init
cd to the Podfile directory, then execute the following commands to install components.pod install
dependencies:flutter:sdk: flutterflutter_localizations:sdk: flutterintl: ^0.19.0# Add barrage dependencylive_uikit_barrage: ^1.0.0
flutter pub get command.localizationsDelegates and supportedLocales properties of your application's MaterialApp.MaterialApp(localizationsDelegates: const [...BarrageLocalizations.localizationsDelegates,], supportedLocales: const [...BarrageLocalizations.supportedLocales,],// ...);
BarrageInputView. Click to bring up the input interface.BarrageInputView barrageInputView = new BarrageInputView(mContext);barrageInputView.init(roomId);mBarrageInputContainer.addView(barrageInputView);
BarrageInputView. Click to bring up the input interface.import TUIBarragelet barrageInputView =BarrageInputView(roomId: roomId)// ...Add barrageInputView to your parent view here and adjust the layout.
BarrageSendController _sendController = BarrageSendController(roomId: "liveRoomId", /// Replace with your liveRoomIdownerId: "liveOwnerId", /// Replace liveOwnerId with your live stream host IDselfUserId: "selfUserId", /// Replace selfUserId with your currently logged-in user IDselfName: "selfUserName"; /// Replace selfUserName with your currently logged-in user nicknameBarrageSendWidget(controller: _sendController);
Feedback