@tencent-rtc/mcp 1.6.4 → 1.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/knowledge/chunker.js +83 -54
- package/knowledge/path-meta.js +179 -26
- package/knowledge/search/exact-lookup.js +153 -0
- package/knowledge/search/filter-pool.js +73 -19
- package/knowledge/search/product-scope-intent.js +2 -2
- package/knowledge/search/requires-framework.js +2 -2
- package/knowledge/search/search-knowledge.js +235 -58
- package/package.json +1 -1
- package/resource/index/manifest.json +1 -1
- package/resource/integration/callkit/preset/android/integration.md +2 -4
- package/resource/integration/callkit/preset/flutter/integration.md +4 -5
- package/resource/integration/callkit/preset/ios/integration.md +1 -4
- package/resource/integration/callkit/preset/react/integration.md +13 -20
- package/resource/integration/callkit/preset/vue/integration.md +14 -21
- package/resource/integration/chat/preset/android/integration.md +6 -9
- package/resource/integration/chat/preset/flutter/integration.md +9 -12
- package/resource/integration/chat/preset/ios/integration.md +2 -4
- package/resource/integration/chat/preset/react/integration.md +0 -10
- package/resource/integration/livekit/preset/live/android/live-audience-integration.md +129 -0
- package/resource/integration/livekit/preset/live/android/live-host-integration.md +219 -0
- package/resource/integration/livekit/preset/live/android/live-list-integration.md +261 -0
- package/resource/integration/livekit/preset/live/android/prepare-integration.md +254 -0
- package/resource/integration/livekit/preset/live/ios/live-audience-integration.md +202 -0
- package/resource/integration/livekit/preset/live/ios/live-host-integration.md +369 -0
- package/resource/integration/livekit/preset/live/ios/live-list-integration.md +229 -0
- package/resource/integration/livekit/preset/live/ios/prepare-integration.md +204 -0
- package/resource/integration/livekit/preset/live/vue/live-list-integration.md +0 -3
- package/resource/integration/livekit/preset/live/vue/live-player-desk-integration.md +0 -5
- package/resource/integration/livekit/preset/live/vue/live-player-h5-integration.md +0 -6
- package/resource/integration/livekit/preset/live/vue/live-pusher-integration.md +5 -10
- package/resource/integration/roomkit/preset/vue/integration.md +0 -4
- package/resource/knowledge/callkit/best-practice/web/callengine-invitation.md +80 -0
- package/resource/knowledge/callkit/best-practice/web/callengine-log-control.md +24 -0
- package/resource/knowledge/callkit/best-practice/web/callkit-call-vs-calls.md +116 -0
- package/resource/knowledge/callkit/core-sdk/android/answer-call.md +7 -8
- package/resource/knowledge/callkit/core-sdk/android/make-call.md +5 -7
- package/resource/knowledge/callkit/core-sdk/android/offline-push.md +3 -5
- package/resource/knowledge/callkit/core-sdk/flutter/answer-call.md +2 -6
- package/resource/knowledge/callkit/core-sdk/flutter/make-call.md +2 -6
- package/resource/knowledge/callkit/core-sdk/flutter/offline-push.md +4 -9
- package/resource/knowledge/callkit/core-sdk/ios/answer-call.md +1 -4
- package/resource/knowledge/callkit/core-sdk/ios/make-call.md +8 -11
- package/resource/knowledge/callkit/core-sdk/ios/offline-push.md +17 -23
- package/resource/knowledge/callkit/core-sdk/web/call-engine.md +33 -0
- package/resource/knowledge/callkit/core-sdk/web/call-event.md +327 -0
- package/resource/knowledge/callkit/core-sdk/web/callengine-api-overview.md +33 -0
- package/resource/knowledge/callkit/faq/android.md +0 -2
- package/resource/knowledge/callkit/faq/error-code.md +0 -2
- package/resource/knowledge/callkit/faq/flutter.md +2 -2
- package/resource/knowledge/callkit/faq/ios.md +3 -5
- package/resource/knowledge/callkit/faq/web.md +2 -3
- package/resource/knowledge/callkit/preset/android/api.md +2 -5
- package/resource/knowledge/callkit/preset/ios/api.md +0 -2
- package/resource/knowledge/callkit/preset/react/api.md +445 -0
- package/resource/knowledge/callkit/preset/react/uikit-api-reference.md +445 -0
- package/resource/knowledge/callkit/preset/vue/api.md +465 -0
- package/resource/knowledge/callkit/preset/vue/uikit-api-reference.md +465 -0
- package/resource/knowledge/chat/best-practice/web/image-message-url-handling.md +16 -0
- package/resource/knowledge/chat/preset/android/features/chat-setting.md +1 -1
- package/resource/knowledge/chat/preset/android/features/conversation-list.md +1 -1
- package/resource/knowledge/chat/preset/android/features/language.md +0 -1
- package/resource/knowledge/chat/preset/android/features/message-input.md +1 -1
- package/resource/knowledge/chat/preset/android/features/message-list.md +2 -3
- package/resource/knowledge/chat/preset/android/features/search.md +0 -1
- package/resource/knowledge/chat/preset/android/features/theme.md +1 -1
- package/resource/knowledge/chat/preset/android-view/integration.md +3 -11
- package/resource/knowledge/chat/preset/flutter/features/conversation-list.md +0 -1
- package/resource/knowledge/chat/preset/flutter/features/message-list.md +1 -2
- package/resource/knowledge/chat/preset/flutter/features/search.md +5 -6
- package/resource/knowledge/chat/preset/flutter/features/theme.md +2 -2
- package/resource/knowledge/chat/preset/ios/features/chat-setting.md +1 -1
- package/resource/knowledge/chat/preset/ios/features/conversation-list.md +1 -2
- package/resource/knowledge/chat/preset/ios/features/message-list.md +1 -2
- package/resource/knowledge/chat/preset/ios/features/search.md +0 -1
- package/resource/knowledge/chat/preset/ios-uikit/integration.md +13 -15
- package/resource/knowledge/chat/preset/react/features/conversation-list.md +5 -5
- package/resource/knowledge/chat/preset/react/features/message-input.md +2 -3
- package/resource/knowledge/chat/preset/react/features/search.md +0 -1
- package/resource/knowledge/chat/preset/react/features/theme.md +0 -1
- package/resource/knowledge/livekit/core-sdk/api-reference/android/AudioEffectStore.md +7 -14
- package/resource/knowledge/livekit/core-sdk/api-reference/android/BarrageStore.md +5 -8
- package/resource/knowledge/livekit/core-sdk/api-reference/android/BattleStore.md +15 -18
- package/resource/knowledge/livekit/core-sdk/api-reference/android/CameraView.md +1 -2
- package/resource/knowledge/livekit/core-sdk/api-reference/android/CoGuestStore.md +15 -20
- package/resource/knowledge/livekit/core-sdk/api-reference/android/CoHostStore.md +10 -13
- package/resource/knowledge/livekit/core-sdk/api-reference/android/DeviceStore.md +2 -4
- package/resource/knowledge/livekit/core-sdk/api-reference/android/GiftStore.md +4 -6
- package/resource/knowledge/livekit/core-sdk/api-reference/android/LikeStore.md +2 -4
- package/resource/knowledge/livekit/core-sdk/api-reference/android/LiveAudienceStore.md +2 -4
- package/resource/knowledge/livekit/core-sdk/api-reference/android/LiveCoreView.md +1 -2
- package/resource/knowledge/livekit/core-sdk/api-reference/android/LiveSeatStore.md +8 -10
- package/resource/knowledge/livekit/core-sdk/api-reference/android/LoginStore.md +5 -7
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/AudioEffectStore.md +7 -14
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/BarrageStore.md +6 -9
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/BaseBeautyStore.md +1 -2
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/BattleStore.md +15 -18
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/CoGuestStore.md +15 -20
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/CoHostStore.md +10 -13
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/DeviceStore.md +2 -4
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/GiftStore.md +4 -6
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LikeStore.md +2 -4
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LiveAudienceStore.md +2 -4
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LiveCoreView.md +1 -2
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LiveSeatStore.md +8 -10
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LoginStore.md +3 -5
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/AudioEffectStore.md +7 -14
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/BarrageStore.md +5 -8
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/BaseBeautyStore.md +1 -2
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/BattleStore.md +6 -9
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/CoGuestStore.md +5 -10
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/CoHostStore.md +3 -6
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/DeviceStore.md +2 -4
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/GiftStore.md +4 -6
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/LikeStore.md +2 -4
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/LiveAudienceStore.md +2 -4
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/LiveCoreView.md +1 -2
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/LiveSeatStore.md +4 -6
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/LoginStore.md +3 -5
- package/resource/knowledge/livekit/core-sdk/api-reference/{web → vue}/index.md +24 -24
- package/resource/knowledge/livekit/core-sdk/{voice/android/voice-audio-effect.md → features/android/audio-effect.md} +1 -2
- package/resource/knowledge/livekit/core-sdk/{live/android/live-gift.md → features/android/gift.md} +2 -3
- package/resource/knowledge/livekit/core-sdk/{voice/android/voice-room-list.md → features/android/live-list.md} +2 -4
- package/resource/knowledge/livekit/core-sdk/{live/flutter/live-audio-effect.md → features/flutter/audio-effect.md} +0 -2
- package/resource/knowledge/livekit/core-sdk/{voice/flutter/voice-barrage.md → features/flutter/barrage.md} +2 -2
- package/resource/knowledge/livekit/core-sdk/{live/flutter/live-gift.md → features/flutter/gift.md} +2 -3
- package/resource/knowledge/livekit/core-sdk/{voice/flutter/voice-room-list.md → features/flutter/live-list.md} +1 -1
- package/resource/knowledge/livekit/core-sdk/{voice/ios/voice-audience-list.md → features/ios/audience-list.md} +1 -2
- package/resource/knowledge/livekit/core-sdk/{voice/ios/voice-audio-effect.md → features/ios/audio-effect.md} +1 -3
- package/resource/knowledge/livekit/core-sdk/{live/ios/live-base-beauty.md → features/ios/base-beauty.md} +2 -2
- package/resource/knowledge/livekit/core-sdk/{voice/ios/voice-gift.md → features/ios/gift.md} +2 -3
- package/resource/knowledge/livekit/core-sdk/{voice/ios/voice-room-list.md → features/ios/live-list.md} +2 -4
- package/resource/knowledge/livekit/core-sdk/live/android/{live-co-guest-interaction.md → co-guest-interaction.md} +0 -1
- package/resource/knowledge/livekit/core-sdk/live/android/{live-host-interaction.md → host-interaction.md} +5 -7
- package/resource/knowledge/livekit/core-sdk/live/android/{live-integration.md → integration.md} +3 -6
- package/resource/knowledge/livekit/core-sdk/live/flutter/{live-co-guest-interaction.md → co-guest-interaction.md} +1 -1
- package/resource/knowledge/livekit/core-sdk/live/flutter/{live-host-interaction.md → host-interaction.md} +0 -2
- package/resource/knowledge/livekit/core-sdk/live/flutter/{live-integration.md → integration.md} +1 -4
- package/resource/knowledge/livekit/core-sdk/live/ios/{live-co-guest-interaction.md → co-guest-interaction.md} +0 -1
- package/resource/knowledge/livekit/core-sdk/live/ios/{live-host-interaction.md → host-interaction.md} +2 -4
- package/resource/knowledge/livekit/core-sdk/live/ios/{live-integration.md → integration.md} +2 -5
- package/resource/knowledge/livekit/core-sdk/voice/android/{voice-host-interaction.md → host-interaction.md} +3 -5
- package/resource/knowledge/livekit/core-sdk/voice/android/{voice-integration.md → integration.md} +3 -6
- package/resource/knowledge/livekit/core-sdk/voice/flutter/{voice-co-guest-interaction.md → co-guest-interaction.md} +1 -2
- package/resource/knowledge/livekit/core-sdk/voice/flutter/{voice-integration.md → integration.md} +6 -9
- package/resource/knowledge/livekit/core-sdk/voice/ios/{voice-co-guest-interaction.md → co-guest-interaction.md} +2 -2
- package/resource/knowledge/livekit/core-sdk/voice/ios/{voice-host-interaction.md → host-interaction.md} +4 -6
- package/resource/knowledge/livekit/core-sdk/voice/ios/{voice-integration.md → integration.md} +1 -4
- package/resource/knowledge/livekit/preset/live/vue/features/barrage.md +0 -2
- package/resource/knowledge/push/api-reference/android.md +123 -0
- package/resource/knowledge/push/api-reference/flutter.md +176 -0
- package/resource/knowledge/push/api-reference/harmonyos.md +138 -0
- package/resource/knowledge/push/api-reference/ios.md +176 -0
- package/resource/knowledge/push/api-reference/react-native.md +147 -0
- package/resource/knowledge/push/api-reference/uni-app.md +147 -0
- package/resource/knowledge/push/api-reference/unity.md +119 -0
- package/resource/knowledge/push/api-reference/unreal-engine.md +123 -0
- package/resource/knowledge/push/config/android.md +4 -7
- package/resource/knowledge/push/config/harmonyos.md +0 -3
- package/resource/knowledge/push/config/ios.md +12 -20
- package/resource/knowledge/push/config/react-native.md +18 -26
- package/resource/knowledge/push/config/unity.md +20 -28
- package/resource/knowledge/push/config/unreal-engine.md +21 -29
- package/resource/knowledge/push/integration/android.md +6 -8
- package/resource/knowledge/push/integration/flutter.md +6 -9
- package/resource/knowledge/push/integration/harmonyos.md +1 -0
- package/resource/knowledge/push/integration/ios.md +7 -9
- package/resource/knowledge/push/integration/react-native.md +9 -13
- package/resource/knowledge/push/integration/uni-app.md +7 -7
- package/resource/knowledge/push/integration/unity.md +10 -13
- package/resource/knowledge/push/integration/unreal-engine.md +6 -9
- package/resource/knowledge/push/overview/prepare.md +2 -2
- package/resource/knowledge/roomkit/core-sdk/android/call-user-to-room.md +3 -3
- package/resource/knowledge/roomkit/core-sdk/android/capability-matrix.md +46 -0
- package/resource/knowledge/roomkit/core-sdk/android/room-participant-state.md +1 -1
- package/resource/knowledge/roomkit/core-sdk/android/room-state.md +2 -2
- package/resource/knowledge/roomkit/core-sdk/android/schedule-room.md +6 -6
- package/resource/knowledge/roomkit/core-sdk/android/unsupported-features.md +79 -0
- package/resource/knowledge/roomkit/core-sdk/flutter/capability-matrix.md +46 -0
- package/resource/knowledge/roomkit/core-sdk/flutter/room-participant-state.md +1 -1
- package/resource/knowledge/roomkit/core-sdk/flutter/unsupported-features.md +79 -0
- package/resource/knowledge/roomkit/core-sdk/ios/capability-matrix.md +46 -0
- package/resource/knowledge/roomkit/core-sdk/ios/room-participant-state.md +1 -1
- package/resource/knowledge/roomkit/core-sdk/ios/unsupported-features.md +79 -0
- package/resource/knowledge/roomkit/preset/android/integration.md +5 -7
- package/resource/knowledge/roomkit/preset/flutter/integration.md +2 -7
- package/resource/knowledge/roomkit/preset/ios/integration.md +3 -9
- package/resource/knowledge/roomkit/preset/react/integration.md +12 -16
- package/resource/knowledge/trtc/android/TRTCCloud.md +154 -238
- package/resource/knowledge/trtc/android/TRTCCloudDef.md +133 -134
- package/resource/knowledge/trtc/android/TRTCCloudListener.md +86 -120
- package/resource/knowledge/trtc/android/TRTCStatistics.md +10 -10
- package/resource/knowledge/trtc/android/TXAudioEffectManager.md +10 -30
- package/resource/knowledge/trtc/android/TXBeautyManager.md +25 -25
- package/resource/knowledge/trtc/android/TXDeviceManager.md +2 -2
- package/resource/knowledge/trtc/android/TXLiteAVCode.md +12 -12
- package/resource/knowledge/trtc/c++/ITRTCCloud.md +166 -261
- package/resource/knowledge/trtc/c++/ITRTCStatistics.md +12 -12
- package/resource/knowledge/trtc/c++/ITXAudioEffectManager.md +10 -30
- package/resource/knowledge/trtc/c++/ITXDeviceManager.md +9 -11
- package/resource/knowledge/trtc/c++/TRTCCloudCallback.md +96 -130
- package/resource/knowledge/trtc/c++/TRTCTypeDef.md +122 -123
- package/resource/knowledge/trtc/c++/TXLiteAVCode.md +12 -12
- package/resource/knowledge/trtc/ios/TRTCCloud.md +168 -255
- package/resource/knowledge/trtc/ios/TRTCCloudDef.md +124 -125
- package/resource/knowledge/trtc/ios/TRTCCloudDelegate.md +89 -124
- package/resource/knowledge/trtc/ios/TRTCStatistics.md +10 -10
- package/resource/knowledge/trtc/ios/TXAudioEffectManager.md +9 -28
- package/resource/knowledge/trtc/ios/TXBeautyManager.md +25 -25
- package/resource/knowledge/trtc/ios/TXDeviceManager.md +9 -11
- package/resource/knowledge/trtc/ios/TXLiteAVCode.md +12 -12
- package/server.js +21 -21
- package/tools/common/finalize_answer.js +1 -1
- package/tools/common/present_framework_choice.js +2 -2
- package/tools/common/search_trtc_knowledge.js +3 -3
- package/tools/common/submit_feedback.js +1 -1
- package/tools/definitions/get_native_live_uikit_integration_def.js +61 -0
- package/tools/definitions/get_native_livekit_core_integration_def.js +3 -3
- package/tools/definitions/present_framework_choice_def.js +2 -2
- package/tools/definitions/search_trtc_knowledge_def.js +5 -5
- package/tools/index.js +2 -0
- package/tools/live/get_native_live_uikit_integration.js +69 -0
- package/tools/live/get_native_livekit_core_integration.js +6 -6
- package/utils/report-cls-client.js +1 -1
- package/utils/report-es-client.js +1 -1
- package/resource/knowledge/callkit/preset/web/api.md +0 -83
- package/resource/knowledge/livekit/core-sdk/live/android/live-audio-effect.md +0 -226
- package/resource/knowledge/livekit/core-sdk/live/android/live-live-list.md +0 -438
- package/resource/knowledge/livekit/core-sdk/live/flutter/live-barrage.md +0 -490
- package/resource/knowledge/livekit/core-sdk/live/flutter/live-live-list.md +0 -726
- package/resource/knowledge/livekit/core-sdk/live/ios/live-audience-list.md +0 -264
- package/resource/knowledge/livekit/core-sdk/live/ios/live-audio-effect.md +0 -216
- package/resource/knowledge/livekit/core-sdk/live/ios/live-gift.md +0 -407
- package/resource/knowledge/livekit/core-sdk/live/ios/live-live-list.md +0 -349
- package/resource/knowledge/livekit/core-sdk/voice/android/voice-audience-list.md +0 -269
- package/resource/knowledge/livekit/core-sdk/voice/android/voice-barrage.md +0 -456
- package/resource/knowledge/livekit/core-sdk/voice/android/voice-gift.md +0 -455
- package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-audience-list.md +0 -260
- package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-audio-effect.md +0 -598
- package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-gift.md +0 -424
- package/resource/knowledge/livekit/core-sdk/voice/ios/voice-barrage.md +0 -408
- /package/resource/knowledge/livekit/core-sdk/{live/android/live-audience-list.md → features/android/audience-list.md} +0 -0
- /package/resource/knowledge/livekit/core-sdk/{live/android/live-barrage.md → features/android/barrage.md} +0 -0
- /package/resource/knowledge/livekit/core-sdk/{live/android/live-base-beauty.md → features/android/base-beauty.md} +0 -0
- /package/resource/knowledge/livekit/core-sdk/{live/flutter/live-audience-list.md → features/flutter/audience-list.md} +0 -0
- /package/resource/knowledge/livekit/core-sdk/{live/flutter/live-base-beauty.md → features/flutter/base-beauty.md} +0 -0
- /package/resource/knowledge/livekit/core-sdk/{live/ios/live-barrage.md → features/ios/barrage.md} +0 -0
- /package/resource/knowledge/livekit/core-sdk/voice/android/{voice-co-guest-interaction.md → co-guest-interaction.md} +0 -0
|
@@ -1,490 +0,0 @@
|
|
|
1
|
-
This guide shows how to use the `BarrageStore` module in the `AtomicXCore` framework to quickly add a robust, high-performance barrage (live chat overlay) system to your live streaming app.
|
|
2
|
-
|
|
3
|
-
## Core Features
|
|
4
|
-
|
|
5
|
-
`BarrageStore` delivers a complete live comment solution for live streaming apps. Key features include:
|
|
6
|
-
- Receiving and displaying live comments in the live room.
|
|
7
|
-
|
|
8
|
-
- Sending live comments to engage with your audience.
|
|
9
|
-
|
|
10
|
-
- Sending custom live comments to support advanced scenarios such as gifts, likes, and more.
|
|
11
|
-
|
|
12
|
-
- Inserting system tips into the local message list (e.g., "Welcome to the live room").
|
|
13
|
-
|
|
14
|
-
## Core Concepts
|
|
15
|
-
|
|
16
|
-
|**Core Concept**|**Type**|**Core Responsibility and Description**|
|
|
17
|
-
|---------|---------|---------|
|
|
18
|
-
|[Barrage](https://tencent-rtc.github.io/TUIKit_Flutter/api_barrage_barrage_store/Barrage-class.html)|`class`|Represents a data model for a live comments. It contains all key information such as sender information (`sender`), message content (`textContent` or `data`), and message type (`messageType`).|
|
|
19
|
-
|[BarrageState](https://tencent-rtc.github.io/TUIKit_Flutter/api_barrage_barrage_store/BarrageState-class.html)|`class`|Represents the current status of the live comment module. Its core attribute `messageList` is a `ValueListenable<List<Barrage>>`, storing all live comments in the live streaming room in chronological order, serving as the data source for UI rendering.|
|
|
20
|
-
|[BarrageStore](https://tencent-rtc.github.io/TUIKit_Flutter/api_barrage_barrage_store/BarrageStore-class.html)|`class`|The central manager for live comments. Use it to send messages (`sendTextMessage`, `sendCustomMessage`) and listen to its `barrageState.messageList` property to receive and track all live comments updates.|
|
|
21
|
-
|
|
22
|
-
## Implementation Steps
|
|
23
|
-
|
|
24
|
-
### Step 1: Integrate the Component
|
|
25
|
-
- **Live streaming**: Refer to quick integration for seamless integration with **AtomicXCore** and service access.
|
|
26
|
-
|
|
27
|
-
- **Voice chat room**: Refer to quick integration for seamless integration with **AtomicXCore** and service access.
|
|
28
|
-
|
|
29
|
-
Return to the current project after integration.
|
|
30
|
-
|
|
31
|
-
### Step 2: Initialize and Listen for Live Comment Updates
|
|
32
|
-
|
|
33
|
-
Create a `BarrageStore` instance bound to the current live room's `liveId`, and set up a listener to receive real-time updates of the complete live comment list.
|
|
34
|
-
``` java
|
|
35
|
-
import 'package:flutter/foundation.dart';
|
|
36
|
-
import 'package:atomic_x_core/atomicxcore.dart';
|
|
37
|
-
|
|
38
|
-
class BarrageManager {
|
|
39
|
-
final String liveId;
|
|
40
|
-
late final BarrageStore barrageStore;
|
|
41
|
-
late final VoidCallback _messageListChangedListener = _onMessageListChanged;
|
|
42
|
-
|
|
43
|
-
// Expose message list change notification to the public
|
|
44
|
-
final ValueNotifier<List<Barrage>> messagesNotifier =
|
|
45
|
-
ValueNotifier<List<Barrage>>([]);
|
|
46
|
-
|
|
47
|
-
BarrageManager({required this.liveId}) {
|
|
48
|
-
// 1. Get the singleton of BarrageStore by liveId (location parameter)
|
|
49
|
-
barrageStore = BarrageStore.create(liveId);
|
|
50
|
-
|
|
51
|
-
// 2. Start listening to the bullet screen immediately after initialization
|
|
52
|
-
_subscribeToBarrageUpdates();
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
void _subscribeToBarrageUpdates() {
|
|
56
|
-
// 3. Use ValueListenable's addListener to listen for messages list adjustment
|
|
57
|
-
barrageStore.barrageState.messageList.addListener(_messageListChangedListener);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
void _onMessageListChanged() {
|
|
61
|
-
// 4. When the messageList is updating, get the new list and notify the UI layer
|
|
62
|
-
// Key point: The complete list obtained here contains ALL historical messages
|
|
63
|
-
messagesNotifier.value = barrageStore.barrageState.messageList.value;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
void dispose() {
|
|
67
|
-
barrageStore.barrageState.messageList.removeListener(_messageListChangedListener);
|
|
68
|
-
messagesNotifier.dispose();
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
### Step 3: Send a Live Comment
|
|
74
|
-
|
|
75
|
-
Call the `sendTextMessage` method to broadcast a live comment to all users in the live streaming room.
|
|
76
|
-
``` java
|
|
77
|
-
extension BarrageManagerSend on BarrageManager {
|
|
78
|
-
Send a text bullet screen
|
|
79
|
-
Future<void> sendTextMessage(String text) async {
|
|
80
|
-
// Recommendation: Add non-null verification to avoid sending invalid messages.
|
|
81
|
-
if (text.isEmpty) {
|
|
82
|
-
debugPrint("Bullet screen content cannot be empty");
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
// Call this API to send a message
|
|
87
|
-
final result = await barrageStore.sendTextMessage(
|
|
88
|
-
text: text,
|
|
89
|
-
extensionInfo: null,
|
|
90
|
-
);
|
|
91
|
-
|
|
92
|
-
// Use isSuccess to check the result
|
|
93
|
-
if (result.isSuccess) {
|
|
94
|
-
debugPrint("Bullet screen text '$text' sent successfully");
|
|
95
|
-
} else {
|
|
96
|
-
debugPrint("Bullet screen text sending failure: ${result.errorMessage}");
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
**API parameters:**
|
|
103
|
-
|
|
104
|
-
|**Parameter**|**Type**|**Description**|
|
|
105
|
-
|---------|---------|---------|
|
|
106
|
-
|`text`|`String`|The text content to be sent.|
|
|
107
|
-
|`extensionInfo`|`Map<String, String>?`|Additional extension info.|
|
|
108
|
-
|
|
109
|
-
### Step 4: Send Custom Live Comments
|
|
110
|
-
|
|
111
|
-
Send messages containing custom business data, such as gifts or likes. These messages are invisible to other clients and must be parsed by your business logic.
|
|
112
|
-
``` java
|
|
113
|
-
import 'dart:convert';
|
|
114
|
-
|
|
115
|
-
extension BarrageManagerCustom on BarrageManager {
|
|
116
|
-
/// Send a custom barrage item, for example for sending a gift
|
|
117
|
-
Future<void> sendGiftMessage({
|
|
118
|
-
required String giftId,
|
|
119
|
-
required int giftCount,
|
|
120
|
-
}) async {
|
|
121
|
-
// 1. Define a business ID
|
|
122
|
-
const businessID = "live_gift";
|
|
123
|
-
|
|
124
|
-
// 2. Encode business data as a JSON string
|
|
125
|
-
final giftData = {"gift_id": giftId, "gift_count": giftCount};
|
|
126
|
-
final jsonString = jsonEncode(giftData);
|
|
127
|
-
|
|
128
|
-
// 3. Call this API to send custom messages
|
|
129
|
-
final result = await barrageStore.sendCustomMessage(
|
|
130
|
-
businessID: businessID,
|
|
131
|
-
data: jsonString,
|
|
132
|
-
);
|
|
133
|
-
|
|
134
|
-
if (result.isSuccess) {
|
|
135
|
-
debugPrint("Gift message (custom barrage item) sent successfully");
|
|
136
|
-
} else {
|
|
137
|
-
debugPrint("Gift message send fail: ${result.errorMessage}");
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
**API parameters:**
|
|
144
|
-
|
|
145
|
-
|**Parameter**|**Type**|**Description**|
|
|
146
|
-
|---------|---------|---------|
|
|
147
|
-
|`businessID`|`String`|Unique business identifier (e.g., "live_gift") to distinguish custom messages.|
|
|
148
|
-
|`data`|`String`|Business data, typically a JSON-formatted string.|
|
|
149
|
-
|
|
150
|
-
### Step 5: Insert Local Tip Messages
|
|
151
|
-
|
|
152
|
-
Insert a local message into the current user's message list. This message will not be sent to other users in the live streaming room. It is suitable for displaying system welcome, warning or operation prompt information.
|
|
153
|
-
``` java
|
|
154
|
-
extension BarrageManagerLocal on BarrageManager {
|
|
155
|
-
Insert a welcome notification into the local message list
|
|
156
|
-
void showWelcomeMessage(LiveUserInfo user) {
|
|
157
|
-
// 1. Create a Barrage message (using named parameters construct function)
|
|
158
|
-
final welcomeTip = Barrage(
|
|
159
|
-
messageType: BarrageType.text,
|
|
160
|
-
Welcome ${user.userName} to the live room.
|
|
161
|
-
);
|
|
162
|
-
|
|
163
|
-
// 2. Call this API to insert it into the local list
|
|
164
|
-
barrageStore.appendLocalTip(welcomeTip);
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
### Step 6: Manage User Messaging Permissions (Mute & Unmute)
|
|
170
|
-
|
|
171
|
-
As an Anchor or admin, you can manage the user speaking permission in the live streaming room to maintain a healthy communication environment.
|
|
172
|
-
|
|
173
|
-
#### Mute or Unmute Individual Users
|
|
174
|
-
|
|
175
|
-
Mute or unblock designated users can be achieved by the `disableSendMessage` API in `LiveAudienceStore`.
|
|
176
|
-
``` java
|
|
177
|
-
// 1. Get the LiveAudienceStore instance bound to the current live streaming room (location parameter)
|
|
178
|
-
final liveId = "your_live_id";
|
|
179
|
-
final audienceStore = LiveAudienceStore.create(liveId);
|
|
180
|
-
|
|
181
|
-
// 2. Define the operating user ID and mute status
|
|
182
|
-
final userIdToMute = "user_id_to_be_muted";
|
|
183
|
-
final shouldDisable = true; // true for mute, false for unblock
|
|
184
|
-
|
|
185
|
-
// 3. Call API to perform operation
|
|
186
|
-
final result = await audienceStore.disableSendMessage(
|
|
187
|
-
userID: userIdToMute,
|
|
188
|
-
isDisable: shouldDisable,
|
|
189
|
-
);
|
|
190
|
-
|
|
191
|
-
if (result.isSuccess) {
|
|
192
|
-
debugPrint("${shouldDisable ? "mute" : "unblock"} user $userIdToMute successfully");
|
|
193
|
-
} else {
|
|
194
|
-
debugPrint("Operation failure: ${result.errorMessage}");
|
|
195
|
-
}
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
#### Enable/Disable Global Mute
|
|
199
|
-
|
|
200
|
-
To mute all users in the live room (typically excluding the host), update the live room info via `LiveListStore`.
|
|
201
|
-
``` java
|
|
202
|
-
// 1. Get the LiveListStore singleton
|
|
203
|
-
final liveListStore = LiveListStore.shared;
|
|
204
|
-
|
|
205
|
-
// 2. Get the current live room information, create a new LiveInfo object, and modify the global mute status
|
|
206
|
-
final currentLiveInfo = liveListStore.liveState.currentLive.value;
|
|
207
|
-
final updatedLiveInfo = LiveInfo(
|
|
208
|
-
liveID: currentLiveInfo.liveID,
|
|
209
|
-
liveName: currentLiveInfo.liveName,
|
|
210
|
-
isMessageDisable: true, // true for mute all, false for shutdown
|
|
211
|
-
);
|
|
212
|
-
|
|
213
|
-
// 3. Call the update API and specify the modify flags list
|
|
214
|
-
final result = await liveListStore.updateLiveInfo(
|
|
215
|
-
liveInfo: updatedLiveInfo,
|
|
216
|
-
modifyFlagList: [ModifyFlag.isMessageDisable],
|
|
217
|
-
);
|
|
218
|
-
|
|
219
|
-
if (result.isSuccess) {
|
|
220
|
-
debugPrint("Global mute status updated successfully");
|
|
221
|
-
} else {
|
|
222
|
-
debugPrint("Operation failure: ${result.errorMessage}");
|
|
223
|
-
}
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
## Complete UI Example
|
|
227
|
-
``` java
|
|
228
|
-
import 'package:flutter/material.dart';
|
|
229
|
-
import 'package:atomic_x_core/atomicxcore.dart';
|
|
230
|
-
|
|
231
|
-
class BarrageWidget extends StatefulWidget {
|
|
232
|
-
final String liveId;
|
|
233
|
-
|
|
234
|
-
const BarrageWidget({Key? key, required this.liveId}) : super(key: key);
|
|
235
|
-
|
|
236
|
-
@override
|
|
237
|
-
State<BarrageWidget> createState() => _BarrageWidgetState();
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
class _BarrageWidgetState extends State<BarrageWidget> {
|
|
241
|
-
late BarrageManager _barrageManager;
|
|
242
|
-
final TextEditingController _inputController = TextEditingController();
|
|
243
|
-
final ScrollController _scrollController = ScrollController();
|
|
244
|
-
|
|
245
|
-
@override
|
|
246
|
-
void initState() {
|
|
247
|
-
super.initState();
|
|
248
|
-
_barrageManager = BarrageManager(liveId: widget.liveId);
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
void _scrollToBottom() {
|
|
252
|
-
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
253
|
-
if (_scrollController.hasClients) {
|
|
254
|
-
_scrollController.animateTo(
|
|
255
|
-
_scrollController.position.maxScrollExtent,
|
|
256
|
-
duration: const Duration(milliseconds: 200),
|
|
257
|
-
curve: Curves.easeOut,
|
|
258
|
-
);
|
|
259
|
-
}
|
|
260
|
-
});
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
@override
|
|
264
|
-
void dispose() {
|
|
265
|
-
_barrageManager.dispose();
|
|
266
|
-
_inputController.dispose();
|
|
267
|
-
_scrollController.dispose();
|
|
268
|
-
super.dispose();
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
@override
|
|
272
|
-
Widget build(BuildContext context) {
|
|
273
|
-
return Column(
|
|
274
|
-
children: [
|
|
275
|
-
// Bullet screen list
|
|
276
|
-
Expanded(
|
|
277
|
-
child: ValueListenableBuilder<List<Barrage>>(
|
|
278
|
-
valueListenable: _barrageManager.messagesNotifier,
|
|
279
|
-
builder: (context, messageList, child) {
|
|
280
|
-
// Scroll to the bottom
|
|
281
|
-
_scrollToBottom();
|
|
282
|
-
return ListView.builder(
|
|
283
|
-
controller: _scrollController,
|
|
284
|
-
itemCount: messageList.length,
|
|
285
|
-
itemBuilder: (context, index) {
|
|
286
|
-
final barrage = messageList[index];
|
|
287
|
-
return _buildBarrageItem(barrage);
|
|
288
|
-
},
|
|
289
|
-
);
|
|
290
|
-
},
|
|
291
|
-
),
|
|
292
|
-
),
|
|
293
|
-
// input box
|
|
294
|
-
_buildInputBar(),
|
|
295
|
-
],
|
|
296
|
-
);
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
Widget _buildBarrageItem(Barrage barrage) {
|
|
300
|
-
return Container(
|
|
301
|
-
margin: const EdgeInsets.symmetric(vertical: 4, horizontal: 8),
|
|
302
|
-
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
|
|
303
|
-
decoration: BoxDecoration(
|
|
304
|
-
color: Colors.black54,
|
|
305
|
-
borderRadius: BorderRadius.circular(16),
|
|
306
|
-
),
|
|
307
|
-
child: RichText(
|
|
308
|
-
text: TextSpan(
|
|
309
|
-
children: [
|
|
310
|
-
TextSpan(
|
|
311
|
-
text: '${barrage.sender.userName}: ',
|
|
312
|
-
style: const TextStyle(
|
|
313
|
-
color: Colors.yellow,
|
|
314
|
-
fontSize: 14,
|
|
315
|
-
fontWeight: FontWeight.bold,
|
|
316
|
-
),
|
|
317
|
-
),
|
|
318
|
-
TextSpan(
|
|
319
|
-
text: barrage.textContent,
|
|
320
|
-
style: const TextStyle(color: Colors.white, fontSize: 14),
|
|
321
|
-
),
|
|
322
|
-
],
|
|
323
|
-
),
|
|
324
|
-
),
|
|
325
|
-
);
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
Widget _buildInputBar() {
|
|
329
|
-
return Container(
|
|
330
|
-
padding: const EdgeInsets.all(8),
|
|
331
|
-
color: Colors.white,
|
|
332
|
-
child: Row(
|
|
333
|
-
children: [
|
|
334
|
-
Expanded(
|
|
335
|
-
child: TextField(
|
|
336
|
-
controller: _inputController,
|
|
337
|
-
decoration: const InputDecoration(
|
|
338
|
-
hintText: 'Say something...',
|
|
339
|
-
border: OutlineInputBorder(),
|
|
340
|
-
contentPadding: EdgeInsets.symmetric(horizontal: 12),
|
|
341
|
-
),
|
|
342
|
-
onSubmitted: (_) => _sendMessage(),
|
|
343
|
-
),
|
|
344
|
-
),
|
|
345
|
-
const SizedBox(width: 8),
|
|
346
|
-
ElevatedButton(
|
|
347
|
-
onPressed: _sendMessage,
|
|
348
|
-
child: const Text('Send')
|
|
349
|
-
),
|
|
350
|
-
],
|
|
351
|
-
),
|
|
352
|
-
);
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
void _sendMessage() {
|
|
356
|
-
final text = _inputController.text.trim();
|
|
357
|
-
if (text.isNotEmpty) {
|
|
358
|
-
_barrageManager.sendTextMessage(text);
|
|
359
|
-
_inputController.clear();
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
```
|
|
364
|
-
|
|
365
|
-
## Advanced Usage: Performance Optimization for High-Concurrency
|
|
366
|
-
|
|
367
|
-
After integrating the live comment feature with `BarrageStore`, you may need to handle more demanding scenarios to ensure a smooth and stable user experience, especially during high-concurrency live streams. The following use cases provide practical optimization strategies and code samples.
|
|
368
|
-
|
|
369
|
-
### Scenario 1: Handle High-Concurrency Live Comments
|
|
370
|
-
|
|
371
|
-
During major events, a large number of viewers may join the live room, causing live comments to refresh dozens of times per second.
|
|
372
|
-
|
|
373
|
-
#### **Technical Challenge**
|
|
374
|
-
|
|
375
|
-
The SDK pushes the complete the live comment list at high frequency. If the UI rebuilds on every update, the main thread can become overloaded with layout and rendering, resulting in lag.
|
|
376
|
-
|
|
377
|
-
#### **O**ptimization Strategy: Batch Processing and Debouncing
|
|
378
|
-
|
|
379
|
-
Instead of responding to every update, set a time threshold (e.g., 300ms). Only refresh the UI if enough time has passed since the last update. This reduces UI redraws from dozens per second to just a few, greatly improving smoothness.
|
|
380
|
-
``` java
|
|
381
|
-
class BarrageUIManager {
|
|
382
|
-
List<Barrage>? _latestMessageList;
|
|
383
|
-
Timer? _refreshTimer;
|
|
384
|
-
final void Function(List<Barrage>) onUpdate;
|
|
385
|
-
|
|
386
|
-
BarrageUIManager({required this.onUpdate}) {
|
|
387
|
-
// Check whether need to refresh every 0.3 seconds
|
|
388
|
-
_refreshTimer = Timer.periodic(
|
|
389
|
-
const Duration(milliseconds: 300),
|
|
390
|
-
(_) => _refreshUIIfNeeded(),
|
|
391
|
-
);
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
/// This method is frequently invoked externally with the latest full list
|
|
395
|
-
void update(List<Barrage> fullList) {
|
|
396
|
-
_latestMessageList = fullList;
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
void _refreshUIIfNeeded() {
|
|
400
|
-
// Check whether there is new data pending refresh
|
|
401
|
-
final newList = _latestMessageList;
|
|
402
|
-
if (newList == null) return;
|
|
403
|
-
|
|
404
|
-
_latestMessageList = null; // Clear flags to avoid repeated refresh
|
|
405
|
-
|
|
406
|
-
// Update data source and refresh UI
|
|
407
|
-
onUpdate(newList);
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
void dispose() {
|
|
411
|
-
_refreshTimer?.cancel();
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
```
|
|
415
|
-
|
|
416
|
-
### Scenario 2: Maintain Memory Stability for Long Streams
|
|
417
|
-
|
|
418
|
-
Your app may need to support hours-long or even all-day continuous live streaming, such as gaming or slow live streams. The app must remain stable and avoid crashes due to long-term operation.
|
|
419
|
-
|
|
420
|
-
#### Technical Challenge
|
|
421
|
-
|
|
422
|
-
The SDK's `messageList` grows indefinitely during long streams. Even with throttled UI updates, the underlying data array can consume excessive memory, eventually leading to crash
|
|
423
|
-
|
|
424
|
-
#### **O**ptimization Strategy: Fixed-Size Circular Buffer
|
|
425
|
-
|
|
426
|
-
**Limit the number of messages your data source retains**. Regardless of the SDK's full list size, only display the latest messages in your app.
|
|
427
|
-
``` java
|
|
428
|
-
void _refreshUIIfNeeded() {
|
|
429
|
-
final fullList = _latestMessageList;
|
|
430
|
-
if (fullList == null) return;
|
|
431
|
-
|
|
432
|
-
_latestMessageList = null;
|
|
433
|
-
|
|
434
|
-
// Key point: Take the latest N messages
|
|
435
|
-
const capacity = 500; // The client keeps the latest 500 messages only
|
|
436
|
-
final cappedList = fullList.length > capacity
|
|
437
|
-
? fullList.sublist(fullList.length - capacity)
|
|
438
|
-
: fullList;
|
|
439
|
-
|
|
440
|
-
onUpdate(cappedList);
|
|
441
|
-
}
|
|
442
|
-
```
|
|
443
|
-
|
|
444
|
-
## API Documentation
|
|
445
|
-
|
|
446
|
-
For detailed information about ALL public interfaces, attributes, and methods of [BarrageStore](https://tencent-rtc.github.io/TUIKit_Flutter/api_barrage_barrage_store/BarrageStore-class.html) and its related classes, see the official API documentation included with the [AtomicXCore](https://tencent-rtc.github.io/TUIKit_Flutter/index.html) framework.
|
|
447
|
-
|
|
448
|
-
## FAQs
|
|
449
|
-
|
|
450
|
-
### How can I implement colored live comments, gifts, or other custom styles?
|
|
451
|
-
|
|
452
|
-
Use custom messages with `sendCustomMessage`. `BarrageStore` gives you full flexibility for business-specific live comments.
|
|
453
|
-
1. **Define data structure:** Work with your client and server team to define the JSON structure of custom messages. For example, a color bullet screen can be defined as follows:
|
|
454
|
-
|
|
455
|
-
``` json
|
|
456
|
-
{ "type": "colored_text", "text": "This is a color bullet screen!", "color": "#FF5733" }
|
|
457
|
-
```
|
|
458
|
-
2. **Sender:** During sending, convert this JSON structure to a string and send it via the `data` parameter of `sendCustomMessage`. `businessId` can be set to a unique identifier representing your business, such as "`barrage_style_v1`".
|
|
459
|
-
|
|
460
|
-
3. **Receiver**: After receiving the live comments, check whether its `messageType` is `.custom` and whether `businessId` matches. If matched, parse the `data` string (usually parsing JSON), and render your custom UI style based on the parsed data (such as `color, text`).
|
|
461
|
-
|
|
462
|
-
### If I call BarrageStore.create("some_id") in different classes or files, will this create multiple instances?
|
|
463
|
-
|
|
464
|
-
No. The internal logic of `AtomicXCore` ensures that as long as you use the same liveId, you always get the same `BarrageStore` instance for that live room. You don't need to manage the singleton yourself.
|
|
465
|
-
|
|
466
|
-
### Why can't I see my sent message in the message list after calling sendTextMessage?
|
|
467
|
-
|
|
468
|
-
**Troubleshooting**:
|
|
469
|
-
1. **Check the result**: The sendTextMessage method provides a completion callback. Check if the result is success or failure. If it failed, the error message will indicate the reason (e.g., "You have been muted", "Network error", etc.).
|
|
470
|
-
|
|
471
|
-
2. **Confirm subscription timing**: Make sure you subscribe to barrageStore.state after the live room for the corresponding liveId has started. If you start listening before joining the live room, you may miss some messages.
|
|
472
|
-
|
|
473
|
-
3. **Check liveId**: Ensure the liveId used when creating the BarrageStore instance, joining the live room, and sending messages is exactly the same (case-sensitive).
|
|
474
|
-
|
|
475
|
-
4. **Network issues**: Make sure the device has a working network connection. Message sending depends on network connectivity.
|
|
476
|
-
|
|
477
|
-
### How can new viewers see barrage messages sent before they joined the live room?
|
|
478
|
-
|
|
479
|
-
`AtomicXCore` supports pulling history live comments, but this requires you to perform one simple configuration in the **server console**. Once configured, the SDK will automatically handle everything subsequently with no need to write additional code.
|
|
480
|
-
|
|
481
|
-
#### **Step 1: **Configure in the Live Console
|
|
482
|
-
1. Log in to the [**console > Live > Configuration**](https://console.trtc.io/live/configuration), and select the target application at the **top**.
|
|
483
|
-
|
|
484
|
-
2. On the Live configuration page, select **new member pull historical messages**, modify **new member viewable latest message count**, supports a maximum of **50**.
|
|
485
|
-
|
|
486
|
-
**Step 2: Client Seamless Retrieval**
|
|
487
|
-
|
|
488
|
-
After this configuration, no client code changes are needed.
|
|
489
|
-
|
|
490
|
-
When a new user joins the live room, `AtomicXCore` automatically retrieves the configured number of historical messages at the SDK level. These messages are delivered to your UI via the same `v` subscription you already use. Your app will receive and display these historical barrages just like real-time messages.
|