@tencent-rtc/mcp 1.3.9 → 1.4.0
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/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/index.js +47 -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 +12 -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
|
@@ -9,14 +9,11 @@ A typical "Host Co-hosting PK" session consists of three main stages, as shown b
|
|
|
9
9
|
|
|
10
10
|
3. **PK Battle**: Both hosts compete in a PK battle, with scores updated in real time.
|
|
11
11
|
|
|
12
|
-

|
|
13
|
-
|
|
14
|
-
|
|
15
12
|
## Implementation
|
|
16
13
|
|
|
17
14
|
### Step 1: Component Integration
|
|
18
15
|
|
|
19
|
-
Refer to
|
|
16
|
+
Refer to Quick Start to integrate AtomicXCore and complete the setup of LiveCoreView.
|
|
20
17
|
|
|
21
18
|
### Step 2: Implement Cross-Room Co-hosting
|
|
22
19
|
|
|
@@ -25,7 +22,6 @@ The goal of this step is to display the video streams of two hosts in the same v
|
|
|
25
22
|
#### Inviter (Host A) Implementation
|
|
26
23
|
1. **Initiate Co-hosting Invitation**
|
|
27
24
|
|
|
28
|
-
|
|
29
25
|
When Host A selects Host B in the UI and initiates a co-hosting request, call the `requestHostConnection` method.
|
|
30
26
|
|
|
31
27
|
``` kotlin
|
|
@@ -33,28 +29,28 @@ The goal of this step is to display the video streams of two hosts in the same v
|
|
|
33
29
|
import io.trtc.tuikit.atomicxcore.api.CompletionHandler
|
|
34
30
|
import io.trtc.tuikit.atomicxcore.api.live.CoHostLayoutTemplate
|
|
35
31
|
import io.trtc.tuikit.atomicxcore.api.live.CoHostStore
|
|
36
|
-
|
|
32
|
+
|
|
37
33
|
// Host A's Activity
|
|
38
34
|
class HostAActivity : AppCompatActivity() {
|
|
39
35
|
private val liveId = "hostA_roomID" // Host A's Room ID
|
|
40
36
|
private val coHostStore = CoHostStore.create(liveId)
|
|
41
|
-
|
|
37
|
+
|
|
42
38
|
// User clicks the "Co-host" button and selects Host B
|
|
43
39
|
fun inviteHostB(targetHostLiveId: String) {
|
|
44
40
|
val layout = CoHostLayoutTemplate.HOST_DYNAMIC_GRID // Select a layout template
|
|
45
41
|
val timeout = 30 // Invitation timeout (seconds)
|
|
46
|
-
|
|
42
|
+
|
|
47
43
|
coHostStore.requestHostConnection(
|
|
48
44
|
targetHostLiveID = targetHostLiveId,
|
|
49
45
|
layoutTemplate = layout,
|
|
50
46
|
timeout = timeout,
|
|
51
47
|
extraInfo = null,
|
|
52
48
|
completion = object : CompletionHandler {
|
|
53
|
-
override fun onSuccess() {
|
|
49
|
+
override fun onSuccess() {
|
|
54
50
|
println("Co-hosting invitation sent, waiting for response...")
|
|
55
51
|
}
|
|
56
|
-
|
|
57
|
-
override fun onFailure(code: Int, desc: String) {
|
|
52
|
+
|
|
53
|
+
override fun onFailure(code: Int, desc: String) {
|
|
58
54
|
println("Invitation failed to send: $desc")
|
|
59
55
|
}
|
|
60
56
|
}
|
|
@@ -64,7 +60,6 @@ The goal of this step is to display the video streams of two hosts in the same v
|
|
|
64
60
|
```
|
|
65
61
|
2. **Listen for Invitation Result**
|
|
66
62
|
|
|
67
|
-
|
|
68
63
|
Receive Host B's response via the CoHostListener callback methods.
|
|
69
64
|
|
|
70
65
|
``` java
|
|
@@ -73,7 +68,7 @@ The goal of this step is to display the video streams of two hosts in the same v
|
|
|
73
68
|
import io.trtc.tuikit.atomicxcore.api.live.CoHostListener
|
|
74
69
|
import io.trtc.tuikit.atomicxcore.api.live.CoHostStore
|
|
75
70
|
import io.trtc.tuikit.atomicxcore.api.live.SeatUserInfo
|
|
76
|
-
|
|
71
|
+
|
|
77
72
|
class HostAActivity : AppCompatActivity() {
|
|
78
73
|
private val liveId = "hostA_roomID" // Host A's Room ID
|
|
79
74
|
private val coHostStore = CoHostStore.create(liveId)
|
|
@@ -81,20 +76,20 @@ The goal of this step is to display the video streams of two hosts in the same v
|
|
|
81
76
|
override fun onCoHostRequestAccepted(invitee: SeatUserInfo) {
|
|
82
77
|
println("Host ${invitee.userName} accepted your co-hosting invitation")
|
|
83
78
|
}
|
|
84
|
-
|
|
79
|
+
|
|
85
80
|
override fun onCoHostRequestRejected(invitee: SeatUserInfo) {
|
|
86
81
|
println("Host ${invitee.userName} rejected your invitation")
|
|
87
82
|
}
|
|
88
|
-
|
|
89
|
-
override fun onCoHostRequestTimeout(inviter: SeatUserInfo, invitee: SeatUserInfo) {
|
|
83
|
+
|
|
84
|
+
override fun onCoHostRequestTimeout(inviter: SeatUserInfo, invitee: SeatUserInfo) {
|
|
90
85
|
println("Invitation timed out, no response received")
|
|
91
86
|
}
|
|
92
87
|
}
|
|
93
|
-
|
|
88
|
+
|
|
94
89
|
override fun onCreate(savedInstanceState: Bundle?) {
|
|
95
90
|
super.onCreate(savedInstanceState)
|
|
96
91
|
// ... initialization code ...
|
|
97
|
-
|
|
92
|
+
|
|
98
93
|
// Initialize CoHostStore
|
|
99
94
|
coHostStore.addCoHostListener(coHostListener)
|
|
100
95
|
}
|
|
@@ -104,7 +99,6 @@ The goal of this step is to display the video streams of two hosts in the same v
|
|
|
104
99
|
#### Invitee (Host B) Implementation
|
|
105
100
|
1. **Receive Co-hosting Invitation**
|
|
106
101
|
|
|
107
|
-
|
|
108
102
|
Host B listens for invitations from Host A via `CoHostListener`.
|
|
109
103
|
|
|
110
104
|
``` kotlin
|
|
@@ -112,12 +106,12 @@ The goal of this step is to display the video streams of two hosts in the same v
|
|
|
112
106
|
import io.trtc.tuikit.atomicxcore.api.live.CoHostListener
|
|
113
107
|
import io.trtc.tuikit.atomicxcore.api.live.CoHostStore
|
|
114
108
|
import io.trtc.tuikit.atomicxcore.api.live.SeatUserInfo
|
|
115
|
-
|
|
109
|
+
|
|
116
110
|
// Host B's Activity
|
|
117
111
|
class HostBActivity : AppCompatActivity() {
|
|
118
112
|
private val liveId = "hostB_roomID" // Host B's Room ID
|
|
119
113
|
private val coHostStore = CoHostStore.create(liveId)
|
|
120
|
-
|
|
114
|
+
|
|
121
115
|
private val coHostListener = object : CoHostListener() {
|
|
122
116
|
override fun onCoHostRequestReceived(inviter: SeatUserInfo, extensionInfo: String) {
|
|
123
117
|
println("Received co-hosting invitation from Host ${inviter.userName}")
|
|
@@ -129,7 +123,6 @@ The goal of this step is to display the video streams of two hosts in the same v
|
|
|
129
123
|
```
|
|
130
124
|
2. **Respond to Co-hosting Invitation**
|
|
131
125
|
|
|
132
|
-
|
|
133
126
|
After Host B receives the invitation, prompt for “Accept” or “Reject” and call the appropriate method:
|
|
134
127
|
|
|
135
128
|
``` kotlin
|
|
@@ -137,7 +130,7 @@ The goal of this step is to display the video streams of two hosts in the same v
|
|
|
137
130
|
fun acceptInvitation(fromHostLiveId: String) {
|
|
138
131
|
coHostStore.acceptHostConnection(fromHostLiveID = fromHostLiveId, completion = null)
|
|
139
132
|
}
|
|
140
|
-
|
|
133
|
+
|
|
141
134
|
fun rejectInvitation(fromHostLiveId: String) {
|
|
142
135
|
coHostStore.rejectHostConnection(fromHostLiveID = fromHostLiveId, completion = null)
|
|
143
136
|
}
|
|
@@ -150,7 +143,6 @@ After a successful co-hosting connection, either host can initiate a PK. Use [Ba
|
|
|
150
143
|
#### Challenger (e.g., Host A) Implementation
|
|
151
144
|
1. **Initiate PK Challenge**
|
|
152
145
|
|
|
153
|
-
|
|
154
146
|
When Host A clicks the "PK" button, call the `requestBattle` method.
|
|
155
147
|
|
|
156
148
|
``` kotlin
|
|
@@ -158,7 +150,7 @@ After a successful co-hosting connection, either host can initiate a PK. Use [Ba
|
|
|
158
150
|
class HostAActivity : AppCompatActivity() {
|
|
159
151
|
private val liveId = "hostA_roomID" // Host A's Room ID
|
|
160
152
|
private val battleStore = BattleStore.create(liveId)
|
|
161
|
-
|
|
153
|
+
|
|
162
154
|
fun startPK(opponentUserId: String) {
|
|
163
155
|
val config = BattleConfig(duration = 300) // PK lasts 5 minutes
|
|
164
156
|
battleStore.requestBattle(
|
|
@@ -172,7 +164,6 @@ After a successful co-hosting connection, either host can initiate a PK. Use [Ba
|
|
|
172
164
|
```
|
|
173
165
|
2. **Listen for PK Status**
|
|
174
166
|
|
|
175
|
-
|
|
176
167
|
Use `BattleListener` to monitor key events such as the start and end of PK.
|
|
177
168
|
|
|
178
169
|
``` java
|
|
@@ -180,7 +171,7 @@ After a successful co-hosting connection, either host can initiate a PK. Use [Ba
|
|
|
180
171
|
class HostAActivity : AppCompatActivity() {
|
|
181
172
|
private val liveId = "hostA_roomID" // Host A's Room ID
|
|
182
173
|
private val battleStore = BattleStore.create(liveId)
|
|
183
|
-
|
|
174
|
+
|
|
184
175
|
private val battleListener = object : BattleListener() {
|
|
185
176
|
override fun onBattleStarted(
|
|
186
177
|
battleInfo: BattleInfo,
|
|
@@ -189,12 +180,12 @@ After a successful co-hosting connection, either host can initiate a PK. Use [Ba
|
|
|
189
180
|
) {
|
|
190
181
|
println("PK started")
|
|
191
182
|
}
|
|
192
|
-
|
|
183
|
+
|
|
193
184
|
override fun onBattleEnded(battleInfo: BattleInfo, reason: BattleEndedReason?) {
|
|
194
185
|
println("PK ended")
|
|
195
186
|
}
|
|
196
187
|
}
|
|
197
|
-
|
|
188
|
+
|
|
198
189
|
override fun onCreate(savedInstanceState: Bundle?) {
|
|
199
190
|
super.onCreate(savedInstanceState)
|
|
200
191
|
// ... other initialization code ...
|
|
@@ -206,7 +197,6 @@ After a successful co-hosting connection, either host can initiate a PK. Use [Ba
|
|
|
206
197
|
#### Opponent (Host B) Implementation
|
|
207
198
|
1. **Receive PK Challenge**
|
|
208
199
|
|
|
209
|
-
|
|
210
200
|
Listen for PK invitations via `BattleListener`.
|
|
211
201
|
|
|
212
202
|
``` kotlin
|
|
@@ -214,7 +204,7 @@ After a successful co-hosting connection, either host can initiate a PK. Use [Ba
|
|
|
214
204
|
class HostBActivity : AppCompatActivity() {
|
|
215
205
|
private val liveId = "hostB_roomID" // Host B's Room ID
|
|
216
206
|
private val battleStore = BattleStore.create(liveId)
|
|
217
|
-
|
|
207
|
+
|
|
218
208
|
private val battleListener = object : BattleListener() {
|
|
219
209
|
override fun onBattleRequestReceived(battleID: String, inviter: SeatUserInfo, invitee: SeatUserInfo) {
|
|
220
210
|
println("Received PK challenge from Host ${inviter.userName}")
|
|
@@ -222,7 +212,7 @@ After a successful co-hosting connection, either host can initiate a PK. Use [Ba
|
|
|
222
212
|
// showPKChallengeDialog(battleID, inviter)
|
|
223
213
|
}
|
|
224
214
|
}
|
|
225
|
-
|
|
215
|
+
|
|
226
216
|
override fun onCreate(savedInstanceState: Bundle?) {
|
|
227
217
|
super.onCreate(savedInstanceState)
|
|
228
218
|
// ... other initialization code ...
|
|
@@ -232,7 +222,6 @@ After a successful co-hosting connection, either host can initiate a PK. Use [Ba
|
|
|
232
222
|
```
|
|
233
223
|
2. **Respond to PK Challenge**
|
|
234
224
|
|
|
235
|
-
|
|
236
225
|
Prompt Host B for “Accept” or “Reject” and call the corresponding method:
|
|
237
226
|
|
|
238
227
|
``` kotlin
|
|
@@ -241,7 +230,7 @@ After a successful co-hosting connection, either host can initiate a PK. Use [Ba
|
|
|
241
230
|
fun acceptPK(battleId: String) {
|
|
242
231
|
battleStore.acceptBattle(battleID = battleId, completion = null)
|
|
243
232
|
}
|
|
244
|
-
|
|
233
|
+
|
|
245
234
|
// User clicks "Reject Challenge"
|
|
246
235
|
fun rejectPK(battleId: String) {
|
|
247
236
|
battleStore.rejectBattle(battleID = battleId, completion = null)
|
|
@@ -253,12 +242,10 @@ After a successful co-hosting connection, either host can initiate a PK. Use [Ba
|
|
|
253
242
|
After the PK session, end the PK and disconnect co-hosting in sequence.
|
|
254
243
|
1. **End PK Battle**
|
|
255
244
|
|
|
256
|
-
|
|
257
245
|
PK typically ends automatically when the timer expires, but hosts can also end PK early. Use `exitBattle`:
|
|
258
|
-
|
|
259
246
|
|
|
260
247
|
> **Note****:**After PK ends, both hosts remain connected (side-by-side video streams). Only the PK progress bar and score panel are removed.
|
|
261
|
-
>
|
|
248
|
+
>
|
|
262
249
|
|
|
263
250
|
``` java
|
|
264
251
|
fun stopPK(battleId: String) {
|
|
@@ -275,7 +262,6 @@ After the PK session, end the PK and disconnect co-hosting in sequence.
|
|
|
275
262
|
```
|
|
276
263
|
2. **Disconnect Cross-room Co-hosting**
|
|
277
264
|
|
|
278
|
-
|
|
279
265
|
To return to solo live streaming, call `exitHostConnection`:
|
|
280
266
|
|
|
281
267
|
``` java
|
|
@@ -293,7 +279,6 @@ After the PK session, end the PK and disconnect co-hosting in sequence.
|
|
|
293
279
|
```
|
|
294
280
|
3. **Listen for End Events**
|
|
295
281
|
|
|
296
|
-
|
|
297
282
|
Handle UI cleanup in event listeners for consistency:
|
|
298
283
|
|
|
299
284
|
``` java
|
|
@@ -304,7 +289,7 @@ After the PK session, end the PK and disconnect co-hosting in sequence.
|
|
|
304
289
|
// runOnUiThread { removeBattleUI() }
|
|
305
290
|
}
|
|
306
291
|
}
|
|
307
|
-
|
|
292
|
+
|
|
308
293
|
private val coHostListener = object : CoHostListener() {
|
|
309
294
|
override fun onCoHostUserLeft(userInfo: SeatUserInfo) {
|
|
310
295
|
println("Host ${userInfo.userName} has left the co-hosting session")
|
|
@@ -316,10 +301,7 @@ After the PK session, end the PK and disconnect co-hosting in sequence.
|
|
|
316
301
|
|
|
317
302
|
### Run and Test
|
|
318
303
|
|
|
319
|
-
After integrating the above features, use Host A and Host B to test the corresponding operations. The runtime effect is shown below. For UI customization, see
|
|
320
|
-
|
|
321
|
-

|
|
322
|
-
|
|
304
|
+
After integrating the above features, use Host A and Host B to test the corresponding operations. The runtime effect is shown below. For UI customization, see Refine UI Details.
|
|
323
305
|
|
|
324
306
|
## Refine UI Details
|
|
325
307
|
|
|
@@ -329,18 +311,14 @@ Use the slot capability in the `VideoViewAdapter` interface to overlay custom vi
|
|
|
329
311
|
|
|
330
312
|
#### Implementation Example
|
|
331
313
|
|
|
332
|
-

|
|
333
|
-
|
|
334
|
-
|
|
335
314
|
#### Implementation
|
|
336
315
|
- **Step 1**: Create a foreground view `CustomSeatView` to display user information above the video stream.
|
|
337
|
-
|
|
338
316
|
|
|
339
317
|
> **Note:**
|
|
340
|
-
>
|
|
318
|
+
>
|
|
341
319
|
|
|
342
320
|
> For a complete implementation, refer to the [widgets](https://github.com/Tencent-RTC/TUIKit_Android/tree/main/live/tuilivekit/src/main/java/com/trtc/uikit/livekit/features/anchorboardcast/view/cohost/widgets) directory in the open-source TUILiveKit project.
|
|
343
|
-
>
|
|
321
|
+
>
|
|
344
322
|
|
|
345
323
|
``` kotlin
|
|
346
324
|
import android.content.Context
|
|
@@ -348,26 +326,26 @@ Use the slot capability in the `VideoViewAdapter` interface to overlay custom vi
|
|
|
348
326
|
import android.view.Gravity
|
|
349
327
|
import android.widget.LinearLayout
|
|
350
328
|
import android.widget.TextView
|
|
351
|
-
|
|
329
|
+
|
|
352
330
|
// Custom user information overlay view (Foreground)
|
|
353
331
|
class CustomSeatView(context: Context) : LinearLayout(context) {
|
|
354
332
|
private val nameLabel: TextView
|
|
355
|
-
|
|
333
|
+
|
|
356
334
|
init {
|
|
357
335
|
orientation = VERTICAL
|
|
358
336
|
setBackgroundColor(Color.parseColor("#80000000")) // Semi-transparent black background
|
|
359
|
-
|
|
337
|
+
|
|
360
338
|
nameLabel = TextView(context).apply {
|
|
361
339
|
setTextColor(Color.WHITE)
|
|
362
340
|
textSize = 14f
|
|
363
341
|
gravity = Gravity.CENTER
|
|
364
342
|
}
|
|
365
|
-
|
|
343
|
+
|
|
366
344
|
addView(nameLabel)
|
|
367
345
|
val layoutParams = nameLabel.layoutParams as LayoutParams
|
|
368
346
|
layoutParams.setMargins(5, 0, 5, 5)
|
|
369
347
|
}
|
|
370
|
-
|
|
348
|
+
|
|
371
349
|
fun setUserName(userName: String) {
|
|
372
350
|
nameLabel.text = userName
|
|
373
351
|
}
|
|
@@ -381,12 +359,12 @@ Use the slot capability in the `VideoViewAdapter` interface to overlay custom vi
|
|
|
381
359
|
import androidx.appcompat.app.AppCompatActivity
|
|
382
360
|
import io.trtc.tuikit.atomicxcore.api.ViewLayer
|
|
383
361
|
import io.trtc.tuikit.atomicxcore.api.VideoViewAdapter
|
|
384
|
-
|
|
362
|
+
|
|
385
363
|
// 1. In your Activity, implement the VideoViewAdapter interface
|
|
386
364
|
class YourActivity : AppCompatActivity(), VideoViewAdapter {
|
|
387
|
-
|
|
365
|
+
|
|
388
366
|
// ... Other code ...
|
|
389
|
-
|
|
367
|
+
|
|
390
368
|
// 2. Fully implement the interface method to handle both view layers
|
|
391
369
|
override fun createCoHostView(coHostUser: TUIRoomDefine.SeatFullInfo?, viewLayer: ViewLayer?): View? {
|
|
392
370
|
val seatInfo = coHostUser ?: return null
|
|
@@ -394,7 +372,7 @@ Use the slot capability in the `VideoViewAdapter` interface to overlay custom vi
|
|
|
394
372
|
if (userId.isNullOrEmpty()) {
|
|
395
373
|
return null
|
|
396
374
|
}
|
|
397
|
-
|
|
375
|
+
|
|
398
376
|
return when (viewLayer) {
|
|
399
377
|
ViewLayer.FOREGROUND -> {
|
|
400
378
|
val seatView = CustomSeatView(this)
|
|
@@ -419,12 +397,12 @@ Use the slot capability in the `VideoViewAdapter` interface to overlay custom vi
|
|
|
419
397
|
import androidx.appcompat.app.AppCompatActivity
|
|
420
398
|
import io.trtc.tuikit.atomicxcore.api.ViewLayer
|
|
421
399
|
import io.trtc.tuikit.atomicxcore.api.VideoViewAdapter
|
|
422
|
-
|
|
400
|
+
|
|
423
401
|
// 1. In your Activity, implement the VideoViewAdapter interface
|
|
424
402
|
class YourActivity : AppCompatActivity(), VideoViewAdapter {
|
|
425
|
-
|
|
403
|
+
|
|
426
404
|
// ... Other code ...
|
|
427
|
-
|
|
405
|
+
|
|
428
406
|
// 2. Fully implement the interface method to handle both view layers
|
|
429
407
|
override fun createCoHostView(coHostUser: TUIRoomDefine.SeatFullInfo?, viewLayer: ViewLayer?): View? {
|
|
430
408
|
val seatInfo = coHostUser ?: return null
|
|
@@ -432,7 +410,7 @@ Use the slot capability in the `VideoViewAdapter` interface to overlay custom vi
|
|
|
432
410
|
if (userId.isNullOrEmpty()) {
|
|
433
411
|
return null
|
|
434
412
|
}
|
|
435
|
-
|
|
413
|
+
|
|
436
414
|
return when (viewLayer) {
|
|
437
415
|
ViewLayer.FOREGROUND -> {
|
|
438
416
|
val seatView = CustomSeatView(this)
|
|
@@ -451,72 +429,15 @@ Use the slot capability in the `VideoViewAdapter` interface to overlay custom vi
|
|
|
451
429
|
```
|
|
452
430
|
|
|
453
431
|
#### Parameter Description:
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
<tr>
|
|
464
|
-
<td rowspan="1" colSpan="1" >`seatInfo`</td>
|
|
465
|
-
|
|
466
|
-
<td rowspan="1" colSpan="1" >`SeatFullInfo?`</td>
|
|
467
|
-
|
|
468
|
-
<td rowspan="1" colSpan="1" >Seat information object containing user details</td>
|
|
469
|
-
</tr>
|
|
470
|
-
|
|
471
|
-
<tr>
|
|
472
|
-
<td rowspan="1" colSpan="1" >`seatInfo.userId`</td>
|
|
473
|
-
|
|
474
|
-
<td rowspan="1" colSpan="1" >`String?`</td>
|
|
475
|
-
|
|
476
|
-
<td rowspan="1" colSpan="1" >User ID on the seat</td>
|
|
477
|
-
</tr>
|
|
478
|
-
|
|
479
|
-
<tr>
|
|
480
|
-
<td rowspan="1" colSpan="1" >`seatInfo.userName`</td>
|
|
481
|
-
|
|
482
|
-
<td rowspan="1" colSpan="1" >`String?`</td>
|
|
483
|
-
|
|
484
|
-
<td rowspan="1" colSpan="1" >User nickname on the seat</td>
|
|
485
|
-
</tr>
|
|
486
|
-
|
|
487
|
-
<tr>
|
|
488
|
-
<td rowspan="1" colSpan="1" >`seatInfo.userAvatar`</td>
|
|
489
|
-
|
|
490
|
-
<td rowspan="1" colSpan="1" >`String?`</td>
|
|
491
|
-
|
|
492
|
-
<td rowspan="1" colSpan="1" >User avatar URL</td>
|
|
493
|
-
</tr>
|
|
494
|
-
|
|
495
|
-
<tr>
|
|
496
|
-
<td rowspan="1" colSpan="1" >`seatInfo.userMicrophoneStatus`</td>
|
|
497
|
-
|
|
498
|
-
<td rowspan="1" colSpan="1" >`DeviceStatus`</td>
|
|
499
|
-
|
|
500
|
-
<td rowspan="1" colSpan="1" >User microphone status</td>
|
|
501
|
-
</tr>
|
|
502
|
-
|
|
503
|
-
<tr>
|
|
504
|
-
<td rowspan="1" colSpan="1" >`seatInfo.userCameraStatus`</td>
|
|
505
|
-
|
|
506
|
-
<td rowspan="1" colSpan="1" >`DeviceStatus`</td>
|
|
507
|
-
|
|
508
|
-
<td rowspan="1" colSpan="1" >User camera status</td>
|
|
509
|
-
</tr>
|
|
510
|
-
|
|
511
|
-
<tr>
|
|
512
|
-
<td rowspan="1" colSpan="1" >`viewLayer`</td>
|
|
513
|
-
|
|
514
|
-
<td rowspan="1" colSpan="1" >`ViewLayer`</td>
|
|
515
|
-
|
|
516
|
-
<td rowspan="1" colSpan="1" >View layer enum<br>- `FOREGROUND`: Foreground widget view, always displayed on top of the video<br>- `BACKGROUND`: Background widget view, under the foreground view, displayed only when the user has no video stream (e.g., camera off), typically used for the user's default avatar or a placeholder image</td>
|
|
517
|
-
</tr>
|
|
518
|
-
</table>
|
|
519
|
-
|
|
432
|
+
| **Parameter** | **Type** | **Description** |
|
|
433
|
+
| --- | --- | --- |
|
|
434
|
+
| `seatInfo` | `SeatFullInfo?` | Seat information object containing user details |
|
|
435
|
+
| `seatInfo.userId` | `String?` | User ID on the seat |
|
|
436
|
+
| `seatInfo.userName` | `String?` | User nickname on the seat |
|
|
437
|
+
| `seatInfo.userAvatar` | `String?` | User avatar URL |
|
|
438
|
+
| `seatInfo.userMicrophoneStatus` | `DeviceStatus` | User microphone status |
|
|
439
|
+
| `seatInfo.userCameraStatus` | `DeviceStatus` | User camera status |
|
|
440
|
+
| `viewLayer` | `ViewLayer` | View layer enum<br>- `FOREGROUND`: Foreground widget view, always displayed on top of the video<br>- `BACKGROUND`: Background widget view, under the foreground view, displayed only when the user has no video stream (e.g., camera off), typically used for the user's default avatar or a placeholder image |
|
|
520
441
|
|
|
521
442
|
### Displaying PK User Score on Video View
|
|
522
443
|
|
|
@@ -524,9 +445,6 @@ When the host starts a PK, you can attach a custom view to the opponent's video
|
|
|
524
445
|
|
|
525
446
|
#### Implementation Example
|
|
526
447
|
|
|
527
|
-

|
|
528
|
-
|
|
529
|
-
|
|
530
448
|
#### Implementation
|
|
531
449
|
- **Step 1**: Create a custom PK user view. For a complete implementation, see [BattleMemberInfoView.kt](https://github.com/Tencent-RTC/TUIKit_Android/blob/main/live/tuilivekit/src/main/java/com/trtc/uikit/livekit/features/anchorboardcast/view/battle/widgets/BattleMemberInfoView.kt) in the open-source TUILiveKit project.
|
|
532
450
|
|
|
@@ -541,54 +459,54 @@ When the host starts a PK, you can attach a custom view to the opponent's video
|
|
|
541
459
|
import kotlinx.coroutines.CoroutineScope
|
|
542
460
|
import kotlinx.coroutines.Dispatchers
|
|
543
461
|
import kotlinx.coroutines.launch
|
|
544
|
-
|
|
462
|
+
|
|
545
463
|
// Custom PK User View
|
|
546
464
|
class CustomBattleUserView(
|
|
547
465
|
context: Context,
|
|
548
466
|
private val liveId: String,
|
|
549
467
|
private val battleUser: BattleUser
|
|
550
468
|
) : LinearLayout(context) {
|
|
551
|
-
|
|
469
|
+
|
|
552
470
|
private lateinit var scoreView: LinearLayout
|
|
553
471
|
private lateinit var scoreLabel: TextView
|
|
554
472
|
private val battleStore: BattleStore
|
|
555
|
-
|
|
473
|
+
|
|
556
474
|
init {
|
|
557
475
|
orientation = VERTICAL
|
|
558
476
|
gravity = Gravity.BOTTOM or Gravity.END
|
|
559
477
|
setBackgroundColor(Color.TRANSPARENT)
|
|
560
478
|
isClickable = false
|
|
561
|
-
|
|
479
|
+
|
|
562
480
|
battleStore = BattleStore.create(liveId)
|
|
563
|
-
|
|
481
|
+
|
|
564
482
|
// UI Layout
|
|
565
483
|
setupUI()
|
|
566
484
|
// Subscribe to score changes
|
|
567
485
|
subscribeBattleState()
|
|
568
486
|
}
|
|
569
|
-
|
|
487
|
+
|
|
570
488
|
private fun setupUI() {
|
|
571
489
|
scoreView = LinearLayout(context).apply {
|
|
572
490
|
setBackgroundColor(Color.parseColor("#66000000"))
|
|
573
491
|
orientation = VERTICAL
|
|
574
492
|
gravity = Gravity.CENTER
|
|
575
493
|
}
|
|
576
|
-
|
|
494
|
+
|
|
577
495
|
scoreLabel = TextView(context).apply {
|
|
578
496
|
setTextColor(Color.WHITE)
|
|
579
497
|
textSize = 14f
|
|
580
498
|
gravity = Gravity.CENTER
|
|
581
499
|
}
|
|
582
|
-
|
|
500
|
+
|
|
583
501
|
scoreView.addView(scoreLabel)
|
|
584
502
|
addView(scoreView)
|
|
585
|
-
|
|
503
|
+
|
|
586
504
|
val layoutParams = scoreView.layoutParams as LayoutParams
|
|
587
505
|
layoutParams.width = LayoutParams.WRAP_CONTENT
|
|
588
506
|
layoutParams.height = 48 // 24dp
|
|
589
507
|
layoutParams.setMargins(0, 0, 10, 10)
|
|
590
508
|
}
|
|
591
|
-
|
|
509
|
+
|
|
592
510
|
// Subscribe to PK score changes
|
|
593
511
|
private fun subscribeBattleState() {
|
|
594
512
|
CoroutineScope(Dispatchers.Main).launch {
|
|
@@ -606,83 +524,30 @@ When the host starts a PK, you can attach a custom view to the opponent's video
|
|
|
606
524
|
``` kotlin
|
|
607
525
|
// 1. Have your Activity implement the VideoViewAdapter interface
|
|
608
526
|
class YourActivity : AppCompatActivity(), VideoViewAdapter {
|
|
609
|
-
|
|
527
|
+
|
|
610
528
|
override fun createBattleView(battleUser: BattleUser?): View? {
|
|
611
529
|
battleUser ?: return null
|
|
612
530
|
// CustomBattleUserView is your custom PK user information view
|
|
613
531
|
return CustomBattleUserView(this, liveId, battleUser)
|
|
614
532
|
}
|
|
615
|
-
|
|
533
|
+
|
|
616
534
|
}
|
|
617
535
|
```
|
|
618
536
|
|
|
619
537
|
#### Parameter Description:
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
<tr>
|
|
630
|
-
<td rowspan="1" colSpan="1" >`battleUser`</td>
|
|
631
|
-
|
|
632
|
-
<td rowspan="1" colSpan="1" >`BattleUser?`</td>
|
|
633
|
-
|
|
634
|
-
<td rowspan="1" colSpan="1" >PK user info object</td>
|
|
635
|
-
</tr>
|
|
636
|
-
|
|
637
|
-
<tr>
|
|
638
|
-
<td rowspan="1" colSpan="1" >`battleUser.roomId`</td>
|
|
639
|
-
|
|
640
|
-
<td rowspan="1" colSpan="1" >`String`</td>
|
|
641
|
-
|
|
642
|
-
<td rowspan="1" colSpan="1" >PK room ID</td>
|
|
643
|
-
</tr>
|
|
644
|
-
|
|
645
|
-
<tr>
|
|
646
|
-
<td rowspan="1" colSpan="1" >`battleUser.userId`</td>
|
|
647
|
-
|
|
648
|
-
<td rowspan="1" colSpan="1" >`String`</td>
|
|
649
|
-
|
|
650
|
-
<td rowspan="1" colSpan="1" >PK user ID</td>
|
|
651
|
-
</tr>
|
|
652
|
-
|
|
653
|
-
<tr>
|
|
654
|
-
<td rowspan="1" colSpan="1" >`battleUser.userName`</td>
|
|
655
|
-
|
|
656
|
-
<td rowspan="1" colSpan="1" >`String`</td>
|
|
657
|
-
|
|
658
|
-
<td rowspan="1" colSpan="1" >PK user nickname</td>
|
|
659
|
-
</tr>
|
|
660
|
-
|
|
661
|
-
<tr>
|
|
662
|
-
<td rowspan="1" colSpan="1" >`battleUser.avatarUrl`</td>
|
|
663
|
-
|
|
664
|
-
<td rowspan="1" colSpan="1" >`String`</td>
|
|
665
|
-
|
|
666
|
-
<td rowspan="1" colSpan="1" >PK user avatar URL</td>
|
|
667
|
-
</tr>
|
|
668
|
-
|
|
669
|
-
<tr>
|
|
670
|
-
<td rowspan="1" colSpan="1" >`battleUser.score`</td>
|
|
671
|
-
|
|
672
|
-
<td rowspan="1" colSpan="1" >`UInt`</td>
|
|
673
|
-
|
|
674
|
-
<td rowspan="1" colSpan="1" >PK score</td>
|
|
675
|
-
</tr>
|
|
676
|
-
</table>
|
|
677
|
-
|
|
538
|
+
| **Parameter** | **Type** | **Description** |
|
|
539
|
+
| --- | --- | --- |
|
|
540
|
+
| `battleUser` | `BattleUser?` | PK user info object |
|
|
541
|
+
| `battleUser.roomId` | `String` | PK room ID |
|
|
542
|
+
| `battleUser.userId` | `String` | PK user ID |
|
|
543
|
+
| `battleUser.userName` | `String` | PK user nickname |
|
|
544
|
+
| `battleUser.avatarUrl` | `String` | PK user avatar URL |
|
|
545
|
+
| `battleUser.score` | `UInt` | PK score |
|
|
678
546
|
|
|
679
547
|
### Displaying PK Status on Video Stream
|
|
680
548
|
|
|
681
549
|
#### Implementation Example
|
|
682
550
|
|
|
683
|
-

|
|
684
|
-
|
|
685
|
-
|
|
686
551
|
#### Implementation
|
|
687
552
|
- **Step 1**: Create a custom PK global view (CustomBattleContainerView). For a complete implementation, see [BattleInfoView.kt](https://github.com/Tencent-RTC/TUIKit_Android/blob/main/live/tuilivekit/src/main/java/com/trtc/uikit/livekit/features/anchorboardcast/view/battle/widgets/BattleInfoView.kt) in the open-source TUILiveKit project.
|
|
688
553
|
|
|
@@ -704,162 +569,49 @@ When the host starts a PK, you can attach a custom view to the opponent's video
|
|
|
704
569
|
In typical** live host PK scenarios,** the value of gifts received by the host is linked to the PK score (for example, when a viewer sends a "Rocket" gift, the host's PK score increases by 500 points). You can implement real-time PK score updates using our REST API.
|
|
705
570
|
|
|
706
571
|
> **Note:**
|
|
707
|
-
>
|
|
572
|
+
>
|
|
708
573
|
|
|
709
574
|
> The PK score system in the `LiveKit` backend uses pure numeric calculation and accumulation. You must calculate the PK score according to your own business logic before calling the update API. See the following PK score calculation examples:
|
|
710
|
-
>
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
<td rowspan="1" colSpan="1" >Example</td>
|
|
718
|
-
</tr>
|
|
719
|
-
|
|
720
|
-
<tr>
|
|
721
|
-
<td rowspan="1" colSpan="1" >Basic Gift</td>
|
|
722
|
-
|
|
723
|
-
<td rowspan="1" colSpan="1" >Gift value × 5</td>
|
|
724
|
-
|
|
725
|
-
<td rowspan="1" colSpan="1" >10 RMB gift → 50 points</td>
|
|
726
|
-
</tr>
|
|
727
|
-
|
|
728
|
-
<tr>
|
|
729
|
-
<td rowspan="1" colSpan="1" >Intermediate Gift</td>
|
|
730
|
-
|
|
731
|
-
<td rowspan="1" colSpan="1" >Gift value × 8</td>
|
|
732
|
-
|
|
733
|
-
<td rowspan="1" colSpan="1" >50 RMB gift → 400 points</td>
|
|
734
|
-
</tr>
|
|
735
|
-
|
|
736
|
-
<tr>
|
|
737
|
-
<td rowspan="1" colSpan="1" >Advanced Gift</td>
|
|
738
|
-
|
|
739
|
-
<td rowspan="1" colSpan="1" >Gift value × 12</td>
|
|
740
|
-
|
|
741
|
-
<td rowspan="1" colSpan="1" >100 RMB gift → 1200 points</td>
|
|
742
|
-
</tr>
|
|
743
|
-
|
|
744
|
-
<tr>
|
|
745
|
-
<td rowspan="1" colSpan="1" >Special Effect Gift</td>
|
|
746
|
-
|
|
747
|
-
<td rowspan="1" colSpan="1" >Fixed high score</td>
|
|
748
|
-
|
|
749
|
-
<td rowspan="1" colSpan="1" >520 RMB gift → 1314 points</td>
|
|
750
|
-
</tr>
|
|
751
|
-
</table>
|
|
752
|
-
|
|
753
|
-
|
|
575
|
+
>
|
|
576
|
+
| Gift Type | Score Calculation Rule | Example |
|
|
577
|
+
| --- | --- | --- |
|
|
578
|
+
| Basic Gift | Gift value × 5 | 10 RMB gift → 50 points |
|
|
579
|
+
| Intermediate Gift | Gift value × 8 | 50 RMB gift → 400 points |
|
|
580
|
+
| Advanced Gift | Gift value × 12 | 100 RMB gift → 1200 points |
|
|
581
|
+
| Special Effect Gift | Fixed high score | 520 RMB gift → 1314 points |
|
|
754
582
|
|
|
755
583
|
#### REST API Call Flow
|
|
756
584
|
|
|
757
|
-

|
|
758
|
-
|
|
759
|
-
|
|
760
585
|
#### Key Process Description
|
|
761
586
|
1. **Obtain PK Status:**
|
|
762
587
|
|
|
763
|
-
- **Callback Configuration**: Configure
|
|
588
|
+
- **Callback Configuration**: Configure PK Status Callback to have the `LiveKit` backend actively notify your system when PK starts or ends.
|
|
764
589
|
|
|
765
|
-
- **Active Query**: Your backend can call the
|
|
590
|
+
- **Active Query**: Your backend can call the PK Status Query API at any time to check the current PK status.
|
|
766
591
|
|
|
767
592
|
2. **PK Score Calculation**: Your backend calculates the PK score increment based on your business rules.
|
|
768
593
|
|
|
769
|
-
3. **PK Score Update**: Your backend calls the
|
|
594
|
+
3. **PK Score Update**: Your backend calls the Update PK Score API to update the PK score in the LiveKit backend.
|
|
770
595
|
|
|
771
596
|
4. **LiveKit Backend Syncs to Client**: The backend automatically synchronizes the updated PK score to all clients.
|
|
772
597
|
|
|
773
|
-
|
|
774
598
|
#### Involved REST API Endpoints
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
<td rowspan="1" colSpan="1" >**Request Example**</td>
|
|
782
|
-
</tr>
|
|
783
|
-
|
|
784
|
-
<tr>
|
|
785
|
-
<td rowspan="1" colSpan="1" >Active API - Query PK Status</td>
|
|
786
|
-
|
|
787
|
-
<td rowspan="1" colSpan="1" >Check whether the current room is in PK</td>
|
|
788
|
-
|
|
789
|
-
<td rowspan="1" colSpan="1" >[Example](https://write.woa.com/document/170220847572692992)</td>
|
|
790
|
-
</tr>
|
|
791
|
-
|
|
792
|
-
<tr>
|
|
793
|
-
<td rowspan="1" colSpan="1" >Active API - Update PK Score</td>
|
|
794
|
-
|
|
795
|
-
<td rowspan="1" colSpan="1" >Update the calculated PK score</td>
|
|
796
|
-
|
|
797
|
-
<td rowspan="1" colSpan="1" >[Example](https://write.woa.com/document/170220034100383744)</td>
|
|
798
|
-
</tr>
|
|
799
|
-
|
|
800
|
-
<tr>
|
|
801
|
-
<td rowspan="1" colSpan="1" >Callback Configuration - PK Start Callback</td>
|
|
802
|
-
|
|
803
|
-
<td rowspan="1" colSpan="1" >Receive real-time notification when PK starts</td>
|
|
804
|
-
|
|
805
|
-
<td rowspan="1" colSpan="1" >[Example](https://write.woa.com/document/170203265552953344)</td>
|
|
806
|
-
</tr>
|
|
807
|
-
|
|
808
|
-
<tr>
|
|
809
|
-
<td rowspan="1" colSpan="1" >Callback Configuration - PK End Callback</td>
|
|
810
|
-
|
|
811
|
-
<td rowspan="1" colSpan="1" >Receive real-time notification when PK ends</td>
|
|
812
|
-
|
|
813
|
-
<td rowspan="1" colSpan="1" >[Example](https://write.woa.com/document/170221608179601408)</td>
|
|
814
|
-
</tr>
|
|
815
|
-
</table>
|
|
816
|
-
|
|
599
|
+
| **API** | **Function Description** | **Request Example** |
|
|
600
|
+
| --- | --- | --- |
|
|
601
|
+
| Active API - Query PK Status | Check whether the current room is in PK | Example |
|
|
602
|
+
| Active API - Update PK Score | Update the calculated PK score | Example |
|
|
603
|
+
| Callback Configuration - PK Start Callback | Receive real-time notification when PK starts | Example |
|
|
604
|
+
| Callback Configuration - PK End Callback | Receive real-time notification when PK ends | Example |
|
|
817
605
|
|
|
818
606
|
## API Documentation
|
|
819
607
|
|
|
820
608
|
For detailed information on all public interfaces, properties, and methods of [CoHostStore](https://tencent-rtc.github.io/TUIKit_Android/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.live/-co-host-store/index.html) and related classes, refer to the official API documentation included with the [AtomicXCore](https://tencent-rtc.github.io/TUIKit_Android/index.html) framework. The relevant stores used in this guide are as follows:
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
<td rowspan="1" colSpan="1" >**API Reference**</td>
|
|
828
|
-
</tr>
|
|
829
|
-
|
|
830
|
-
<tr>
|
|
831
|
-
<td rowspan="1" colSpan="1" >`LiveCoreView`</td>
|
|
832
|
-
|
|
833
|
-
<td rowspan="1" colSpan="1" >Core view component for displaying and interacting with live video streams. Handles video rendering and view widgets, supports host streaming, audience co-hosting, host connections, and more.</td>
|
|
834
|
-
|
|
835
|
-
<td rowspan="1" colSpan="1" >[API Documentation](https://tencent-rtc.github.io/TUIKit_Android/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.view/-live-core-view/index.html)</td>
|
|
836
|
-
</tr>
|
|
837
|
-
|
|
838
|
-
<tr>
|
|
839
|
-
<td rowspan="1" colSpan="1" >`DeviceStore`</td>
|
|
840
|
-
|
|
841
|
-
<td rowspan="1" colSpan="1" >Controls audio/video devices: microphone (on/off, volume), camera (on/off, switch, quality), screen sharing, and real-time device status monitoring.</td>
|
|
842
|
-
|
|
843
|
-
<td rowspan="1" colSpan="1" >[API Documentation](https://tencent-rtc.github.io/TUIKit_Android/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.device/-device-store/index.html)</td>
|
|
844
|
-
</tr>
|
|
845
|
-
|
|
846
|
-
<tr>
|
|
847
|
-
<td rowspan="1" colSpan="1" >`CoHostStore`</td>
|
|
848
|
-
|
|
849
|
-
<td rowspan="1" colSpan="1" >Handles host cross-room connections: supports multiple layout templates (dynamic grid, etc.), initiates/accepts/rejects connections, and manages co-host interactions.</td>
|
|
850
|
-
|
|
851
|
-
<td rowspan="1" colSpan="1" >[API Documentation](https://tencent-rtc.github.io/TUIKit_Android/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.live/-co-host-store/index.html)</td>
|
|
852
|
-
</tr>
|
|
853
|
-
|
|
854
|
-
<tr>
|
|
855
|
-
<td rowspan="1" colSpan="1" >`BattleStore`</td>
|
|
856
|
-
|
|
857
|
-
<td rowspan="1" colSpan="1" >Manages host PK battles: initiate PK (set duration/opponent), manage PK status (start/end), synchronize scores, and listen for battle results.</td>
|
|
858
|
-
|
|
859
|
-
<td rowspan="1" colSpan="1" >[API Documentation](https://tencent-rtc.github.io/TUIKit_Android/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.live/-battle-store/index.html)</td>
|
|
860
|
-
</tr>
|
|
861
|
-
</table>
|
|
862
|
-
|
|
609
|
+
| **Store/Component** | **Description** | **API Reference** |
|
|
610
|
+
| --- | --- | --- |
|
|
611
|
+
| `LiveCoreView` | Core view component for displaying and interacting with live video streams. Handles video rendering and view widgets, supports host streaming, audience co-hosting, host connections, and more. | [API Documentation](https://tencent-rtc.github.io/TUIKit_Android/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.view/-live-core-view/index.html) |
|
|
612
|
+
| `DeviceStore` | Controls audio/video devices: microphone (on/off, volume), camera (on/off, switch, quality), screen sharing, and real-time device status monitoring. | [API Documentation](https://tencent-rtc.github.io/TUIKit_Android/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.device/-device-store/index.html) |
|
|
613
|
+
| `CoHostStore` | Handles host cross-room connections: supports multiple layout templates (dynamic grid, etc.), initiates/accepts/rejects connections, and manages co-host interactions. | [API Documentation](https://tencent-rtc.github.io/TUIKit_Android/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.live/-co-host-store/index.html) |
|
|
614
|
+
| `BattleStore` | Manages host PK battles: initiate PK (set duration/opponent), manage PK status (start/end), synchronize scores, and listen for battle results. | [API Documentation](https://tencent-rtc.github.io/TUIKit_Android/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.live/-battle-store/index.html) |
|
|
863
615
|
|
|
864
616
|
## FAQs
|
|
865
617
|
|
|
@@ -868,7 +620,6 @@ For detailed information on all public interfaces, properties, and methods of [C
|
|
|
868
620
|
|
|
869
621
|
- Check network stability. The invitation signaling has a default timeout of 30 seconds.
|
|
870
622
|
|
|
871
|
-
|
|
872
623
|
### What happens if one host disconnects from the network or the app crashes during co-hosting or PK?
|
|
873
624
|
|
|
874
625
|
Both `CoHostStore` and `BattleStore` include built-in heartbeat and timeout detection. If one party exits abnormally, the other party is notified via events such as `onCoHostUserLeft` or `onUserExitBattle`. You can update the UI accordingly, for example, by displaying "The other party has disconnected" and ending the interaction.
|
|
@@ -882,7 +633,6 @@ The REST API meets the security, real-time, and scalability requirements for PK
|
|
|
882
633
|
|
|
883
634
|
- **Flexible rule adaptation**: Backend configuration changes (such as adjusting gift-to-score mapping or bonus points) can be made without modifying the frontend, reducing iteration costs.
|
|
884
635
|
|
|
885
|
-
|
|
886
636
|
### How do I manage the lifecycle and events of custom views added via `VideoViewAdapter`?
|
|
887
637
|
|
|
888
|
-
`LiveCoreView` automatically manages views returned by delegate methods, including adding and removing them. No manual lifecycle management is required.
|
|
638
|
+
`LiveCoreView` automatically manages views returned by delegate methods, including adding and removing them. No manual lifecycle management is required.
|