@tencent-rtc/mcp 1.3.9 → 1.4.1
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/package.json +2 -2
- package/resource/doc/{tuicallkit/iOS/faq.md → callkit/faq/android-faq.md} +10 -22
- package/resource/doc/{tuicallkit/android/faq.md → callkit/faq/flutter-faq.md} +10 -22
- package/resource/doc/{tuicallkit/flutter/faq.md → callkit/faq/ios-faq.md} +10 -22
- package/resource/doc/callkit/preset/android/api.md +296 -0
- package/resource/doc/{tuicallkit → callkit/preset}/android/integration.md +53 -365
- package/resource/doc/callkit/preset/flutter/api.md +410 -0
- package/resource/doc/{tuicallkit → callkit/preset}/flutter/integration.md +35 -97
- package/resource/doc/callkit/preset/ios/api.md +80 -0
- package/resource/doc/{tuicallkit/iOS → callkit/preset/ios}/integration.md +37 -118
- package/resource/doc/callkit/preset/react/api.md +501 -0
- package/resource/doc/{tuicallkit → callkit/preset}/react/integration.md +5 -20
- package/resource/doc/callkit/preset/vue/api.md +501 -0
- package/resource/doc/{tuicallkit → callkit/preset}/vue/integration.md +4 -19
- package/resource/doc/{chatuikit → chatkit}/android/faq.md +29 -38
- package/resource/doc/{chatuikit → chatkit}/android/features/theme.md +22 -166
- package/resource/doc/{chatuikit → chatkit}/android/integration.md +28 -121
- package/resource/doc/chatkit/faq/android_sdk/client-api.md +281 -0
- package/resource/doc/{chatuikit → chatkit}/faq/common/product.md +0 -1
- package/resource/doc/{chatuikit → chatkit}/faq/common/server.md +1 -1
- package/resource/doc/chatkit/faq/flutter_sdk/client-api.md +199 -0
- package/resource/doc/{chatuikit → chatkit}/faq/flutter_sdk/faq.md +3 -3
- package/resource/doc/chatkit/faq/ios_sdk/client-api.md +235 -0
- package/resource/doc/{chatuikit → chatkit}/faq/web_sdk/faq.md +3 -3
- package/resource/doc/{chatuikit → chatkit}/flutter/features/theme.md +22 -166
- package/resource/doc/{chatuikit → chatkit}/flutter/integration.md +18 -87
- package/resource/doc/{chatuikit/iOS → chatkit/ios}/faq.md +29 -38
- package/resource/doc/{chatuikit/iOS → chatkit/ios}/features/theme.md +27 -176
- package/resource/doc/{chatuikit/iOS → chatkit/ios}/integration.md +47 -165
- package/resource/doc/{chatuikit → chatkit}/react/components/avatar.md +0 -33
- package/resource/doc/{chatuikit → chatkit}/react/components/chat-header.md +8 -49
- package/resource/doc/{chatuikit → chatkit}/react/components/chat-setting.md +6 -35
- package/resource/doc/{chatuikit → chatkit}/react/components/chat.md +0 -6
- package/resource/doc/{chatuikit → chatkit}/react/components/component-list.md +0 -11
- package/resource/doc/{chatuikit → chatkit}/react/components/contact-list.md +96 -502
- package/resource/doc/chatkit/react/components/conversation-actions.md +174 -0
- package/resource/doc/chatkit/react/components/conversation-list.md +333 -0
- package/resource/doc/chatkit/react/components/conversation-preview.md +118 -0
- package/resource/doc/chatkit/react/components/conversation-search.md +60 -0
- package/resource/doc/{chatuikit → chatkit}/react/components/message-input.md +36 -337
- package/resource/doc/{chatuikit → chatkit}/react/components/message-list.md +20 -212
- package/resource/doc/chatkit/react/components/search.md +243 -0
- package/resource/doc/{chatuikit → chatkit}/react/components/tuikit.md +1 -47
- package/resource/doc/{chatuikit → chatkit}/react/integration.md +21 -81
- package/resource/doc/{chatuikit → chatkit}/vue/components/avatar.md +0 -33
- package/resource/doc/{chatuikit → chatkit}/vue/components/chat-header.md +7 -48
- package/resource/doc/{chatuikit → chatkit}/vue/components/chat-setting.md +3 -5
- package/resource/doc/{chatuikit → chatkit}/vue/components/chat.md +0 -5
- package/resource/doc/{chatuikit → chatkit}/vue/components/component-list.md +0 -15
- package/resource/doc/chatkit/vue/components/contact-list.md +271 -0
- package/resource/doc/chatkit/vue/components/conversation-actions.md +228 -0
- package/resource/doc/{chatuikit → chatkit}/vue/components/conversation-list.md +42 -492
- package/resource/doc/chatkit/vue/components/conversation-preview.md +213 -0
- package/resource/doc/chatkit/vue/components/conversation-search.md +50 -0
- package/resource/doc/{chatuikit → chatkit}/vue/components/message-input.md +2 -223
- package/resource/doc/{chatuikit → chatkit}/vue/components/message-list.md +23 -252
- package/resource/doc/{chatuikit → chatkit}/vue/components/search.md +73 -640
- package/resource/doc/{chatuikit → chatkit}/vue/components/tuikit.md +7 -21
- package/resource/doc/{chatuikit → chatkit}/vue/components/userpicker.md +3 -62
- package/resource/doc/{chatuikit → chatkit}/vue/faq.md +1 -1
- package/resource/doc/{chatuikit → chatkit}/vue/integration.md +22 -23
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-audience-list.md +18 -89
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-audio-effect.md +34 -192
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-barrage.md +28 -141
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-base-beauty.md +20 -112
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-co-guest-interaction.md +59 -193
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-gift.md +75 -455
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-host-interaction.md +94 -344
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-integration.md +107 -515
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-live-list.md +33 -173
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-audience-list.md +14 -93
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-audio-effect.md +34 -179
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-barrage.md +19 -107
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-base-beauty.md +24 -166
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-co-guest-interaction.md +56 -163
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-gift.md +69 -443
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-host-interaction.md +117 -364
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-integration.md +107 -492
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-live-list.md +23 -165
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-audience-list.md +35 -111
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-audio-effect.md +35 -193
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-barrage.md +31 -144
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-base-beauty.md +24 -116
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-co-guest-interaction.md +37 -171
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-gift.md +79 -459
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-host-interaction.md +69 -320
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-integration.md +85 -502
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-live-list.md +32 -169
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-audience-list.md +18 -89
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-audio-effect.md +34 -192
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-barrage.md +28 -141
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-co-guest-interaction.md +50 -259
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-gift.md +75 -455
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-host-interaction.md +51 -265
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-integration.md +61 -427
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-room-list.md +33 -173
- package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-co-guest-interaction.md +44 -203
- package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-integration.md +56 -416
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-audience-list.md +35 -111
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-audio-effect.md +35 -193
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-barrage.md +31 -144
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-co-guest-interaction.md +43 -252
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-gift.md +79 -459
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-host-interaction.md +46 -264
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-integration.md +61 -445
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-room-list.md +32 -169
- package/resource/doc/livekit/faq/common/{error_code.md → error-code.md} +2 -2
- package/resource/doc/livekit/preset/live/vue/api-reference/index.md +780 -0
- package/resource/doc/livekit/preset/live/vue/components/barrage.md +291 -0
- package/resource/doc/livekit/{live → preset/live}/vue/components/co-guest-panel.md +10 -49
- package/resource/doc/livekit/{live → preset/live}/vue/components/live-audience-list.md +26 -144
- package/resource/doc/livekit/{live → preset/live}/vue/components/live-scene-panel.md +12 -75
- package/resource/doc/livekit/{live → preset/live}/vue/components/live-view.md +36 -227
- package/resource/doc/livekit/preset/live/vue/components/stream-mixer.md +215 -0
- package/resource/doc/livekit/preset/live/vue/faq.md +1 -0
- package/resource/doc/livekit/preset/live/vue/live-list-integration.md +241 -0
- package/resource/doc/livekit/preset/live/vue/live-player-desk-integration.md +299 -0
- package/resource/doc/livekit/preset/live/vue/live-player-h5-integration.md +300 -0
- package/resource/doc/livekit/preset/live/vue/live-pusher-integration.md +743 -0
- package/resource/doc/roomkit/vue/faq.md +1 -0
- package/resource/doc/roomkit/vue/features/call-user-to-room.md +17 -53
- package/resource/doc/roomkit/vue/features/device-detection.md +30 -48
- package/resource/doc/roomkit/vue/features/device-state.md +24 -44
- package/resource/doc/roomkit/vue/features/free-beauty-panel.md +13 -36
- package/resource/doc/roomkit/vue/features/room-chat.md +31 -89
- package/resource/doc/roomkit/vue/features/room-participant-state.md +28 -50
- package/resource/doc/roomkit/vue/features/room-state.md +25 -34
- package/resource/doc/roomkit/vue/features/room-view.md +30 -125
- package/resource/doc/roomkit/vue/features/schedule-room.md +9 -40
- package/resource/doc/roomkit/vue/features/screen-share.md +22 -90
- package/resource/doc/roomkit/vue/features/virtual-background.md +13 -29
- package/resource/doc/roomkit/vue/integration.md +21 -76
- package/resource/doc/rtcengine/faq/common/error_code.md +1 -0
- package/resource/doc/rtcengine/faq/web/web.md +14 -24
- package/resource/doc/rtcengine/web/api.md +1 -3
- package/resource/doc/rtcengine/web/how_to_integrated_web_sdk.md +3 -10
- package/resource/doc/rtcengine/web/how_to_run_web_sdk_demo.md +1 -5
- package/resource/doc/rtcengine/web/plugin/20-advanced-customized-capture-rendering.md +1 -2
- package/resource/doc/rtcengine/web/plugin/21-advanced-auto-play-policy.md +2 -4
- package/resource/doc/rtcengine/web/plugin/23-advanced-support-detection.md +3 -5
- package/resource/doc/rtcengine/web/plugin/24-advanced-network-quality.md +1 -7
- package/resource/doc/rtcengine/web/plugin/25-advanced-device-change.md +0 -2
- package/resource/doc/rtcengine/web/plugin/26-advanced-publish-cdn-stream.md +4 -8
- package/resource/doc/rtcengine/web/plugin/27-advanced-small-stream.md +11 -11
- package/resource/doc/rtcengine/web/plugin/28-advanced-beauty.md +12 -88
- package/resource/doc/rtcengine/web/plugin/31-advanced-plugins-overview.md +5 -5
- package/resource/doc/rtcengine/web/plugin/34-advanced-proxy.md +30 -37
- package/resource/doc/rtcengine/web/plugin/36-advanced-virtual-background.md +13 -90
- package/resource/doc/rtcengine/web/plugin/37-advanced-voice-changer.md +1 -2
- package/resource/doc/rtcengine/web/plugin/39-advanced-video-decoder.md +1 -2
- package/resource/doc/rtcengine/web/plugin/40-advanced-video-mixer.md +19 -19
- package/resource/doc/rtcengine/web/plugin/41-advanced-small-stream-auto-switcher.md +1 -1
- package/resource/doc/rtcengine/web/plugin/42-advanced-realtime-transcriber.md +4 -5
- package/resource/doc/rtcengine/web/plugin/43-advanced-face-detection.md +3 -3
- package/resource/doc/trtc/C++/ITRTCCloud.md +686 -2835
- package/resource/doc/trtc/C++/ITRTCStatistics.md +53 -308
- package/resource/doc/trtc/C++/ITXAudioEffectManager.md +202 -1022
- package/resource/doc/trtc/C++/ITXDeviceManager.md +126 -767
- package/resource/doc/trtc/C++/TRTCCloudCallback.md +579 -2147
- package/resource/doc/trtc/C++/TRTCTypeDef.md +703 -3378
- package/resource/doc/trtc/C++/TXLiteAVCode.md +116 -908
- package/resource/doc/trtc/android/TRTCCloud.md +606 -2573
- package/resource/doc/trtc/android/TRTCCloudDef.md +752 -3640
- package/resource/doc/trtc/android/TRTCCloudListener.md +581 -2008
- package/resource/doc/trtc/android/TRTCStatistics.md +48 -278
- package/resource/doc/trtc/android/TXAudioEffectManager.md +202 -1022
- package/resource/doc/trtc/android/TXBeautyManager.md +127 -704
- package/resource/doc/trtc/android/TXDeviceManager.md +51 -318
- package/resource/doc/trtc/android/TXLiteAVCode.md +114 -892
- package/resource/doc/trtc/iOS/TRTCCloud.md +694 -2904
- package/resource/doc/trtc/iOS/TRTCCloudDef.md +726 -3498
- package/resource/doc/trtc/iOS/TRTCCloudDelegate.md +543 -2028
- package/resource/doc/trtc/iOS/TRTCStatistics.md +48 -278
- package/resource/doc/trtc/iOS/TXAudioEffectManager.md +174 -877
- package/resource/doc/trtc/iOS/TXBeautyManager.md +128 -710
- package/resource/doc/trtc/iOS/TXDeviceManager.md +129 -772
- package/resource/doc/trtc/iOS/TXLiteAVCode.md +117 -915
- package/server.js +1 -5
- package/server.js.map +1 -1
- package/tools/call/get_callkit_api.js +32 -0
- package/tools/call/get_callkit_api.js.map +1 -0
- package/tools/call/get_native_call_uikit_integration.js +34 -0
- package/tools/call/get_native_call_uikit_integration.js.map +1 -0
- package/tools/call/{get-web-call-integration.js → get_web_call_uikit_integration.js} +13 -8
- package/tools/call/get_web_call_uikit_integration.js.map +1 -0
- package/tools/chat/get_native_chat_uikit_feature_detail.js +34 -0
- package/tools/chat/get_native_chat_uikit_feature_detail.js.map +1 -0
- package/tools/chat/get_native_chat_uikit_integration.js +45 -0
- package/tools/chat/get_native_chat_uikit_integration.js.map +1 -0
- package/tools/chat/get_web_chat_uikit_component_detail.js +34 -0
- package/tools/chat/get_web_chat_uikit_component_detail.js.map +1 -0
- package/tools/chat/get_web_chat_uikit_integration.js +45 -0
- package/tools/chat/get_web_chat_uikit_integration.js.map +1 -0
- package/tools/common/get_faq.js +265 -0
- package/tools/common/get_faq.js.map +1 -0
- package/tools/common/{get-usersig.js → get_usersig.js} +6 -3
- package/tools/common/get_usersig.js.map +1 -0
- package/tools/common/present_framework_choice.js +63 -0
- package/tools/common/present_framework_choice.js.map +1 -0
- package/tools/common/record_skill_session.js +58 -0
- package/tools/common/record_skill_session.js.map +1 -0
- package/tools/definitions/get_callkit_api_def.js +29 -0
- package/tools/definitions/get_callkit_api_def.js.map +1 -0
- package/tools/definitions/get_faq_def.js +17 -18
- package/tools/definitions/get_faq_def.js.map +1 -1
- package/tools/definitions/get_native_call_uikit_integration_def.js +15 -34
- package/tools/definitions/get_native_call_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_native_chat_uikit_feature_detail_def.js +31 -0
- package/tools/definitions/get_native_chat_uikit_feature_detail_def.js.map +1 -0
- package/tools/definitions/get_native_chat_uikit_integration_def.js +16 -41
- package/tools/definitions/get_native_chat_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_native_livekit_core_features_def.js +34 -0
- package/tools/definitions/get_native_livekit_core_features_def.js.map +1 -0
- package/tools/definitions/get_native_livekit_core_integration_def.js +34 -0
- package/tools/definitions/get_native_livekit_core_integration_def.js.map +1 -0
- package/tools/definitions/get_native_trtc_sdk_docs_def.js +32 -0
- package/tools/definitions/get_native_trtc_sdk_docs_def.js.map +1 -0
- package/tools/definitions/get_usersig_def.js +17 -22
- package/tools/definitions/get_usersig_def.js.map +1 -1
- package/tools/definitions/get_web_call_uikit_integration_def.js +15 -7
- package/tools/definitions/get_web_call_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_web_chat_uikit_component_detail_def.js +17 -49
- package/tools/definitions/get_web_chat_uikit_component_detail_def.js.map +1 -1
- package/tools/definitions/get_web_chat_uikit_integration_def.js +16 -19
- package/tools/definitions/get_web_chat_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_web_live_uikit_integration_def.js +15 -18
- package/tools/definitions/get_web_live_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_web_livekit_api_def.js +30 -0
- package/tools/definitions/get_web_livekit_api_def.js.map +1 -0
- package/tools/definitions/get_web_livekit_component_detail_def.js +32 -0
- package/tools/definitions/get_web_livekit_component_detail_def.js.map +1 -0
- package/tools/definitions/get_web_room_uikit_integration_def.js +15 -46
- package/tools/definitions/get_web_room_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_web_roomkit_feature_detail_def.js +31 -0
- package/tools/definitions/get_web_roomkit_feature_detail_def.js.map +1 -0
- package/tools/definitions/get_web_trtc_sdk_api_def.js +27 -0
- package/tools/definitions/get_web_trtc_sdk_api_def.js.map +1 -0
- package/tools/definitions/get_web_trtc_sdk_integration_def.js +27 -0
- package/tools/definitions/get_web_trtc_sdk_integration_def.js.map +1 -0
- package/tools/definitions/get_web_trtc_sdk_plugin_def.js +27 -0
- package/tools/definitions/get_web_trtc_sdk_plugin_def.js.map +1 -0
- package/tools/definitions/present_framework_choice_def.js +24 -12
- package/tools/definitions/present_framework_choice_def.js.map +1 -1
- package/tools/definitions/record_skill_session_def.js +31 -0
- package/tools/definitions/record_skill_session_def.js.map +1 -0
- package/tools/index.js +49 -61
- package/tools/index.js.map +1 -1
- package/tools/live/get_native_livekit_core_features.js +65 -0
- package/tools/live/get_native_livekit_core_features.js.map +1 -0
- package/tools/live/get_native_livekit_core_integration.js +59 -0
- package/tools/live/get_native_livekit_core_integration.js.map +1 -0
- package/tools/live/get_web_live_uikit_integration.js +48 -0
- package/tools/live/get_web_live_uikit_integration.js.map +1 -0
- package/tools/live/get_web_livekit_api.js +32 -0
- package/tools/live/get_web_livekit_api.js.map +1 -0
- package/tools/live/get_web_livekit_component_detail.js +34 -0
- package/tools/live/get_web_livekit_component_detail.js.map +1 -0
- package/tools/room/{get-web-room-integration.js → get_web_room_uikit_integration.js} +13 -14
- package/tools/room/get_web_room_uikit_integration.js.map +1 -0
- package/tools/room/{get-web-room-feature-detail.js → get_web_roomkit_feature_detail.js} +30 -31
- package/tools/room/get_web_roomkit_feature_detail.js.map +1 -0
- package/tools/rtcengine/get_web_trtc_sdk_api.js +31 -0
- package/tools/rtcengine/get_web_trtc_sdk_api.js.map +1 -0
- package/tools/rtcengine/get_web_trtc_sdk_integration.js +31 -0
- package/tools/rtcengine/get_web_trtc_sdk_integration.js.map +1 -0
- package/tools/rtcengine/get_web_trtc_sdk_plugin.js +31 -0
- package/tools/rtcengine/get_web_trtc_sdk_plugin.js.map +1 -0
- package/tools/trtc/get_native_trtc_sdk_docs.js +73 -0
- package/tools/trtc/get_native_trtc_sdk_docs.js.map +1 -0
- package/utils/generate-structured-result.js +61 -17
- package/utils/generate-structured-result.js.map +1 -1
- package/utils/report-cls-client.js +21 -1
- package/utils/report-cls-client.js.map +1 -1
- package/utils/report-es-client.js +2 -2
- package/resource/doc/chatuikit/android/workflow.md +0 -713
- package/resource/doc/chatuikit/faq/android_sdk/client-api.md +0 -1371
- package/resource/doc/chatuikit/faq/flutter_sdk/client-api.md +0 -932
- package/resource/doc/chatuikit/faq/ios_sdk/client-api.md +0 -1119
- package/resource/doc/chatuikit/flutter/workflow.md +0 -941
- package/resource/doc/chatuikit/react/components/conversation-list.md +0 -1017
- package/resource/doc/chatuikit/react/components/search.md +0 -745
- package/resource/doc/chatuikit/react/create-group.md +0 -23
- package/resource/doc/chatuikit/react/init.md +0 -26
- package/resource/doc/chatuikit/react/workflow.md +0 -258
- package/resource/doc/chatuikit/vue/components/contact-list.md +0 -679
- package/resource/doc/chatuikit/vue/create-group.md +0 -25
- package/resource/doc/chatuikit/vue/init.md +0 -40
- package/resource/doc/chatuikit/vue/workflow.md +0 -395
- package/resource/doc/livekit/live/android/workflow.md +0 -320
- package/resource/doc/livekit/live/flutter/workflow.md +0 -353
- package/resource/doc/livekit/live/ios/workflow.md +0 -454
- package/resource/doc/livekit/live/vue/components/barrage.md +0 -616
- package/resource/doc/livekit/live/vue/components/stream-mixer.md +0 -446
- package/resource/doc/livekit/live/vue/faq.md +0 -0
- package/resource/doc/livekit/live/vue/live-list-integration.md +0 -200
- package/resource/doc/livekit/live/vue/live-player-desk-integration.md +0 -269
- package/resource/doc/livekit/live/vue/live-player-h5-integration.md +0 -269
- package/resource/doc/livekit/live/vue/live-pusher-integration.md +0 -595
- package/resource/doc/livekit/live/vue/states/live-state.md +0 -3591
- package/resource/doc/livekit/live/vue/workflow.md +0 -218
- package/resource/doc/native_live/android/V2TXLiveCode_api_android.md +0 -312
- package/resource/doc/native_live/android/V2TXLiveDef_api_android.md +0 -430
- package/resource/doc/native_live/android/V2TXLivePlayerObserver_api_android.md +0 -679
- package/resource/doc/native_live/android/V2TXLivePlayer_api_android.md +0 -671
- package/resource/doc/native_live/android/V2TXLivePremier_api_android.md +0 -271
- package/resource/doc/native_live/android/V2TXLivePusherObserver_api_android.md +0 -849
- package/resource/doc/native_live/android/V2TXLivePusher_api_android.md +0 -1046
- package/resource/doc/native_live/flutter/V2TXLiveCode_api_flutter.md +0 -460
- package/resource/doc/native_live/flutter/V2TXLiveDef_api_flutter.md +0 -558
- package/resource/doc/native_live/flutter/V2TXLivePlayerObserver_api_flutter.md +0 -865
- package/resource/doc/native_live/flutter/V2TXLivePlayer_api_flutter.md +0 -657
- package/resource/doc/native_live/flutter/V2TXLivePremier_api_flutter.md +0 -437
- package/resource/doc/native_live/flutter/V2TXLivePusherObserver_api_flutter.md +0 -335
- package/resource/doc/native_live/flutter/V2TXLivePusher_api_flutter.md +0 -748
- package/resource/doc/native_live/iOS/V2TXLiveCode_api_iOS.md +0 -327
- package/resource/doc/native_live/iOS/V2TXLiveDef_api_iOS.md +0 -507
- package/resource/doc/native_live/iOS/V2TXLivePlayerObserver_api_iOS.md +0 -507
- package/resource/doc/native_live/iOS/V2TXLivePlayer_api_iOS.md +0 -659
- package/resource/doc/native_live/iOS/V2TXLivePremier_api_iOS.md +0 -284
- package/resource/doc/native_live/iOS/V2TXLivePusherObserver_api_iOS.md +0 -814
- package/resource/doc/native_live/iOS/V2TXLivePusher_api_iOS.md +0 -1000
- package/resource/doc/roomkit/vue/features/workflow.md +0 -553
- package/resource/doc/roomkit/vue/workflow.md +0 -733
- package/resource/doc/tuicallkit/android/workflow.md +0 -441
- package/resource/doc/tuicallkit/faq/android_sdk/call-observer-api.md +0 -784
- package/resource/doc/tuicallkit/faq/android_sdk/callkit-api.md +0 -610
- package/resource/doc/tuicallkit/faq/flutter_sdk/call-define-api.md +0 -938
- package/resource/doc/tuicallkit/faq/flutter_sdk/call-observer-api.md +0 -897
- package/resource/doc/tuicallkit/faq/flutter_sdk/callkit-api.md +0 -469
- package/resource/doc/tuicallkit/faq/ios_sdk/call-observer-api.md +0 -781
- package/resource/doc/tuicallkit/faq/ios_sdk/callkit-api.md +0 -398
- package/resource/doc/tuicallkit/flutter/workflow.md +0 -331
- package/resource/doc/tuicallkit/react/api.md +0 -1404
- package/resource/doc/tuicallkit/vue/api.md +0 -1406
- package/resource/doc/tuicallkit/vue/faq.md +0 -36
- package/tools/call/get-native-call-integration.js +0 -43
- package/tools/call/get-native-call-integration.js.map +0 -1
- package/tools/call/get-web-call-api.js +0 -27
- package/tools/call/get-web-call-api.js.map +0 -1
- package/tools/call/get-web-call-integration.js.map +0 -1
- package/tools/chat/get-native-chat-feature-detail.js +0 -30
- package/tools/chat/get-native-chat-feature-detail.js.map +0 -1
- package/tools/chat/get-native-chat-integration.js +0 -45
- package/tools/chat/get-native-chat-integration.js.map +0 -1
- package/tools/chat/get-web-chat-component-detail.js +0 -31
- package/tools/chat/get-web-chat-component-detail.js.map +0 -1
- package/tools/chat/get-web-chat-integration.js +0 -45
- package/tools/chat/get-web-chat-integration.js.map +0 -1
- package/tools/chat/get-web-chat-uikit-init.js +0 -28
- package/tools/chat/get-web-chat-uikit-init.js.map +0 -1
- package/tools/chat/get-web-create-group-doc.js +0 -28
- package/tools/chat/get-web-create-group-doc.js.map +0 -1
- package/tools/common/get-faq.js +0 -91
- package/tools/common/get-faq.js.map +0 -1
- package/tools/common/get-usersig.js.map +0 -1
- package/tools/common/present-framework-choice.js +0 -16
- package/tools/common/present-framework-choice.js.map +0 -1
- package/tools/common/present-scenario-choice.js +0 -16
- package/tools/common/present-scenario-choice.js.map +0 -1
- package/tools/common/record-prompt.js +0 -55
- package/tools/common/record-prompt.js.map +0 -1
- package/tools/common/record-result.js +0 -60
- package/tools/common/record-result.js.map +0 -1
- package/tools/definitions/get_native_chat_feature_detail_def.js +0 -32
- package/tools/definitions/get_native_chat_feature_detail_def.js.map +0 -1
- package/tools/definitions/get_native_live_api_def.js +0 -23
- package/tools/definitions/get_native_live_api_def.js.map +0 -1
- package/tools/definitions/get_native_live_uikit_extra_features_def.js +0 -87
- package/tools/definitions/get_native_live_uikit_extra_features_def.js.map +0 -1
- package/tools/definitions/get_native_live_uikit_integration_def.js +0 -75
- package/tools/definitions/get_native_live_uikit_integration_def.js.map +0 -1
- package/tools/definitions/get_native_live_uikit_interaction_def.js +0 -63
- package/tools/definitions/get_native_live_uikit_interaction_def.js.map +0 -1
- package/tools/definitions/get_trtc_native_api_def.js +0 -16
- package/tools/definitions/get_trtc_native_api_def.js.map +0 -1
- package/tools/definitions/get_web_call_uikit_api_def.js +0 -23
- package/tools/definitions/get_web_call_uikit_api_def.js.map +0 -1
- package/tools/definitions/get_web_chat_uikit_init_def.js +0 -23
- package/tools/definitions/get_web_chat_uikit_init_def.js.map +0 -1
- package/tools/definitions/get_web_create_group_doc_def.js +0 -18
- package/tools/definitions/get_web_create_group_doc_def.js.map +0 -1
- package/tools/definitions/get_web_live_state_detail_def.js +0 -19
- package/tools/definitions/get_web_live_state_detail_def.js.map +0 -1
- package/tools/definitions/get_web_live_uikit_component_detail_def.js +0 -27
- package/tools/definitions/get_web_live_uikit_component_detail_def.js.map +0 -1
- package/tools/definitions/get_web_room_feature_detail_def.js +0 -92
- package/tools/definitions/get_web_room_feature_detail_def.js.map +0 -1
- package/tools/definitions/get_web_room_state_detail_def.js +0 -19
- package/tools/definitions/get_web_room_state_detail_def.js.map +0 -1
- package/tools/definitions/present_scenario_choice_def.js +0 -53
- package/tools/definitions/present_scenario_choice_def.js.map +0 -1
- package/tools/definitions/record_prompt_def.js +0 -58
- package/tools/definitions/record_prompt_def.js.map +0 -1
- package/tools/definitions/record_result_def.js +0 -46
- package/tools/definitions/record_result_def.js.map +0 -1
- package/tools/live/get-native-live-uikit-integration.js +0 -177
- package/tools/live/get-native-live-uikit-integration.js.map +0 -1
- package/tools/live/get-web-live-component-detail.js +0 -31
- package/tools/live/get-web-live-component-detail.js.map +0 -1
- package/tools/live/get-web-live-state-detail.js +0 -31
- package/tools/live/get-web-live-state-detail.js.map +0 -1
- package/tools/live/get-web-live-uikit-integration.js +0 -52
- package/tools/live/get-web-live-uikit-integration.js.map +0 -1
- package/tools/live/get_native_live_uikit_extra_features.js +0 -105
- package/tools/live/get_native_live_uikit_extra_features.js.map +0 -1
- package/tools/live/get_native_live_uikit_interaction.js +0 -194
- package/tools/live/get_native_live_uikit_interaction.js.map +0 -1
- package/tools/native_live/get-native-live-api.js +0 -31
- package/tools/native_live/get-native-live-api.js.map +0 -1
- package/tools/room/get-web-room-feature-detail.js.map +0 -1
- package/tools/room/get-web-room-integration.js.map +0 -1
- package/tools/rtcengine/get-rtcengine-web-sdk-integration.js +0 -28
- package/tools/rtcengine/get-rtcengine-web-sdk-integration.js.map +0 -1
- package/tools/rtcengine/get-trtc-sdk-faq.js +0 -32
- package/tools/rtcengine/get-trtc-sdk-faq.js.map +0 -1
- package/tools/rtcengine/get-trtc-web-sdk-api.js +0 -28
- package/tools/rtcengine/get-trtc-web-sdk-api.js.map +0 -1
- package/tools/rtcengine/get-trtc-web-sdk-faq.js +0 -30
- package/tools/rtcengine/get-trtc-web-sdk-faq.js.map +0 -1
- package/tools/rtcengine/get-trtc-web-sdk-integration.js +0 -29
- package/tools/rtcengine/get-trtc-web-sdk-integration.js.map +0 -1
- package/tools/rtcengine/get-trtc-web-sdk-plugin.js +0 -45
- package/tools/rtcengine/get-trtc-web-sdk-plugin.js.map +0 -1
- package/tools/trtc/get-trtc-native-api.js +0 -31
- package/tools/trtc/get-trtc-native-api.js.map +0 -1
- package/utils/handle-component-name.js +0 -33
- package/utils/handle-component-name.js.map +0 -1
- /package/resource/doc/{chatuikit/iOS/workflow.md → callkit/core-sdk/.gitkeep} +0 -0
- /package/resource/doc/{tuicallkit/faq/common/error_code.md → callkit/faq/common/error-code.md} +0 -0
- /package/resource/doc/{tuicallkit/react/faq.md → callkit/faq/web-faq.md} +0 -0
- /package/resource/doc/{chatuikit → chatkit}/faq/common/server_error_code.md +0 -0
- /package/resource/doc/{chatuikit → chatkit}/faq/web_sdk/error_code.md +0 -0
- /package/resource/doc/{chatuikit → chatkit}/flutter/faq.md +0 -0
- /package/resource/doc/{chatuikit → chatkit}/react/faq.md +0 -0
- /package/resource/doc/roomkit/faq/common/{error_code.md → error-code.md} +0 -0
|
@@ -4,14 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
A complete "anchor connection PK" usually consists of three core stages, and the overall process is as follows:
|
|
6
6
|
|
|
7
|
-

|
|
8
|
-
|
|
9
|
-
|
|
10
7
|
## Implementation Steps
|
|
11
8
|
|
|
12
9
|
### Step 1: Integrating the Component
|
|
13
10
|
|
|
14
|
-
Refer to
|
|
11
|
+
Refer to Quick Connection for seamless integration with **AtomicXCore** and complete **LiveCoreWidget** access.
|
|
15
12
|
|
|
16
13
|
### Step 2: Implementing Cross-Room Connection
|
|
17
14
|
|
|
@@ -20,51 +17,50 @@ The goal of this step is to have two Anchors appear in the same view, and we wil
|
|
|
20
17
|
#### Inviter (Anchor A) Implementation
|
|
21
18
|
1. **Initiate connection invitation**
|
|
22
19
|
|
|
23
|
-
|
|
24
20
|
When Anchor A selects target Anchor B on the interface and initiates connecting line, call the `requestHostConnection` method.
|
|
25
21
|
|
|
26
22
|
``` java
|
|
27
23
|
import 'package:atomic_x_core/atomicxcore.dart';
|
|
28
|
-
|
|
24
|
+
|
|
29
25
|
// Anchor A's webpage
|
|
30
26
|
class AnchorAPage extends StatefulWidget {
|
|
31
27
|
final String liveId;
|
|
32
|
-
|
|
28
|
+
|
|
33
29
|
const AnchorAPage({Key? key, required this.liveId}) : super(key: key);
|
|
34
|
-
|
|
30
|
+
|
|
35
31
|
@override
|
|
36
32
|
State<AnchorAPage> createState() => _AnchorAPageState();
|
|
37
33
|
}
|
|
38
|
-
|
|
34
|
+
|
|
39
35
|
class _AnchorAPageState extends State<AnchorAPage> {
|
|
40
36
|
late final CoHostStore _coHostStore;
|
|
41
37
|
late final CoHostListener _coHostListener;
|
|
42
|
-
|
|
38
|
+
|
|
43
39
|
@override
|
|
44
40
|
void initState() {
|
|
45
41
|
super.initState();
|
|
46
42
|
_coHostStore = CoHostStore.create(widget.liveId);
|
|
47
43
|
_setupListeners();
|
|
48
44
|
}
|
|
49
|
-
|
|
45
|
+
|
|
50
46
|
// User clicks the "connecting line" button and selected Anchor B
|
|
51
47
|
Future<void> inviteHostB(String targetHostLiveId) async {
|
|
52
48
|
final layout = CoHostLayoutTemplate.hostDynamicGrid; // Select a layout template
|
|
53
49
|
const timeout = 30; // Invitation timeout duration (seconds)
|
|
54
|
-
|
|
50
|
+
|
|
55
51
|
final result = await _coHostStore.requestHostConnection(
|
|
56
52
|
targetHostLiveID: targetHostLiveId,
|
|
57
53
|
layoutTemplate: layout,
|
|
58
54
|
timeout: timeout,
|
|
59
55
|
);
|
|
60
|
-
|
|
56
|
+
|
|
61
57
|
if (result.isSuccess) {
|
|
62
58
|
print('Connection invitation sent, waiting for peer to handle...');
|
|
63
59
|
} else {
|
|
64
60
|
print('Invitation sending failure: ${result.errorMessage}');
|
|
65
61
|
}
|
|
66
62
|
}
|
|
67
|
-
|
|
63
|
+
|
|
68
64
|
@override
|
|
69
65
|
void dispose() {
|
|
70
66
|
_coHostStore.removeCoHostListener(_coHostListener);
|
|
@@ -74,7 +70,6 @@ The goal of this step is to have two Anchors appear in the same view, and we wil
|
|
|
74
70
|
```
|
|
75
71
|
2. **Listen for invitation result**
|
|
76
72
|
|
|
77
|
-
|
|
78
73
|
Through `CoHostListener`, you can receive the Anchor B's processing result.
|
|
79
74
|
|
|
80
75
|
``` java
|
|
@@ -104,33 +99,32 @@ The goal of this step is to have two Anchors appear in the same view, and we wil
|
|
|
104
99
|
#### Invitee (Anchor B) Implementation
|
|
105
100
|
1. **Receive connection invitation**
|
|
106
101
|
|
|
107
|
-
|
|
108
102
|
Through `CoHostListener`, Anchor B can listen to the invitation from Anchor A.
|
|
109
103
|
|
|
110
104
|
``` java
|
|
111
105
|
import 'package:atomic_x_core/atomicxcore.dart';
|
|
112
|
-
|
|
106
|
+
|
|
113
107
|
// Anchor B's webpage
|
|
114
108
|
class AnchorBPage extends StatefulWidget {
|
|
115
109
|
final String liveId;
|
|
116
|
-
|
|
110
|
+
|
|
117
111
|
const AnchorBPage({Key? key, required this.liveId}) : super(key: key);
|
|
118
|
-
|
|
112
|
+
|
|
119
113
|
@override
|
|
120
114
|
State<AnchorBPage> createState() => _AnchorBPageState();
|
|
121
115
|
}
|
|
122
|
-
|
|
116
|
+
|
|
123
117
|
class _AnchorBPageState extends State<AnchorBPage> {
|
|
124
118
|
late final CoHostStore _coHostStore;
|
|
125
119
|
late final CoHostListener _coHostListener;
|
|
126
|
-
|
|
120
|
+
|
|
127
121
|
@override
|
|
128
122
|
void initState() {
|
|
129
123
|
super.initState();
|
|
130
124
|
_coHostStore = CoHostStore.create(widget.liveId);
|
|
131
125
|
_setupListeners();
|
|
132
126
|
}
|
|
133
|
-
|
|
127
|
+
|
|
134
128
|
// Set up monitoring during initialization
|
|
135
129
|
void _setupListeners() {
|
|
136
130
|
_coHostListener = CoHostListener(
|
|
@@ -141,7 +135,7 @@ The goal of this step is to have two Anchors appear in the same view, and we wil
|
|
|
141
135
|
);
|
|
142
136
|
_coHostStore.addCoHostListener(_coHostListener);
|
|
143
137
|
}
|
|
144
|
-
|
|
138
|
+
|
|
145
139
|
@override
|
|
146
140
|
void dispose() {
|
|
147
141
|
_coHostStore.removeCoHostListener(_coHostListener);
|
|
@@ -151,7 +145,6 @@ The goal of this step is to have two Anchors appear in the same view, and we wil
|
|
|
151
145
|
```
|
|
152
146
|
2. **Respond to connection invitation**
|
|
153
147
|
|
|
154
|
-
|
|
155
148
|
When Anchor B makes a selection in the pop-up dialog box, call the method accordingly.
|
|
156
149
|
|
|
157
150
|
``` java
|
|
@@ -164,7 +157,7 @@ The goal of this step is to have two Anchors appear in the same view, and we wil
|
|
|
164
157
|
print('Connection acceptance failure: ${result.errorMessage}');
|
|
165
158
|
}
|
|
166
159
|
}
|
|
167
|
-
|
|
160
|
+
|
|
168
161
|
Future<void> rejectInvitation(String fromHostLiveId) async {
|
|
169
162
|
final result = await _coHostStore.rejectHostConnection(fromHostLiveId);
|
|
170
163
|
if (result.isSuccess) {
|
|
@@ -182,14 +175,13 @@ Upon success of the connecting line, either party can initiate PK. This step wil
|
|
|
182
175
|
#### Challenger (Such As Anchor A) Implementation
|
|
183
176
|
1. **Initiate PK challenge**
|
|
184
177
|
|
|
185
|
-
|
|
186
178
|
When Anchor A clicks the "PK" button, call the `requestBattle` method.
|
|
187
179
|
|
|
188
180
|
``` java
|
|
189
181
|
// Part of _AnchorAPageState
|
|
190
182
|
late final BattleStore _battleStore;
|
|
191
183
|
late final BattleListener _battleListener;
|
|
192
|
-
|
|
184
|
+
|
|
193
185
|
@override
|
|
194
186
|
void initState() {
|
|
195
187
|
super.initState();
|
|
@@ -198,7 +190,7 @@ Upon success of the connecting line, either party can initiate PK. This step wil
|
|
|
198
190
|
_setupListeners();
|
|
199
191
|
_setupBattleListeners();
|
|
200
192
|
}
|
|
201
|
-
|
|
193
|
+
|
|
202
194
|
Future<void> startPK(String opponentUserId) async {
|
|
203
195
|
final config = BattleConfig(duration: 300); // PK lasts 5 minutes
|
|
204
196
|
final result = await _battleStore.requestBattle(
|
|
@@ -206,7 +198,7 @@ Upon success of the connecting line, either party can initiate PK. This step wil
|
|
|
206
198
|
userIDList: [opponentUserId],
|
|
207
199
|
timeout: 30,
|
|
208
200
|
);
|
|
209
|
-
|
|
201
|
+
|
|
210
202
|
if (result.isSuccess) {
|
|
211
203
|
print('Battle request sent, battleID: ${result.battleID}');
|
|
212
204
|
} else {
|
|
@@ -216,7 +208,6 @@ Upon success of the connecting line, either party can initiate PK. This step wil
|
|
|
216
208
|
```
|
|
217
209
|
2. **Listen for PK status**
|
|
218
210
|
|
|
219
|
-
|
|
220
211
|
Listen for key events such as PK start and end via `BattleListener`.
|
|
221
212
|
|
|
222
213
|
``` java
|
|
@@ -238,7 +229,7 @@ Upon success of the connecting line, either party can initiate PK. This step wil
|
|
|
238
229
|
);
|
|
239
230
|
_battleStore.addBattleListener(_battleListener);
|
|
240
231
|
}
|
|
241
|
-
|
|
232
|
+
|
|
242
233
|
@override
|
|
243
234
|
void dispose() {
|
|
244
235
|
_coHostStore.removeCoHostListener(_coHostListener);
|
|
@@ -250,7 +241,6 @@ Upon success of the connecting line, either party can initiate PK. This step wil
|
|
|
250
241
|
#### Challenger (Anchor B) Implementation
|
|
251
242
|
1. **Accept PK challenge**
|
|
252
243
|
|
|
253
|
-
|
|
254
244
|
Listen for PK invitation via `BattleListener`.
|
|
255
245
|
|
|
256
246
|
``` java
|
|
@@ -274,7 +264,6 @@ Upon success of the connecting line, either party can initiate PK. This step wil
|
|
|
274
264
|
```
|
|
275
265
|
2. **Respond to PK challenge**
|
|
276
266
|
|
|
277
|
-
|
|
278
267
|
When Anchor B makes a selection, call the appropriate method.
|
|
279
268
|
|
|
280
269
|
``` java
|
|
@@ -288,7 +277,7 @@ Upon success of the connecting line, either party can initiate PK. This step wil
|
|
|
288
277
|
print('PK acceptance failure: ${result.errorMessage}');
|
|
289
278
|
}
|
|
290
279
|
}
|
|
291
|
-
|
|
280
|
+
|
|
292
281
|
// User click "Reject Challenge"
|
|
293
282
|
Future<void> rejectPK(String battleId) async {
|
|
294
283
|
final result = await _battleStore.rejectBattle(battleId);
|
|
@@ -302,10 +291,7 @@ Upon success of the connecting line, either party can initiate PK. This step wil
|
|
|
302
291
|
|
|
303
292
|
### Execution Effect
|
|
304
293
|
|
|
305
|
-
After integrating the above feature implementation, perform the corresponding operation using Anchor A and Anchor B separately. The execution effect is as follows. You can refer to the next chapter
|
|
306
|
-
|
|
307
|
-

|
|
308
|
-
|
|
294
|
+
After integrating the above feature implementation, perform the corresponding operation using Anchor A and Anchor B separately. The execution effect is as follows. You can refer to the next chapter Refine UI Detail to customize UI logic.
|
|
309
295
|
|
|
310
296
|
## Refine UI Detail
|
|
311
297
|
|
|
@@ -315,32 +301,28 @@ You can use the "slot" capacity provided by the `VideoWidgetBuilder` parameter o
|
|
|
315
301
|
|
|
316
302
|
#### Effect
|
|
317
303
|
|
|
318
|
-

|
|
319
|
-
|
|
320
|
-
|
|
321
304
|
#### Implementation Method
|
|
322
305
|
- **Step 1**: Create a foreground view (**CustomCoHostForegroundView**) to display user information above the video stream.
|
|
323
|
-
|
|
324
306
|
|
|
325
307
|
> **Note:**
|
|
326
|
-
>
|
|
308
|
+
>
|
|
327
309
|
|
|
328
310
|
> You can also refer to the [co_host_foreground_widget.dart](https://github.com/Tencent-RTC/TUIKit_Flutter/blob/main/live/livekit/lib/live_stream/features/decorations/co_host/co_host_foreground_widget.dart) and [co_host_background_widget.dart](https://github.com/Tencent-RTC/TUIKit_Flutter/blob/main/live/livekit/lib/live_stream/features/decorations/co_host/co_host_background_widget.dart) files in the TUILiveKit open-source project to understand the complete implementation logic.
|
|
329
|
-
>
|
|
311
|
+
>
|
|
330
312
|
|
|
331
313
|
``` java
|
|
332
314
|
import 'package:flutter/material.dart';
|
|
333
315
|
import 'package:rtc_room_engine/rtc_room_engine.dart';
|
|
334
|
-
|
|
316
|
+
|
|
335
317
|
/// Custom connected host message floating view (foreground)
|
|
336
318
|
class CustomCoHostForegroundView extends StatelessWidget {
|
|
337
319
|
final SeatFullInfo seatInfo;
|
|
338
|
-
|
|
320
|
+
|
|
339
321
|
const CustomCoHostForegroundView({
|
|
340
|
-
Key? key,
|
|
322
|
+
Key? key,
|
|
341
323
|
required this.seatInfo,
|
|
342
324
|
}) : super(key: key);
|
|
343
|
-
|
|
325
|
+
|
|
344
326
|
@override
|
|
345
327
|
Widget build(BuildContext context) {
|
|
346
328
|
return Container(
|
|
@@ -372,16 +354,16 @@ You can use the "slot" capacity provided by the `VideoWidgetBuilder` parameter o
|
|
|
372
354
|
``` java
|
|
373
355
|
import 'package:flutter/material.dart';
|
|
374
356
|
import 'package:rtc_room_engine/rtc_room_engine.dart';
|
|
375
|
-
|
|
357
|
+
|
|
376
358
|
/// Custom connected anchor avatar placeholder view (background)
|
|
377
359
|
class CustomCoHostBackgroundView extends StatelessWidget {
|
|
378
360
|
final SeatFullInfo seatInfo;
|
|
379
|
-
|
|
361
|
+
|
|
380
362
|
const CustomCoHostBackgroundView({
|
|
381
|
-
Key? key,
|
|
363
|
+
Key? key,
|
|
382
364
|
required this.seatInfo,
|
|
383
365
|
}) : super(key: key);
|
|
384
|
-
|
|
366
|
+
|
|
385
367
|
@override
|
|
386
368
|
Widget build(BuildContext context) {
|
|
387
369
|
final avatarUrl = seatInfo.userInfo.avatarUrl;
|
|
@@ -419,7 +401,7 @@ You can use the "slot" capacity provided by the `VideoWidgetBuilder` parameter o
|
|
|
419
401
|
),
|
|
420
402
|
);
|
|
421
403
|
}
|
|
422
|
-
|
|
404
|
+
|
|
423
405
|
Widget _buildDefaultAvatar() {
|
|
424
406
|
return Container(
|
|
425
407
|
width: 60,
|
|
@@ -436,40 +418,40 @@ You can use the "slot" capacity provided by the `VideoWidgetBuilder` parameter o
|
|
|
436
418
|
import 'package:flutter/material.dart';
|
|
437
419
|
import 'package:atomic_x_core/atomicxcore.dart';
|
|
438
420
|
import 'package:rtc_room_engine/rtc_room_engine.dart';
|
|
439
|
-
|
|
421
|
+
|
|
440
422
|
/// Live streaming page with custom connection view
|
|
441
423
|
class CustomCoHostLiveWidget extends StatefulWidget {
|
|
442
424
|
final String liveId;
|
|
443
|
-
|
|
425
|
+
|
|
444
426
|
const CustomCoHostLiveWidget({
|
|
445
|
-
Key? key,
|
|
427
|
+
Key? key,
|
|
446
428
|
required this.liveId,
|
|
447
429
|
}) : super(key: key);
|
|
448
|
-
|
|
430
|
+
|
|
449
431
|
@override
|
|
450
432
|
State<CustomCoHostLiveWidget> createState() => _CustomCoHostLiveWidgetState();
|
|
451
433
|
}
|
|
452
|
-
|
|
434
|
+
|
|
453
435
|
class _CustomCoHostLiveWidgetState extends State<CustomCoHostLiveWidget> {
|
|
454
436
|
late LiveCoreController _controller;
|
|
455
|
-
|
|
437
|
+
|
|
456
438
|
@override
|
|
457
439
|
void initState() {
|
|
458
440
|
super.initState();
|
|
459
441
|
_controller = LiveCoreController.create();
|
|
460
442
|
_controller.setLiveID(widget.liveId);
|
|
461
443
|
}
|
|
462
|
-
|
|
444
|
+
|
|
463
445
|
@override
|
|
464
446
|
void dispose() {
|
|
465
447
|
_controller.dispose();
|
|
466
448
|
super.dispose();
|
|
467
449
|
}
|
|
468
|
-
|
|
450
|
+
|
|
469
451
|
/// Build a custom view for the connected host
|
|
470
452
|
Widget _buildCoHostWidget(
|
|
471
|
-
BuildContext context,
|
|
472
|
-
SeatFullInfo seatFullInfo,
|
|
453
|
+
BuildContext context,
|
|
454
|
+
SeatFullInfo seatFullInfo,
|
|
473
455
|
ViewLayer viewLayer,
|
|
474
456
|
) {
|
|
475
457
|
if (viewLayer == ViewLayer.foreground) {
|
|
@@ -480,7 +462,7 @@ You can use the "slot" capacity provided by the `VideoWidgetBuilder` parameter o
|
|
|
480
462
|
return CustomCoHostBackgroundView(seatInfo: seatFullInfo);
|
|
481
463
|
}
|
|
482
464
|
}
|
|
483
|
-
|
|
465
|
+
|
|
484
466
|
@override
|
|
485
467
|
Widget build(BuildContext context) {
|
|
486
468
|
return Scaffold(
|
|
@@ -496,56 +478,13 @@ You can use the "slot" capacity provided by the `VideoWidgetBuilder` parameter o
|
|
|
496
478
|
```
|
|
497
479
|
|
|
498
480
|
#### **Parameter description:**
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
<
|
|
506
|
-
</tr>
|
|
507
|
-
|
|
508
|
-
<tr>
|
|
509
|
-
<td rowspan="1" colSpan="1" >`seatFullInfo`</td>
|
|
510
|
-
|
|
511
|
-
<td rowspan="1" colSpan="1" >`SeatFullInfo`</td>
|
|
512
|
-
|
|
513
|
-
<td rowspan="1" colSpan="1" >Seat information object, containing the Anchor's detailed information</td>
|
|
514
|
-
</tr>
|
|
515
|
-
|
|
516
|
-
<tr>
|
|
517
|
-
<td rowspan="1" colSpan="1" >`seatFullInfo.userInfo.userId`</td>
|
|
518
|
-
|
|
519
|
-
<td rowspan="1" colSpan="1" >`String`</td>
|
|
520
|
-
|
|
521
|
-
<td rowspan="1" colSpan="1" >Anchor's user ID</td>
|
|
522
|
-
</tr>
|
|
523
|
-
|
|
524
|
-
<tr>
|
|
525
|
-
<td rowspan="1" colSpan="1" >`seatFullInfo.userInfo.userName`</td>
|
|
526
|
-
|
|
527
|
-
<td rowspan="1" colSpan="1" >`String`</td>
|
|
528
|
-
|
|
529
|
-
<td rowspan="1" colSpan="1" >Anchor's Nickname</td>
|
|
530
|
-
</tr>
|
|
531
|
-
|
|
532
|
-
<tr>
|
|
533
|
-
<td rowspan="1" colSpan="1" >`seatFullInfo.userInfo.avatarUrl`</td>
|
|
534
|
-
|
|
535
|
-
<td rowspan="1" colSpan="1" >`String`</td>
|
|
536
|
-
|
|
537
|
-
<td rowspan="1" colSpan="1" >Anchor's profile photo URL</td>
|
|
538
|
-
</tr>
|
|
539
|
-
|
|
540
|
-
<tr>
|
|
541
|
-
<td rowspan="1" colSpan="1" >`viewLayer`</td>
|
|
542
|
-
|
|
543
|
-
<td rowspan="1" colSpan="1" >`ViewLayer`</td>
|
|
544
|
-
|
|
545
|
-
<td rowspan="1" colSpan="1" >View hierarchy enumeration<br>`ViewLayer.foreground` refers to the pendant view in the foreground, always displayed on top of the video image.<br>`ViewLayer.background` refers to the pendant view in the background, located in the lower layer of the foreground view. It is only displayed when the corresponding user has no video stream (such as when the camera is off), usually used for displaying the default avatar or placeholder image.</td>
|
|
546
|
-
</tr>
|
|
547
|
-
</table>
|
|
548
|
-
|
|
481
|
+
| **Parameter** | **Type** | **Note** |
|
|
482
|
+
| --- | --- | --- |
|
|
483
|
+
| `seatFullInfo` | `SeatFullInfo` | Seat information object, containing the Anchor's detailed information |
|
|
484
|
+
| `seatFullInfo.userInfo.userId` | `String` | Anchor's user ID |
|
|
485
|
+
| `seatFullInfo.userInfo.userName` | `String` | Anchor's Nickname |
|
|
486
|
+
| `seatFullInfo.userInfo.avatarUrl` | `String` | Anchor's profile photo URL |
|
|
487
|
+
| `viewLayer` | `ViewLayer` | View hierarchy enumeration<br>`ViewLayer.foreground` refers to the pendant view in the foreground, always displayed on top of the video image.<br>`ViewLayer.background` refers to the pendant view in the background, located in the lower layer of the foreground view. It is only displayed when the corresponding user has no video stream (such as when the camera is off), usually used for displaying the default avatar or placeholder image. |
|
|
549
488
|
|
|
550
489
|
### Implementing Score Display for PK User View
|
|
551
490
|
|
|
@@ -553,9 +492,6 @@ When the Anchor starts PK, you can mount a custom view on the other party's vide
|
|
|
553
492
|
|
|
554
493
|
#### **Effect**
|
|
555
494
|
|
|
556
|
-

|
|
557
|
-
|
|
558
|
-
|
|
559
495
|
#### Implementation Method
|
|
560
496
|
- **Step 1**: Create a custom PK user view. You can refer to the [battle_member_info_widget.dart](https://github.com/Tencent-RTC/TUIKit_Flutter/blob/main/live/livekit/lib/live_stream/features/decorations/battle/battle_member_info_widget.dart) file in the TUILiveKit open-source project to learn about the complete implementation logic.
|
|
561
497
|
|
|
@@ -563,45 +499,45 @@ When the Anchor starts PK, you can mount a custom view on the other party's vide
|
|
|
563
499
|
import 'package:flutter/material.dart';
|
|
564
500
|
import 'package:atomic_x_core/atomicxcore.dart';
|
|
565
501
|
import 'package:rtc_room_engine/rtc_room_engine.dart';
|
|
566
|
-
|
|
502
|
+
|
|
567
503
|
/// Custom PK User View
|
|
568
504
|
class CustomBattleUserView extends StatefulWidget {
|
|
569
505
|
final String liveId;
|
|
570
506
|
final TUIBattleUser battleUser;
|
|
571
|
-
|
|
507
|
+
|
|
572
508
|
const CustomBattleUserView({
|
|
573
509
|
Key? key,
|
|
574
510
|
required this.liveId,
|
|
575
511
|
required this.battleUser,
|
|
576
512
|
}) : super(key: key);
|
|
577
|
-
|
|
513
|
+
|
|
578
514
|
@override
|
|
579
515
|
State<CustomBattleUserView> createState() => _CustomBattleUserViewState();
|
|
580
516
|
}
|
|
581
|
-
|
|
517
|
+
|
|
582
518
|
class _CustomBattleUserViewState extends State<CustomBattleUserView> {
|
|
583
519
|
late final BattleStore _battleStore;
|
|
584
520
|
late final VoidCallback _scoreChangedListener = _onScoreChanged;
|
|
585
521
|
int _score = 0;
|
|
586
|
-
|
|
522
|
+
|
|
587
523
|
@override
|
|
588
524
|
void initState() {
|
|
589
525
|
super.initState();
|
|
590
526
|
_battleStore = BattleStore.create(widget.liveId);
|
|
591
527
|
_subscribeBattleState();
|
|
592
528
|
}
|
|
593
|
-
|
|
529
|
+
|
|
594
530
|
/// Subscribe to PK score changes
|
|
595
531
|
void _subscribeBattleState() {
|
|
596
532
|
_battleStore.battleState.battleScore.addListener(_scoreChangedListener);
|
|
597
533
|
// Initialize the score
|
|
598
534
|
_updateScore(_battleStore.battleState.battleScore.value);
|
|
599
535
|
}
|
|
600
|
-
|
|
536
|
+
|
|
601
537
|
void _onScoreChanged() {
|
|
602
538
|
_updateScore(_battleStore.battleState.battleScore.value);
|
|
603
539
|
}
|
|
604
|
-
|
|
540
|
+
|
|
605
541
|
void _updateScore(Map<String, int> battleScore) {
|
|
606
542
|
final score = battleScore[widget.battleUser.userId] ?? 0;
|
|
607
543
|
if (mounted && score != _score) {
|
|
@@ -610,13 +546,13 @@ When the Anchor starts PK, you can mount a custom view on the other party's vide
|
|
|
610
546
|
});
|
|
611
547
|
}
|
|
612
548
|
}
|
|
613
|
-
|
|
549
|
+
|
|
614
550
|
@override
|
|
615
551
|
void dispose() {
|
|
616
552
|
_battleStore.battleState.battleScore.removeListener(_scoreChangedListener);
|
|
617
553
|
super.dispose();
|
|
618
554
|
}
|
|
619
|
-
|
|
555
|
+
|
|
620
556
|
@override
|
|
621
557
|
Widget build(BuildContext context) {
|
|
622
558
|
return IgnorePointer(
|
|
@@ -649,36 +585,36 @@ When the Anchor starts PK, you can mount a custom view on the other party's vide
|
|
|
649
585
|
import 'package:flutter/material.dart';
|
|
650
586
|
import 'package:atomic_x_core/atomicxcore.dart';
|
|
651
587
|
import 'package:rtc_room_engine/rtc_room_engine.dart';
|
|
652
|
-
|
|
588
|
+
|
|
653
589
|
Live streaming page with custom PK view
|
|
654
590
|
class CustomBattleLiveWidget extends StatefulWidget {
|
|
655
591
|
final String liveId;
|
|
656
|
-
|
|
592
|
+
|
|
657
593
|
const CustomBattleLiveWidget({
|
|
658
|
-
Key? key,
|
|
594
|
+
Key? key,
|
|
659
595
|
required this.liveId,
|
|
660
596
|
}) : super(key: key);
|
|
661
|
-
|
|
597
|
+
|
|
662
598
|
@override
|
|
663
599
|
State<CustomBattleLiveWidget> createState() => _CustomBattleLiveWidgetState();
|
|
664
600
|
}
|
|
665
|
-
|
|
601
|
+
|
|
666
602
|
class _CustomBattleLiveWidgetState extends State<CustomBattleLiveWidget> {
|
|
667
603
|
late LiveCoreController _controller;
|
|
668
|
-
|
|
604
|
+
|
|
669
605
|
@override
|
|
670
606
|
void initState() {
|
|
671
607
|
super.initState();
|
|
672
608
|
_controller = LiveCoreController.create();
|
|
673
609
|
_controller.setLiveID(widget.liveId);
|
|
674
610
|
}
|
|
675
|
-
|
|
611
|
+
|
|
676
612
|
@override
|
|
677
613
|
void dispose() {
|
|
678
614
|
_controller.dispose();
|
|
679
615
|
super.dispose();
|
|
680
616
|
}
|
|
681
|
-
|
|
617
|
+
|
|
682
618
|
/// Build Custom PK User View
|
|
683
619
|
Widget _buildBattleWidget(BuildContext context, TUIBattleUser battleUser) {
|
|
684
620
|
return CustomBattleUserView(
|
|
@@ -686,7 +622,7 @@ When the Anchor starts PK, you can mount a custom view on the other party's vide
|
|
|
686
622
|
battleUser: battleUser,
|
|
687
623
|
);
|
|
688
624
|
}
|
|
689
|
-
|
|
625
|
+
|
|
690
626
|
@override
|
|
691
627
|
Widget build(BuildContext context) {
|
|
692
628
|
return Scaffold(
|
|
@@ -702,72 +638,19 @@ When the Anchor starts PK, you can mount a custom view on the other party's vide
|
|
|
702
638
|
```
|
|
703
639
|
|
|
704
640
|
#### **Parameter description:**
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
<tr>
|
|
715
|
-
<td rowspan="1" colSpan="1" >`battleUser`</td>
|
|
716
|
-
|
|
717
|
-
<td rowspan="1" colSpan="1" >`TUIBattleUser`</td>
|
|
718
|
-
|
|
719
|
-
<td rowspan="1" colSpan="1" >PK user information object.</td>
|
|
720
|
-
</tr>
|
|
721
|
-
|
|
722
|
-
<tr>
|
|
723
|
-
<td rowspan="1" colSpan="1" >`battleUser.roomId`</td>
|
|
724
|
-
|
|
725
|
-
<td rowspan="1" colSpan="1" >`String`</td>
|
|
726
|
-
|
|
727
|
-
<td rowspan="1" colSpan="1" >PK room ID.</td>
|
|
728
|
-
</tr>
|
|
729
|
-
|
|
730
|
-
<tr>
|
|
731
|
-
<td rowspan="1" colSpan="1" >`battleUser.userId`</td>
|
|
732
|
-
|
|
733
|
-
<td rowspan="1" colSpan="1" >`String`</td>
|
|
734
|
-
|
|
735
|
-
<td rowspan="1" colSpan="1" >PK user ID.</td>
|
|
736
|
-
</tr>
|
|
737
|
-
|
|
738
|
-
<tr>
|
|
739
|
-
<td rowspan="1" colSpan="1" >`battleUser.userName`</td>
|
|
740
|
-
|
|
741
|
-
<td rowspan="1" colSpan="1" >`String`</td>
|
|
742
|
-
|
|
743
|
-
<td rowspan="1" colSpan="1" >PK user nickname.</td>
|
|
744
|
-
</tr>
|
|
745
|
-
|
|
746
|
-
<tr>
|
|
747
|
-
<td rowspan="1" colSpan="1" >`battleUser.avatarUrl`</td>
|
|
748
|
-
|
|
749
|
-
<td rowspan="1" colSpan="1" >`String`</td>
|
|
750
|
-
|
|
751
|
-
<td rowspan="1" colSpan="1" >PK user avatar address.</td>
|
|
752
|
-
</tr>
|
|
753
|
-
|
|
754
|
-
<tr>
|
|
755
|
-
<td rowspan="1" colSpan="1" >`battleUser.score`</td>
|
|
756
|
-
|
|
757
|
-
<td rowspan="1" colSpan="1" >`int`</td>
|
|
758
|
-
|
|
759
|
-
<td rowspan="1" colSpan="1" >PK score.</td>
|
|
760
|
-
</tr>
|
|
761
|
-
</table>
|
|
762
|
-
|
|
641
|
+
| **Parameter** | **Type** | **Note** |
|
|
642
|
+
| --- | --- | --- |
|
|
643
|
+
| `battleUser` | `TUIBattleUser` | PK user information object. |
|
|
644
|
+
| `battleUser.roomId` | `String` | PK room ID. |
|
|
645
|
+
| `battleUser.userId` | `String` | PK user ID. |
|
|
646
|
+
| `battleUser.userName` | `String` | PK user nickname. |
|
|
647
|
+
| `battleUser.avatarUrl` | `String` | PK user avatar address. |
|
|
648
|
+
| `battleUser.score` | `int` | PK score. |
|
|
763
649
|
|
|
764
650
|
### Displaying PK Status on Video Stream Image
|
|
765
651
|
|
|
766
652
|
#### **Effect**
|
|
767
653
|
|
|
768
|
-

|
|
769
|
-
|
|
770
|
-
|
|
771
654
|
#### **Implementation Method**
|
|
772
655
|
- **Step 1:** Create a custom PK global view **CustomBattleContainerView**. You can refer to the [battle_info_widget.dart](https://github.com/Tencent-RTC/TUIKit_Flutter/blob/main/live/livekit/lib/live_stream/features/decorations/battle/battle_info_widget.dart) file in the TUILiveKit open-source project to achieve the same effect.
|
|
773
656
|
|
|
@@ -776,42 +659,42 @@ When the Anchor starts PK, you can mount a custom view on the other party's vide
|
|
|
776
659
|
``` java
|
|
777
660
|
import 'package:flutter/material.dart';
|
|
778
661
|
import 'package:atomic_x_core/atomicxcore.dart';
|
|
779
|
-
|
|
662
|
+
|
|
780
663
|
Live streaming page with custom PK container view
|
|
781
664
|
class CustomBattleContainerLiveWidget extends StatefulWidget {
|
|
782
665
|
final String liveId;
|
|
783
|
-
|
|
666
|
+
|
|
784
667
|
const CustomBattleContainerLiveWidget({
|
|
785
|
-
Key? key,
|
|
668
|
+
Key? key,
|
|
786
669
|
required this.liveId,
|
|
787
670
|
}) : super(key: key);
|
|
788
|
-
|
|
671
|
+
|
|
789
672
|
@override
|
|
790
673
|
State<CustomBattleContainerLiveWidget> createState() => _CustomBattleContainerLiveWidgetState();
|
|
791
674
|
}
|
|
792
|
-
|
|
675
|
+
|
|
793
676
|
class _CustomBattleContainerLiveWidgetState extends State<CustomBattleContainerLiveWidget> {
|
|
794
677
|
late LiveCoreController _controller;
|
|
795
|
-
|
|
678
|
+
|
|
796
679
|
@override
|
|
797
680
|
void initState() {
|
|
798
681
|
super.initState();
|
|
799
682
|
_controller = LiveCoreController.create();
|
|
800
683
|
_controller.setLiveID(widget.liveId);
|
|
801
684
|
}
|
|
802
|
-
|
|
685
|
+
|
|
803
686
|
@override
|
|
804
687
|
void dispose() {
|
|
805
688
|
_controller.dispose();
|
|
806
689
|
super.dispose();
|
|
807
690
|
}
|
|
808
|
-
|
|
691
|
+
|
|
809
692
|
/// Build PK Container View
|
|
810
693
|
Widget _buildBattleContainerWidget(BuildContext context) {
|
|
811
694
|
// CustomBattleContainerView is your custom PK global view
|
|
812
695
|
return CustomBattleContainerView(liveId: widget.liveId);
|
|
813
696
|
}
|
|
814
|
-
|
|
697
|
+
|
|
815
698
|
@override
|
|
816
699
|
Widget build(BuildContext context) {
|
|
817
700
|
return Scaffold(
|
|
@@ -839,7 +722,7 @@ class FullCustomLiveWidget extends StatefulWidget {
|
|
|
839
722
|
final String liveId;
|
|
840
723
|
|
|
841
724
|
const FullCustomLiveWidget({
|
|
842
|
-
Key? key,
|
|
725
|
+
Key? key,
|
|
843
726
|
required this.liveId,
|
|
844
727
|
}) : super(key: key);
|
|
845
728
|
|
|
@@ -865,8 +748,8 @@ class _FullCustomLiveWidgetState extends State<FullCustomLiveWidget> {
|
|
|
865
748
|
|
|
866
749
|
/// Build a custom view for the connected host
|
|
867
750
|
Widget _buildCoHostWidget(
|
|
868
|
-
BuildContext context,
|
|
869
|
-
SeatFullInfo seatFullInfo,
|
|
751
|
+
BuildContext context,
|
|
752
|
+
SeatFullInfo seatFullInfo,
|
|
870
753
|
ViewLayer viewLayer,
|
|
871
754
|
) {
|
|
872
755
|
if (viewLayer == ViewLayer.foreground) {
|
|
@@ -912,178 +795,51 @@ class _FullCustomLiveWidgetState extends State<FullCustomLiveWidget> {
|
|
|
912
795
|
In the **live streamer PK scenario**, the value of gifts received by the Anchor will be linked to the PK value (for example: when the audience sends a "rocket" gift, the Anchor's PK score increases by 500 points). You can easily implement real-time score updates in the live PK scenario through our REST API.
|
|
913
796
|
|
|
914
797
|
> **Important Note:**
|
|
915
|
-
>
|
|
798
|
+
>
|
|
916
799
|
|
|
917
800
|
> The PK score system in the LiveKit backend uses pure numerical computation and cumulative mechanism. Therefore, you need to complete the PK score calculation before calling the update API based on your operational strategy and business requirement. See the following PK score calculation example:
|
|
918
|
-
>
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
<td rowspan="1" colSpan="1" >**Example**</td>
|
|
926
|
-
</tr>
|
|
927
|
-
|
|
928
|
-
<tr>
|
|
929
|
-
<td rowspan="1" colSpan="1" >Basic Gift</td>
|
|
930
|
-
|
|
931
|
-
<td rowspan="1" colSpan="1" >Gift Value × 5</td>
|
|
932
|
-
|
|
933
|
-
<td rowspan="1" colSpan="1" >10 CNY Gift → 50 Points</td>
|
|
934
|
-
</tr>
|
|
935
|
-
|
|
936
|
-
<tr>
|
|
937
|
-
<td rowspan="1" colSpan="1" >Intermediate Gift</td>
|
|
938
|
-
|
|
939
|
-
<td rowspan="1" colSpan="1" >Gift Value × 8</td>
|
|
940
|
-
|
|
941
|
-
<td rowspan="1" colSpan="1" >50 CNY Gift → 400 Points</td>
|
|
942
|
-
</tr>
|
|
943
|
-
|
|
944
|
-
<tr>
|
|
945
|
-
<td rowspan="1" colSpan="1" >Senior Gift</td>
|
|
946
|
-
|
|
947
|
-
<td rowspan="1" colSpan="1" >Gift Value × 12</td>
|
|
948
|
-
|
|
949
|
-
<td rowspan="1" colSpan="1" >100 CNY Gift → 1200 Points</td>
|
|
950
|
-
</tr>
|
|
951
|
-
|
|
952
|
-
<tr>
|
|
953
|
-
<td rowspan="1" colSpan="1" >Special Effect Gift</td>
|
|
954
|
-
|
|
955
|
-
<td rowspan="1" colSpan="1" >fixed high score</td>
|
|
956
|
-
|
|
957
|
-
<td rowspan="1" colSpan="1" >520 CNY Gift → 1314 Points</td>
|
|
958
|
-
</tr>
|
|
959
|
-
</table>
|
|
960
|
-
|
|
961
|
-
|
|
801
|
+
>
|
|
802
|
+
| **Gift Type** | **Score Calculation Rule** | **Example** |
|
|
803
|
+
| --- | --- | --- |
|
|
804
|
+
| Basic Gift | Gift Value × 5 | 10 CNY Gift → 50 Points |
|
|
805
|
+
| Intermediate Gift | Gift Value × 8 | 50 CNY Gift → 400 Points |
|
|
806
|
+
| Senior Gift | Gift Value × 12 | 100 CNY Gift → 1200 Points |
|
|
807
|
+
| Special Effect Gift | fixed high score | 520 CNY Gift → 1314 Points |
|
|
962
808
|
|
|
963
809
|
#### REST API Call Process
|
|
964
810
|
|
|
965
|
-

|
|
966
|
-
|
|
967
|
-
|
|
968
811
|
#### Key Process Description
|
|
969
812
|
1. **Obtain PK Status:**
|
|
970
813
|
|
|
971
|
-
- **Callback Configuration**: Configure
|
|
814
|
+
- **Callback Configuration**: Configure PK Status Callback to have the `LiveKit` backend actively notify your system when PK starts or ends.
|
|
972
815
|
|
|
973
|
-
- **Active Query**: Your backend can call the
|
|
816
|
+
- **Active Query**: Your backend can call the PK Status Query API at any time to check the current PK status.
|
|
974
817
|
|
|
975
818
|
2. **PK Score Calculation**: Your backend calculates the PK score increment based on your business rules.
|
|
976
819
|
|
|
977
|
-
3. **PK Score Update**: Your backend calls the
|
|
820
|
+
3. **PK Score Update**: Your backend calls the Update PK Score API to update the PK score in the LiveKit backend.
|
|
978
821
|
|
|
979
822
|
4. **LiveKit Backend Syncs to Client**: The backend automatically synchronizes the updated PK score to all clients.
|
|
980
823
|
|
|
981
|
-
|
|
982
824
|
#### Involved REST API Endpoints
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
<td rowspan="1" colSpan="1" >**Request Example**</td>
|
|
990
|
-
</tr>
|
|
991
|
-
|
|
992
|
-
<tr>
|
|
993
|
-
<td rowspan="1" colSpan="1" >Active API - Query PK Status</td>
|
|
994
|
-
|
|
995
|
-
<td rowspan="1" colSpan="1" >Check whether the current room is in PK</td>
|
|
996
|
-
|
|
997
|
-
<td rowspan="1" colSpan="1" >[Example](https://write.woa.com/document/170220847572692992)</td>
|
|
998
|
-
</tr>
|
|
999
|
-
|
|
1000
|
-
<tr>
|
|
1001
|
-
<td rowspan="1" colSpan="1" >Active API - Update PK Score</td>
|
|
1002
|
-
|
|
1003
|
-
<td rowspan="1" colSpan="1" >Update the calculated PK score</td>
|
|
1004
|
-
|
|
1005
|
-
<td rowspan="1" colSpan="1" >[Example](https://write.woa.com/document/170220034100383744)</td>
|
|
1006
|
-
</tr>
|
|
1007
|
-
|
|
1008
|
-
<tr>
|
|
1009
|
-
<td rowspan="1" colSpan="1" >Callback Configuration - PK Start Callback</td>
|
|
1010
|
-
|
|
1011
|
-
<td rowspan="1" colSpan="1" >Receive real-time notification when PK starts</td>
|
|
1012
|
-
|
|
1013
|
-
<td rowspan="1" colSpan="1" >[Example](https://write.woa.com/document/170203265552953344)</td>
|
|
1014
|
-
</tr>
|
|
1015
|
-
|
|
1016
|
-
<tr>
|
|
1017
|
-
<td rowspan="1" colSpan="1" >Callback Configuration - PK End Callback</td>
|
|
1018
|
-
|
|
1019
|
-
<td rowspan="1" colSpan="1" >Receive real-time notification when PK ends</td>
|
|
1020
|
-
|
|
1021
|
-
<td rowspan="1" colSpan="1" >[Example](https://write.woa.com/document/170221608179601408)</td>
|
|
1022
|
-
</tr>
|
|
1023
|
-
</table>
|
|
1024
|
-
|
|
825
|
+
| **API** | **Function Description** | **Request Example** |
|
|
826
|
+
| --- | --- | --- |
|
|
827
|
+
| Active API - Query PK Status | Check whether the current room is in PK | Example |
|
|
828
|
+
| Active API - Update PK Score | Update the calculated PK score | Example |
|
|
829
|
+
| Callback Configuration - PK Start Callback | Receive real-time notification when PK starts | Example |
|
|
830
|
+
| Callback Configuration - PK End Callback | Receive real-time notification when PK ends | Example |
|
|
1025
831
|
|
|
1026
832
|
## API documentation
|
|
1027
833
|
|
|
1028
834
|
For detailed information about all public interfaces, attributes, and methods of [CoHostStore](https://pub.dev/documentation/atomic_x_core/latest/api_live_co_host_store/CoHostStore-class.html) and its related classes, see the official API documentation of the [AtomicXCore](https://tencent-rtc.github.io/TUIKit_Flutter/index.html) framework. The related Store used in this guide is as follows:
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
<tr>
|
|
1039
|
-
<td rowspan="1" colSpan="1" >**LiveCoreWidget**</td>
|
|
1040
|
-
|
|
1041
|
-
<td rowspan="1" colSpan="1" >The core view component for live video stream display and interaction: responsible for stream rendering and view widget processing, supporting scenarios such as anchor live streaming, audience mic connection, and cross-room connection with other anchors.</td>
|
|
1042
|
-
|
|
1043
|
-
<td rowspan="1" colSpan="1" >[API documentation](https://tencent-rtc.github.io/TUIKit_Flutter/api_view_live_live_core_widget/LiveCoreWidget-class.html)</td>
|
|
1044
|
-
</tr>
|
|
1045
|
-
|
|
1046
|
-
<tr>
|
|
1047
|
-
<td rowspan="1" colSpan="1" >**LiveCoreController**</td>
|
|
1048
|
-
|
|
1049
|
-
<td rowspan="1" colSpan="1" >The controller of LiveCoreWidget: are used to set the live stream ID, control the preview, and perform other operations.</td>
|
|
1050
|
-
|
|
1051
|
-
<td rowspan="1" colSpan="1" >[API documentation](https://tencent-rtc.github.io/TUIKit_Flutter/api_view_live_live_core_widget/LiveCoreController-class.html)</td>
|
|
1052
|
-
</tr>
|
|
1053
|
-
|
|
1054
|
-
<tr>
|
|
1055
|
-
<td rowspan="1" colSpan="1" >**VideoWidgetBuilder**</td>
|
|
1056
|
-
|
|
1057
|
-
<td rowspan="1" colSpan="1" >Video view adapter: used for custom pendant view of video stream in scenarios such as connected host, PK user, and PK containers.</td>
|
|
1058
|
-
|
|
1059
|
-
<td rowspan="1" colSpan="1" >[API documentation](https://tencent-rtc.github.io/TUIKit_Flutter/api_view_live_live_core_widget/VideoWidgetBuilder-class.html)</td>
|
|
1060
|
-
</tr>
|
|
1061
|
-
|
|
1062
|
-
<tr>
|
|
1063
|
-
<td rowspan="1" colSpan="1" >**DeviceStore**</td>
|
|
1064
|
-
|
|
1065
|
-
<td rowspan="1" colSpan="1" >Audio/Video device control: microphone (on/off, volume), camera (on/off, switchover, video quality), screen sharing, and real-time monitoring of device status.</td>
|
|
1066
|
-
|
|
1067
|
-
<td rowspan="1" colSpan="1" >[API documentation](https://tencent-rtc.github.io/TUIKit_Flutter/api_device_device_store/DeviceStore-class.html)</td>
|
|
1068
|
-
</tr>
|
|
1069
|
-
|
|
1070
|
-
<tr>
|
|
1071
|
-
<td rowspan="1" colSpan="1" >**CoHostStore**</td>
|
|
1072
|
-
|
|
1073
|
-
<td rowspan="1" colSpan="1" >Anchor cross-room connection: supports multiple layout templates (dynamic grid, etc.), initiate/accept/reject connection, and manage interactive Anchor connections.</td>
|
|
1074
|
-
|
|
1075
|
-
<td rowspan="1" colSpan="1" >[API documentation](https://tencent-rtc.github.io/TUIKit_Flutter/api_live_co_host_store/api_live_co_host_store-library.html)</td>
|
|
1076
|
-
</tr>
|
|
1077
|
-
|
|
1078
|
-
<tr>
|
|
1079
|
-
<td rowspan="1" colSpan="1" >**BattleStore**</td>
|
|
1080
|
-
|
|
1081
|
-
<td rowspan="1" colSpan="1" >Anchor PK battle: trigger PK (duration configuration/competitor), manage PK status (started/ended), synchronize score, listen to battle results.</td>
|
|
1082
|
-
|
|
1083
|
-
<td rowspan="1" colSpan="1" >[API documentation](https://tencent-rtc.github.io/TUIKit_Flutter/api_live_battle_store/BattleStore-class.html)</td>
|
|
1084
|
-
</tr>
|
|
1085
|
-
</table>
|
|
1086
|
-
|
|
835
|
+
| **Store/Component** | **Feature Description** | **API Reference** |
|
|
836
|
+
| --- | --- | --- |
|
|
837
|
+
| **LiveCoreWidget** | The core view component for live video stream display and interaction: responsible for stream rendering and view widget processing, supporting scenarios such as anchor live streaming, audience mic connection, and cross-room connection with other anchors. | [API documentation](https://tencent-rtc.github.io/TUIKit_Flutter/api_view_live_live_core_widget/LiveCoreWidget-class.html) |
|
|
838
|
+
| **LiveCoreController** | The controller of LiveCoreWidget: are used to set the live stream ID, control the preview, and perform other operations. | [API documentation](https://tencent-rtc.github.io/TUIKit_Flutter/api_view_live_live_core_widget/LiveCoreController-class.html) |
|
|
839
|
+
| **VideoWidgetBuilder** | Video view adapter: used for custom pendant view of video stream in scenarios such as connected host, PK user, and PK containers. | [API documentation](https://tencent-rtc.github.io/TUIKit_Flutter/api_view_live_live_core_widget/VideoWidgetBuilder-class.html) |
|
|
840
|
+
| **DeviceStore** | Audio/Video device control: microphone (on/off, volume), camera (on/off, switchover, video quality), screen sharing, and real-time monitoring of device status. | [API documentation](https://tencent-rtc.github.io/TUIKit_Flutter/api_device_device_store/DeviceStore-class.html) |
|
|
841
|
+
| **CoHostStore** | Anchor cross-room connection: supports multiple layout templates (dynamic grid, etc.), initiate/accept/reject connection, and manage interactive Anchor connections. | [API documentation](https://tencent-rtc.github.io/TUIKit_Flutter/api_live_co_host_store/api_live_co_host_store-library.html) |
|
|
842
|
+
| **BattleStore** | Anchor PK battle: trigger PK (duration configuration/competitor), manage PK status (started/ended), synchronize score, listen to battle results. | [API documentation](https://tencent-rtc.github.io/TUIKit_Flutter/api_live_battle_store/BattleStore-class.html) |
|
|
1087
843
|
|
|
1088
844
|
## FAQs
|
|
1089
845
|
|
|
@@ -1092,7 +848,6 @@ For detailed information about all public interfaces, attributes, and methods of
|
|
|
1092
848
|
|
|
1093
849
|
- Check the network connection is connected. The invitation signaling has a default timeout duration of 30 seconds.
|
|
1094
850
|
|
|
1095
|
-
|
|
1096
851
|
### What to Do When Network Disconnection or App Crash Occurs during Connecting Line or PK for an Anchor?
|
|
1097
852
|
|
|
1098
853
|
**CoHostStore** and **BattleStore** have internal heartbeat and timeout detection mechanisms. If one party exits abnormally, the other will receive notifications through events such as **onCoHostUserLeft** or **onUserExitBattle**. Based on these events, you can handle the UI, for example, prompt "The other party has gone offline" and end the interaction.
|
|
@@ -1106,8 +861,6 @@ Because REST API can satisfy both the **security, real-timeness, and scalability
|
|
|
1106
861
|
|
|
1107
862
|
- **Flexible rule adaptation**: Just modify the backend configuration (such as adjusting the score corresponding to gifts or bonus points) to adapt to business changes, with no need to modify the frontend, reducing iteration cost.
|
|
1108
863
|
|
|
1109
|
-
|
|
1110
864
|
### How to Manage the Lifecycle and Event of Custom Views Added Via `VideoWidgetBuilder`?
|
|
1111
865
|
|
|
1112
866
|
**LiveCoreWidget** automatically manages the addition and removal of views returned by `coHostWidgetBuilder`, `battleWidgetBuilder`, and `battleContainerWidgetBuilder` callbacks, with no need for manual processing. If necessary to handle user interaction (such as click event) in custom views, just add the corresponding event when creating the view.
|
|
1113
|
-
|