@tencentcloud/sdk-mcp 1.3.8 → 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/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +2 -2
- package/resource/doc/{tuicallkit/android/faq.md → callkit/faq/android-faq.md} +75 -308
- package/resource/doc/{tuicallkit/faq/common/error_code.md → callkit/faq/common/error-code.md} +2 -2
- package/resource/doc/{tuicallkit/flutter/faq.md → callkit/faq/flutter-faq.md} +83 -315
- package/resource/doc/{tuicallkit/iOS/faq.md → callkit/faq/ios-faq.md} +76 -313
- package/resource/doc/{tuicallkit/react/faq.md → callkit/faq/web-faq.md} +78 -311
- package/resource/doc/callkit/preset/android/api.md +330 -0
- package/resource/doc/callkit/preset/android/integration.md +530 -0
- package/resource/doc/callkit/preset/flutter/api.md +401 -0
- package/resource/doc/{tuicallkit → callkit/preset}/flutter/integration.md +53 -273
- package/resource/doc/callkit/preset/ios/api.md +282 -0
- package/resource/doc/{tuicallkit/iOS → callkit/preset/ios}/integration.md +39 -120
- package/resource/doc/callkit/preset/react/api.md +600 -0
- package/resource/doc/{tuicallkit → callkit/preset}/react/integration.md +6 -6
- package/resource/doc/callkit/preset/vue/api.md +600 -0
- package/resource/doc/{tuicallkit → callkit/preset}/vue/integration.md +5 -5
- package/resource/doc/{chatuikit → chatkit}/android/faq.md +29 -37
- package/resource/doc/{chatuikit → chatkit}/android/features/theme.md +22 -166
- package/resource/doc/chatkit/android/integration.md +498 -0
- package/resource/doc/chatkit/faq/android_sdk/client-api.md +280 -0
- package/resource/doc/{chatuikit → chatkit}/faq/common/product.md +4 -17
- package/resource/doc/{chatuikit → chatkit}/faq/common/server.md +1 -2
- package/resource/doc/chatkit/faq/flutter_sdk/client-api.md +183 -0
- package/resource/doc/{chatuikit → chatkit}/faq/flutter_sdk/faq.md +3 -3
- package/resource/doc/chatkit/faq/ios_sdk/client-api.md +279 -0
- package/resource/doc/{chatuikit → chatkit}/faq/web_sdk/error_code.md +1 -1
- package/resource/doc/{chatuikit → chatkit}/faq/web_sdk/faq.md +4 -4
- package/resource/doc/{chatuikit → chatkit}/flutter/features/theme.md +22 -166
- package/resource/doc/{chatuikit → chatkit}/flutter/integration.md +20 -95
- package/resource/doc/{chatuikit/iOS → chatkit/ios}/faq.md +29 -37
- package/resource/doc/{chatuikit/iOS → chatkit/ios}/features/theme.md +27 -176
- package/resource/doc/{chatuikit/iOS → chatkit/ios}/integration.md +78 -280
- package/resource/doc/{chatuikit/vue → chatkit/react}/components/avatar.md +0 -1
- package/resource/doc/{chatuikit → chatkit}/react/components/chat-header.md +7 -12
- package/resource/doc/{chatuikit → chatkit}/react/components/chat-setting.md +10 -17
- package/resource/doc/{chatuikit → chatkit}/react/components/chat.md +1 -1
- package/resource/doc/{chatuikit → chatkit}/react/components/component-list.md +0 -1
- package/resource/doc/{chatuikit → chatkit}/react/components/contact-list.md +122 -703
- 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 +116 -0
- package/resource/doc/chatkit/react/components/conversation-search.md +57 -0
- package/resource/doc/{chatuikit → chatkit}/react/components/message-input.md +36 -186
- package/resource/doc/{chatuikit → chatkit}/react/components/message-list.md +21 -113
- package/resource/doc/chatkit/react/components/search.md +282 -0
- package/resource/doc/{chatuikit → chatkit}/react/components/tuikit.md +5 -26
- package/resource/doc/{chatuikit → chatkit}/react/integration.md +37 -104
- package/resource/doc/{chatuikit/react → chatkit/vue}/components/avatar.md +0 -1
- package/resource/doc/{chatuikit → chatkit}/vue/components/chat-header.md +7 -13
- package/resource/doc/{chatuikit → chatkit}/vue/components/chat-setting.md +13 -18
- package/resource/doc/{chatuikit → chatkit}/vue/components/chat.md +1 -2
- package/resource/doc/{chatuikit → chatkit}/vue/components/component-list.md +0 -1
- 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 -316
- 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 +1 -23
- package/resource/doc/{chatuikit → chatkit}/vue/components/message-list.md +23 -134
- package/resource/doc/{chatuikit → chatkit}/vue/components/search.md +73 -640
- package/resource/doc/chatkit/vue/components/tuikit.md +45 -0
- package/resource/doc/{chatuikit → chatkit}/vue/components/userpicker.md +4 -4
- package/resource/doc/{chatuikit → chatkit}/vue/faq.md +1 -1
- package/resource/doc/{chatuikit → chatkit}/vue/integration.md +53 -121
- package/resource/doc/livekit/core-sdk/live/android/api-reference/AudioEffectStore.md +283 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/BarrageStore.md +148 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/BattleStore.md +316 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/CameraView.md +57 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/CoGuestStore.md +419 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/CoHostStore.md +325 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/DeviceStore.md +436 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/GiftStore.md +165 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/LikeStore.md +49 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/LiveAudienceStore.md +239 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/LiveCoreView.md +74 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/LiveSeatStore.md +417 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/LoginStore.md +207 -0
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-audience-list.md +17 -88
- 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 +26 -139
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-base-beauty.md +16 -99
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-co-guest-interaction.md +54 -161
- 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 +91 -338
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-integration.md +108 -492
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-live-list.md +27 -165
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/AudioEffectStore.md +279 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/BarrageStore.md +158 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/BaseBeautyStore.md +155 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/BattleStore.md +304 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/CoGuestStore.md +394 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/CoHostStore.md +303 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/DeviceStore.md +410 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/GiftStore.md +160 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/LikeStore.md +51 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/LiveAudienceStore.md +231 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/LiveCoreView.md +143 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/LiveSeatStore.md +375 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/LoginStore.md +170 -0
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-audience-list.md +13 -91
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-audio-effect.md +34 -177
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-barrage.md +18 -102
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-base-beauty.md +24 -164
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-co-guest-interaction.md +56 -161
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-gift.md +66 -460
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-host-interaction.md +117 -364
- package/resource/doc/livekit/core-sdk/live/flutter/live-integration.md +687 -0
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-live-list.md +22 -161
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/AudioEffectStore.md +287 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/BarrageStore.md +165 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/BaseBeautyStore.md +143 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/BattleStore.md +298 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/CoGuestStore.md +349 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/CoHostStore.md +297 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/DeviceStore.md +471 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/GiftStore.md +179 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/LikeStore.md +49 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/LiveAudienceStore.md +238 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/LiveCoreView.md +74 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/LiveSeatStore.md +412 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/LoginStore.md +173 -0
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-audience-list.md +23 -96
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-audio-effect.md +33 -195
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-barrage.md +35 -150
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-base-beauty.md +20 -105
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-co-guest-interaction.md +35 -140
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-gift.md +77 -457
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-host-interaction.md +70 -317
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-integration.md +90 -473
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-live-list.md +28 -163
- package/resource/doc/livekit/core-sdk/voice/android/voice-audience-list.md +264 -0
- package/resource/doc/livekit/core-sdk/voice/android/voice-audio-effect.md +226 -0
- package/resource/doc/livekit/core-sdk/voice/android/voice-barrage.md +456 -0
- package/resource/doc/livekit/core-sdk/voice/android/voice-co-guest-interaction.md +539 -0
- package/resource/doc/livekit/core-sdk/voice/android/voice-gift.md +453 -0
- package/resource/doc/livekit/core-sdk/voice/android/voice-host-interaction.md +516 -0
- package/resource/doc/livekit/core-sdk/voice/android/voice-integration.md +509 -0
- package/resource/doc/livekit/core-sdk/voice/android/voice-room-list.md +365 -0
- package/resource/doc/livekit/core-sdk/voice/flutter/voice-audience-list.md +259 -0
- package/resource/doc/livekit/core-sdk/voice/flutter/voice-audio-effect.md +596 -0
- package/resource/doc/livekit/core-sdk/voice/flutter/voice-barrage.md +494 -0
- package/resource/doc/livekit/core-sdk/voice/flutter/voice-co-guest-interaction.md +516 -0
- package/resource/doc/livekit/core-sdk/voice/flutter/voice-gift.md +418 -0
- package/resource/doc/livekit/core-sdk/voice/flutter/voice-integration.md +563 -0
- package/resource/doc/livekit/core-sdk/voice/flutter/voice-room-list.md +709 -0
- package/resource/doc/livekit/core-sdk/voice/ios/voice-audience-list.md +262 -0
- package/resource/doc/livekit/core-sdk/voice/ios/voice-audio-effect.md +211 -0
- package/resource/doc/livekit/core-sdk/voice/ios/voice-barrage.md +414 -0
- package/resource/doc/livekit/core-sdk/voice/ios/voice-co-guest-interaction.md +492 -0
- package/resource/doc/livekit/core-sdk/voice/ios/voice-gift.md +405 -0
- package/resource/doc/livekit/core-sdk/voice/ios/voice-host-interaction.md +611 -0
- package/resource/doc/livekit/core-sdk/voice/ios/voice-integration.md +478 -0
- package/resource/doc/livekit/core-sdk/voice/ios/voice-room-list.md +336 -0
- package/resource/doc/livekit/core-sdk/voice/uni-app/voice-audience-list.md +234 -0
- package/resource/doc/livekit/core-sdk/voice/uni-app/voice-audio-effect.md +218 -0
- package/resource/doc/livekit/core-sdk/voice/uni-app/voice-barrage.md +376 -0
- package/resource/doc/livekit/core-sdk/voice/uni-app/voice-co-guest-interaction.md +648 -0
- package/resource/doc/livekit/core-sdk/voice/uni-app/voice-gift.md +362 -0
- package/resource/doc/livekit/core-sdk/voice/uni-app/voice-integration.md +323 -0
- package/resource/doc/livekit/core-sdk/voice/uni-app/voice-room-list.md +470 -0
- package/resource/doc/livekit/faq/common/{error_code.md → error-code.md} +2 -3
- 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 +9 -48
- package/resource/doc/livekit/{live → preset/live}/vue/components/live-audience-list.md +27 -145
- package/resource/doc/livekit/{live → preset/live}/vue/components/live-scene-panel.md +13 -76
- package/resource/doc/livekit/{live → preset/live}/vue/components/live-view.md +33 -224
- package/resource/doc/livekit/preset/live/vue/components/stream-mixer.md +211 -0
- package/resource/doc/livekit/preset/live/vue/faq.md +1 -0
- package/resource/doc/livekit/preset/live/vue/live-list-integration.md +244 -0
- package/resource/doc/livekit/preset/live/vue/live-player-desk-integration.md +301 -0
- package/resource/doc/livekit/preset/live/vue/live-player-h5-integration.md +307 -0
- package/resource/doc/livekit/preset/live/vue/live-pusher-integration.md +754 -0
- package/resource/doc/roomkit/android/features/call-user-to-room.md +234 -0
- package/resource/doc/roomkit/android/features/room-participant-state.md +850 -0
- package/resource/doc/roomkit/android/features/room-state.md +358 -0
- package/resource/doc/roomkit/android/features/schedule-room.md +336 -0
- package/resource/doc/roomkit/android/integration.md +433 -0
- package/resource/doc/roomkit/{common/error_code.md → faq/common/error-code.md} +1 -1
- package/resource/doc/roomkit/flutter/features/call-user-to-room.md +228 -0
- package/resource/doc/roomkit/flutter/features/room-participant-state.md +796 -0
- package/resource/doc/roomkit/flutter/features/room-state.md +324 -0
- package/resource/doc/roomkit/flutter/features/schedule-room.md +324 -0
- package/resource/doc/roomkit/flutter/integration.md +405 -0
- package/resource/doc/roomkit/ios/features/call-user-to-room.md +226 -0
- package/resource/doc/roomkit/ios/features/room-participant-state.md +821 -0
- package/resource/doc/roomkit/ios/features/room-state.md +320 -0
- package/resource/doc/roomkit/ios/features/schedule-room.md +318 -0
- package/resource/doc/roomkit/ios/integration.md +384 -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 -36
- package/resource/doc/roomkit/vue/features/room-view.md +30 -127
- 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 -34
- package/resource/doc/roomkit/vue/integration.md +118 -282
- package/resource/doc/rtcengine/faq/common/userSig.md +17 -141
- package/resource/doc/rtcengine/faq/web/web.md +15 -22
- package/resource/doc/rtcengine/web/api.md +17 -21
- package/resource/doc/rtcengine/web/how_to_integrated_web_sdk.md +4 -10
- package/resource/doc/rtcengine/web/how_to_run_web_sdk_demo.md +4 -8
- package/resource/doc/rtcengine/web/plugin/20-advanced-customized-capture-rendering.md +3 -3
- package/resource/doc/rtcengine/web/plugin/21-advanced-auto-play-policy.md +2 -3
- package/resource/doc/rtcengine/web/plugin/22-advanced-audio-mixer.md +6 -6
- package/resource/doc/rtcengine/web/plugin/23-advanced-support-detection.md +2 -2
- package/resource/doc/rtcengine/web/plugin/24-advanced-network-quality.md +2 -4
- package/resource/doc/rtcengine/web/plugin/25-advanced-device-change.md +1 -2
- package/resource/doc/rtcengine/web/plugin/26-advanced-publish-cdn-stream.md +2 -6
- package/resource/doc/rtcengine/web/plugin/27-advanced-small-stream.md +13 -14
- package/resource/doc/rtcengine/web/plugin/28-advanced-beauty.md +10 -90
- package/resource/doc/rtcengine/web/plugin/31-advanced-plugins-overview.md +5 -8
- package/resource/doc/rtcengine/web/plugin/34-advanced-proxy.md +31 -35
- package/resource/doc/rtcengine/web/plugin/35-advanced-ai-denoiser.md +0 -2
- package/resource/doc/rtcengine/web/plugin/36-advanced-virtual-background.md +7 -49
- package/resource/doc/rtcengine/web/plugin/37-advanced-voice-changer.md +1 -1
- package/resource/doc/rtcengine/web/plugin/39-advanced-video-decoder.md +0 -3
- package/resource/doc/rtcengine/web/plugin/40-advanced-video-mixer.md +20 -20
- 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 -4
- package/resource/doc/rtcengine/web/plugin/43-advanced-face-detection.md +3 -3
- package/resource/doc/trtc/C++/ITRTCCloud.md +718 -2847
- package/resource/doc/trtc/C++/ITRTCStatistics.md +53 -308
- package/resource/doc/trtc/C++/ITXAudioEffectManager.md +207 -1041
- package/resource/doc/trtc/C++/ITXDeviceManager.md +127 -768
- package/resource/doc/trtc/C++/TRTCCloudCallback.md +634 -2259
- package/resource/doc/trtc/C++/TRTCTypeDef.md +726 -3465
- package/resource/doc/trtc/C++/TXLiteAVCode.md +117 -916
- package/resource/doc/trtc/android/TRTCCloud.md +638 -2612
- package/resource/doc/trtc/android/TRTCCloudDef.md +769 -3697
- package/resource/doc/trtc/android/TRTCCloudListener.md +609 -2070
- package/resource/doc/trtc/android/TRTCStatistics.md +48 -278
- package/resource/doc/trtc/android/TXAudioEffectManager.md +207 -1049
- 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 +115 -900
- package/resource/doc/trtc/iOS/TRTCCloud.md +726 -2930
- package/resource/doc/trtc/iOS/TRTCCloudDelegate.md +580 -2099
- package/resource/doc/trtc/iOS/TRTCStatistics.md +48 -278
- package/resource/doc/trtc/iOS/TXAudioEffectManager.md +179 -896
- 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/resource/doc/trtc/iOS/TXLiveSDKTypeDef.md +747 -3559
- 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 +28 -0
- package/tools/definitions/get_callkit_api_def.js.map +1 -0
- package/tools/definitions/get_faq_def.js +18 -19
- package/tools/definitions/get_faq_def.js.map +1 -1
- package/tools/definitions/get_native_call_uikit_integration_def.js +15 -18
- 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 -19
- package/tools/definitions/get_native_chat_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_native_livekit_core_features_def.js +33 -0
- package/tools/definitions/get_native_livekit_core_features_def.js.map +1 -0
- package/tools/definitions/get_native_livekit_core_integration_def.js +33 -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 -24
- 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 +13 -18
- package/tools/definitions/get_web_live_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_web_livekit_api_def.js +27 -0
- package/tools/definitions/get_web_livekit_api_def.js.map +1 -0
- package/tools/definitions/get_web_livekit_component_detail_def.js +29 -0
- package/tools/definitions/get_web_livekit_component_detail_def.js.map +1 -0
- package/tools/definitions/get_web_room_uikit_integration_def.js +13 -30
- package/tools/definitions/get_web_room_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_web_roomkit_feature_detail_def.js +30 -0
- package/tools/definitions/get_web_roomkit_feature_detail_def.js.map +1 -0
- package/tools/definitions/get_web_trtc_sdk_api_def.js +25 -0
- package/tools/definitions/get_web_trtc_sdk_api_def.js.map +1 -0
- package/tools/definitions/get_web_trtc_sdk_integration_def.js +25 -0
- package/tools/definitions/get_web_trtc_sdk_integration_def.js.map +1 -0
- package/tools/definitions/get_web_trtc_sdk_plugin_def.js +25 -0
- package/tools/definitions/get_web_trtc_sdk_plugin_def.js.map +1 -0
- package/tools/definitions/present_framework_choice_def.js +23 -12
- package/tools/definitions/present_framework_choice_def.js.map +1 -1
- package/tools/index.js +47 -59
- 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 +1 -1
- package/resource/doc/chatuikit/android/integration.md +0 -612
- package/resource/doc/chatuikit/android/workflow.md +0 -0
- package/resource/doc/chatuikit/faq/android_sdk/client-api.md +0 -1376
- package/resource/doc/chatuikit/faq/flutter_sdk/client-api.md +0 -860
- package/resource/doc/chatuikit/faq/ios_sdk/client-api.md +0 -1371
- package/resource/doc/chatuikit/flutter/workflow.md +0 -816
- package/resource/doc/chatuikit/iOS/workflow.md +0 -0
- package/resource/doc/chatuikit/react/components/conversation-list.md +0 -765
- package/resource/doc/chatuikit/react/components/search.md +0 -885
- package/resource/doc/chatuikit/react/create-group.md +0 -22
- package/resource/doc/chatuikit/react/init.md +0 -25
- package/resource/doc/chatuikit/react/workflow.md +0 -254
- package/resource/doc/chatuikit/uniapp-app/faq.md +0 -0
- package/resource/doc/chatuikit/uniapp-app/integration.md +0 -619
- package/resource/doc/chatuikit/uniapp-app/workflow.md +0 -576
- package/resource/doc/chatuikit/vue/components/contact-list.md +0 -679
- package/resource/doc/chatuikit/vue/components/tuikit.md +0 -110
- package/resource/doc/chatuikit/vue/create-group.md +0 -26
- package/resource/doc/chatuikit/vue/init.md +0 -35
- package/resource/doc/chatuikit/vue/workflow.md +0 -395
- package/resource/doc/livekit/live/android/workflow.md +0 -322
- package/resource/doc/livekit/live/flutter/live-integration.md +0 -1029
- package/resource/doc/livekit/live/flutter/workflow.md +0 -353
- package/resource/doc/livekit/live/ios/workflow.md +0 -352
- package/resource/doc/livekit/live/vue/components/barrage.md +0 -615
- package/resource/doc/livekit/live/vue/components/stream-mixer.md +0 -442
- package/resource/doc/livekit/live/vue/faq.md +0 -0
- package/resource/doc/livekit/live/vue/live-list-integration.md +0 -195
- package/resource/doc/livekit/live/vue/live-player-desk-integration.md +0 -293
- package/resource/doc/livekit/live/vue/live-player-h5-integration.md +0 -381
- package/resource/doc/livekit/live/vue/live-pusher-integration.md +0 -598
- package/resource/doc/livekit/live/vue/states/live-state.md +0 -2656
- package/resource/doc/livekit/live/vue/workflow.md +0 -219
- package/resource/doc/native_live/android/V2TXLiveCode_api_android.md +0 -334
- package/resource/doc/native_live/android/V2TXLiveDef_api_android.md +0 -434
- package/resource/doc/native_live/android/V2TXLivePlayerObserver_api_android.md +0 -685
- package/resource/doc/native_live/android/V2TXLivePlayer_api_android.md +0 -712
- package/resource/doc/native_live/android/V2TXLivePremier_api_android.md +0 -284
- 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 -879
- package/resource/doc/native_live/flutter/V2TXLivePlayer_api_flutter.md +0 -668
- package/resource/doc/native_live/flutter/V2TXLivePremier_api_flutter.md +0 -456
- package/resource/doc/native_live/flutter/V2TXLivePusherObserver_api_flutter.md +0 -332
- package/resource/doc/native_live/flutter/V2TXLivePusher_api_flutter.md +0 -748
- package/resource/doc/native_live/iOS/V2TXLiveCode_api_iOS.md +0 -328
- package/resource/doc/native_live/iOS/V2TXLiveDef_api_iOS.md +0 -505
- package/resource/doc/native_live/iOS/V2TXLivePlayerObserver_api_iOS.md +0 -507
- package/resource/doc/native_live/iOS/V2TXLivePlayer_api_iOS.md +0 -676
- package/resource/doc/native_live/iOS/V2TXLivePremier_api_iOS.md +0 -284
- package/resource/doc/native_live/iOS/V2TXLivePusherObserver_api_iOS.md +0 -820
- package/resource/doc/native_live/iOS/V2TXLivePusher_api_iOS.md +0 -1065
- package/resource/doc/roomkit/vue/features/workflow.md +0 -553
- package/resource/doc/roomkit/vue/workflow.md +0 -487
- package/resource/doc/tuicallkit/android/integration.md +0 -302
- package/resource/doc/tuicallkit/android/workflow.md +0 -0
- package/resource/doc/tuicallkit/faq/android_sdk/call-observer-api.md +0 -786
- package/resource/doc/tuicallkit/faq/android_sdk/callkit-api.md +0 -663
- package/resource/doc/tuicallkit/faq/flutter_sdk/call-define-api.md +0 -932
- package/resource/doc/tuicallkit/faq/flutter_sdk/call-observer-api.md +0 -926
- package/resource/doc/tuicallkit/faq/flutter_sdk/callkit-api.md +0 -452
- package/resource/doc/tuicallkit/faq/ios_sdk/call-observer-api.md +0 -779
- package/resource/doc/tuicallkit/faq/ios_sdk/callkit-api.md +0 -635
- package/resource/doc/tuicallkit/flutter/workflow.md +0 -331
- package/resource/doc/tuicallkit/react/api.md +0 -1512
- package/resource/doc/tuicallkit/vue/api.md +0 -1512
- package/resource/doc/tuicallkit/vue/faq.md +0 -986
- 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/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 -22
- package/tools/definitions/get_native_live_api_def.js.map +0 -1
- package/tools/definitions/get_native_live_uikit_extra_features_def.js +0 -109
- 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 -50
- package/tools/definitions/get_native_live_uikit_integration_def.js.map +0 -1
- package/tools/definitions/get_native_live_uikit_interaction_def.js +0 -115
- package/tools/definitions/get_native_live_uikit_interaction_def.js.map +0 -1
- package/tools/definitions/get_trtc_native_api_def.js +0 -17
- 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 -95
- package/tools/definitions/get_web_room_feature_detail_def.js.map +0 -1
- package/tools/definitions/record_prompt_def.js +0 -53
- package/tools/definitions/record_prompt_def.js.map +0 -1
- package/tools/definitions/record_result_def.js +0 -30
- package/tools/definitions/record_result_def.js.map +0 -1
- package/tools/live/get-native-live-uikit-integration.js +0 -101
- 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 -101
- 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/{rtcengine/web → callkit/core-sdk}/.gitkeep +0 -0
- /package/resource/doc/{chatuikit → chatkit}/faq/common/server_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
|
@@ -1,748 +0,0 @@
|
|
|
1
|
-
# 腾讯云直播SDK V2TXLivePusher 推流接口文档
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
`V2TXLivePusher` 是腾讯云 TRTC 直播 SDK 的核心推流器接口类,负责将本地的音频和视频画面进行编码,并推送到指定的推流地址,支持任意的推流服务端。
|
|
6
|
-
|
|
7
|
-
### 🎯 主要能力
|
|
8
|
-
- ✅ **多采集源支持**: 摄像头、麦克风、屏幕、图片、自定义采集
|
|
9
|
-
- ✅ **画面控制**: 旋转、填充模式、镜像、水印
|
|
10
|
-
- ✅ **推流控制**: 开始/停止、暂停/恢复、音视频分离
|
|
11
|
-
- ✅ **特效处理**: 美颜、滤镜、贴纸、音效处理
|
|
12
|
-
- ✅ **云端混流**: 多路音视频流混合转码
|
|
13
|
-
- ✅ **本地录制**: 音视频流本地录制功能
|
|
14
|
-
- ✅ **自定义采集**: 支持外部设备和特殊格式采集
|
|
15
|
-
|
|
16
|
-
### 🔧 技术特性
|
|
17
|
-
- **低延迟**: 优化的编码策略和网络自适应
|
|
18
|
-
- **高兼容**: 支持多种视频编码格式和分辨率
|
|
19
|
-
- **易集成**: 简洁的API设计和完整的回调机制
|
|
20
|
-
- **高性能**: 硬件加速编码和高效的采集管线
|
|
21
|
-
|
|
22
|
-
### 推流器实例创建
|
|
23
|
-
```dart
|
|
24
|
-
// 创建 RTC 协议推流实例,startPush 必须传入 RTC 协议地址
|
|
25
|
-
V2TXLivePusher pusher = await V2TXLivePusher.create(V2TXLiveMode.V2TXLiveModeRTC);
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
**协议选择建议**:
|
|
29
|
-
- **RTMP协议**: 适合CDN直播分发场景,延迟较高(2-3秒)
|
|
30
|
-
- **RTC协议**: 适合实时互动场景,延迟较低(400ms以内)
|
|
31
|
-
|
|
32
|
-
## 文件信息
|
|
33
|
-
|
|
34
|
-
- **文件路径**: `v2_tx_live_pusher.dart`
|
|
35
|
-
- **依赖文件**:
|
|
36
|
-
- `v2_tx_live_code.dart` - 错误码定义
|
|
37
|
-
- `v2_tx_live_def.dart` - 类型定义
|
|
38
|
-
- `v2_tx_live_pusher_observer.dart` - 观察者回调接口
|
|
39
|
-
- `tx_audio_effect_manager.dart` - 音效管理
|
|
40
|
-
- `tx_device_manager.dart` - 设备管理
|
|
41
|
-
|
|
42
|
-
## 类定义
|
|
43
|
-
|
|
44
|
-
```dart
|
|
45
|
-
abstract class V2TXLivePusher {
|
|
46
|
-
V2TXLivePusher() {}
|
|
47
|
-
}
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
## 静态方法
|
|
51
|
-
|
|
52
|
-
### create
|
|
53
|
-
**功能**: 创建推流器实例
|
|
54
|
-
```dart
|
|
55
|
-
static Future<V2TXLivePusher> create(V2TXLiveMode liveMode) async
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
**参数**:
|
|
59
|
-
- `liveMode`: 推流模式 [V2TXLiveMode]
|
|
60
|
-
|
|
61
|
-
**返回值**:
|
|
62
|
-
- `Future<V2TXLivePusher>`: 推流器实例
|
|
63
|
-
|
|
64
|
-
**使用示例**:
|
|
65
|
-
```dart
|
|
66
|
-
V2TXLivePusher pusher = await V2TXLivePusher.create(V2TXLiveMode.V2TXLiveModeRTC);
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
## 观察者管理
|
|
70
|
-
|
|
71
|
-
### addListener
|
|
72
|
-
**功能**: 设置推流器回调观察者
|
|
73
|
-
```dart
|
|
74
|
-
void addListener(V2TXLivePusherObserver observer)
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
**参数**:
|
|
78
|
-
- `observer`: 推流器回调观察者对象,需实现 `V2TXLivePusherObserver` 协议
|
|
79
|
-
|
|
80
|
-
**使用时机**: 推流器初始化后立即设置
|
|
81
|
-
|
|
82
|
-
**说明**: 通过设置回调,可以监听推流器状态、音量回调、统计数据、警告和错误信息等
|
|
83
|
-
|
|
84
|
-
**示例**:
|
|
85
|
-
```dart
|
|
86
|
-
pusher.addListener(V2TXLivePusherObserver(
|
|
87
|
-
onPushStatusUpdate: (status, msg, extraInfo) {
|
|
88
|
-
// 处理推流状态变化
|
|
89
|
-
},
|
|
90
|
-
onStatisticsUpdate: (statistics) {
|
|
91
|
-
// 处理统计信息
|
|
92
|
-
},
|
|
93
|
-
onError: (code, msg, extraInfo) {
|
|
94
|
-
// 处理错误信息
|
|
95
|
-
}
|
|
96
|
-
));
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
### removeListener
|
|
100
|
-
**功能**: 移除推流器回调观察者
|
|
101
|
-
```dart
|
|
102
|
-
void removeListener(V2TXLivePusherObserver observer)
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
**参数**:
|
|
106
|
-
- `observer`: 推流器回调观察者对象 [V2TXLivePusherObserver]
|
|
107
|
-
|
|
108
|
-
### destroy
|
|
109
|
-
**功能**: 销毁推流器实例
|
|
110
|
-
```dart
|
|
111
|
-
void destroy()
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
## 视频渲染控制
|
|
115
|
-
|
|
116
|
-
### setRenderViewID
|
|
117
|
-
**功能**: 设置本地摄像头预览视图 ID
|
|
118
|
-
```dart
|
|
119
|
-
Future<V2TXLiveCode> setRenderViewID(int viewID)
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
**参数**:
|
|
123
|
-
- `viewID`: 本地摄像头预览视图 ID
|
|
124
|
-
|
|
125
|
-
**返回值**: `V2TXLiveCode`
|
|
126
|
-
- `V2TXLIVE_OK`: 成功
|
|
127
|
-
|
|
128
|
-
**使用时机**: 必须在开始推流前设置预览视图
|
|
129
|
-
|
|
130
|
-
**说明**: 本地摄像头采集到的画面,经过美颜、脸型调整、滤镜等多种效果叠加之后,最终会显示在指定的视图上
|
|
131
|
-
|
|
132
|
-
**示例**:
|
|
133
|
-
```dart
|
|
134
|
-
await pusher.setRenderViewID(yourTextureViewID);
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
### setRenderMirror
|
|
138
|
-
**功能**: 设置摄像头镜像类型
|
|
139
|
-
```dart
|
|
140
|
-
Future<V2TXLiveCode> setRenderMirror(V2TXLiveMirrorType mirrorType)
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
**参数**:
|
|
144
|
-
- `mirrorType`: 镜像类型 [V2TXLiveMirrorType]
|
|
145
|
-
- `V2TXLiveMirrorType.v2TXLiveMirrorTypeAuto`: 默认值,前置摄像头镜像,后置摄像头不镜像
|
|
146
|
-
- `V2TXLiveMirrorType.v2TXLiveMirrorTypeEnable`: 前后置摄像头都镜像
|
|
147
|
-
- `V2TXLiveMirrorType.v2TXLiveMirrorTypeDisable`: 前后置摄像头都不镜像
|
|
148
|
-
|
|
149
|
-
### setEncoderMirror
|
|
150
|
-
**功能**: 设置视频编码镜像(仅影响观众看到的视频效果)
|
|
151
|
-
```dart
|
|
152
|
-
Future<V2TXLiveCode> setEncoderMirror(bool mirror)
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
**参数**:
|
|
156
|
-
- `mirror`: 是否镜像
|
|
157
|
-
- `false`: 默认值,观众看到非镜像图像
|
|
158
|
-
- `true`: 观众看到镜像图像
|
|
159
|
-
|
|
160
|
-
### setRenderRotation
|
|
161
|
-
**功能**: 设置本地摄像头预览画面旋转角度(仅影响本地预览)
|
|
162
|
-
```dart
|
|
163
|
-
Future<V2TXLiveCode> setRenderRotation(V2TXLiveRotation rotation)
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
**参数**:
|
|
167
|
-
- `rotation`: 旋转角度 [V2TXLiveRotation]
|
|
168
|
-
- `V2TXLiveRotation.v2TXLiveRotation0`: 0度,不旋转(默认)
|
|
169
|
-
- `V2TXLiveRotation.v2TXLiveRotation90`: 顺时针旋转90度
|
|
170
|
-
- `V2TXLiveRotation.v2TXLiveRotation180`: 顺时针旋转180度
|
|
171
|
-
- `V2TXLiveRotation.v2TXLiveRotation270`: 顺时针旋转270度
|
|
172
|
-
|
|
173
|
-
### setRenderFillMode
|
|
174
|
-
**功能**: 设置画面填充模式
|
|
175
|
-
```dart
|
|
176
|
-
Future<V2TXLiveCode> setRenderFillMode(V2TXLiveFillMode mode)
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
**参数**:
|
|
180
|
-
- `mode`: 画面填充模式 [V2TXLiveFillMode]
|
|
181
|
-
- `V2TXLiveFillMode.v2TXLiveFillModeFill`: 默认值,图像铺满屏幕,无黑边
|
|
182
|
-
- `V2TXLiveFillMode.v2TXLiveFillModeFit`: 图像适应屏幕,保持画面完整
|
|
183
|
-
|
|
184
|
-
## 采集控制
|
|
185
|
-
|
|
186
|
-
### startCamera
|
|
187
|
-
**功能**: 开启本地摄像头
|
|
188
|
-
```dart
|
|
189
|
-
Future<V2TXLiveCode> startCamera(bool frontCamera)
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
**参数**:
|
|
193
|
-
- `frontCamera`: 指定摄像头方向是否为前置【默认值】:true
|
|
194
|
-
|
|
195
|
-
**返回值**: `V2TXLiveCode`
|
|
196
|
-
- `V2TXLIVE_OK`: 成功
|
|
197
|
-
|
|
198
|
-
**重要说明**:
|
|
199
|
-
- **推流前必须开启至少一个采集源**,否则推流将失败
|
|
200
|
-
- `startVirtualCamera`, `startCamera`, `startScreenCapture` 在同一Pusher实例下,仅有一个采集源可以上行
|
|
201
|
-
- 不同采集源之间切换,请先关闭前一采集源,再开启后一采集源
|
|
202
|
-
|
|
203
|
-
**使用时机**: 必须推流前调用
|
|
204
|
-
|
|
205
|
-
**示例**:
|
|
206
|
-
```dart
|
|
207
|
-
// 开启前置摄像头
|
|
208
|
-
await pusher.startCamera(true);
|
|
209
|
-
// 开启后置摄像头
|
|
210
|
-
await pusher.startCamera(false);
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
### stopCamera
|
|
214
|
-
**功能**: 关闭本地摄像头
|
|
215
|
-
```dart
|
|
216
|
-
Future<void> stopCamera()
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
### startMicrophone
|
|
220
|
-
**功能**: 开启麦克风
|
|
221
|
-
```dart
|
|
222
|
-
Future<V2TXLiveCode> startMicrophone()
|
|
223
|
-
```
|
|
224
|
-
|
|
225
|
-
**返回值**: `V2TXLiveCode`
|
|
226
|
-
- `V2TXLIVE_OK`: 成功
|
|
227
|
-
|
|
228
|
-
**使用场景**:
|
|
229
|
-
- **音视频直播**: 配合摄像头采集提供音频
|
|
230
|
-
- **纯音频直播**: 单独使用麦克风进行音频推流
|
|
231
|
-
- **屏幕分享**: 配合屏幕采集提供系统声音和麦克风声音
|
|
232
|
-
|
|
233
|
-
**注意事项**:
|
|
234
|
-
- **推流前必须调用此方法开启麦克风采集**,否则推流将只有视频没有音频
|
|
235
|
-
- 纯音频推流场景下,可以单独使用麦克风采集
|
|
236
|
-
- 推流过程中可以动态开启/关闭麦克风采集
|
|
237
|
-
|
|
238
|
-
**使用时机**: 推流前必须调用
|
|
239
|
-
|
|
240
|
-
**示例**:
|
|
241
|
-
```dart
|
|
242
|
-
// 开启麦克风采集
|
|
243
|
-
await pusher.startMicrophone();
|
|
244
|
-
// 停止麦克风采集
|
|
245
|
-
await pusher.stopMicrophone();
|
|
246
|
-
```
|
|
247
|
-
|
|
248
|
-
### stopMicrophone
|
|
249
|
-
**功能**: 关闭麦克风
|
|
250
|
-
```dart
|
|
251
|
-
Future<V2TXLiveCode> stopMicrophone()
|
|
252
|
-
```
|
|
253
|
-
|
|
254
|
-
### startScreenCapture
|
|
255
|
-
**功能**: 开启屏幕共享
|
|
256
|
-
```dart
|
|
257
|
-
Future<V2TXLiveCode> startScreenCapture(String appGroup)
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
**参数**:
|
|
261
|
-
- `appGroup`: iOS专用参数,Android可忽略,主应用与广播进程共享的 Application Group Identifier
|
|
262
|
-
|
|
263
|
-
**注意**: 与摄像头采集互斥
|
|
264
|
-
|
|
265
|
-
### stopScreenCapture
|
|
266
|
-
**功能**: 关闭屏幕共享
|
|
267
|
-
```dart
|
|
268
|
-
Future<V2TXLiveCode> stopScreenCapture()
|
|
269
|
-
```
|
|
270
|
-
|
|
271
|
-
## 推流控制
|
|
272
|
-
|
|
273
|
-
### startPush
|
|
274
|
-
**功能**: 开始音视频数据推流
|
|
275
|
-
```dart
|
|
276
|
-
Future<V2TXLiveCode> startPush(String url)
|
|
277
|
-
```
|
|
278
|
-
|
|
279
|
-
**参数**:
|
|
280
|
-
- `url`: 推流的目标地址,支持任意推流服务端
|
|
281
|
-
|
|
282
|
-
**返回值**: `V2TXLiveCode`
|
|
283
|
-
- `V2TXLIVE_OK`: 操作成功,开始连接推流目标地址
|
|
284
|
-
- `V2TXLIVE_ERROR_INVALID_PARAMETER`: 操作失败,url不合法
|
|
285
|
-
- `V2TXLIVE_ERROR_INVALID_LICENSE`: 操作失败,license不合法,鉴权失败
|
|
286
|
-
- `V2TXLIVE_ERROR_REFUSED`: 操作失败,RTC不支持同一设备上同时推拉同一个StreamId
|
|
287
|
-
|
|
288
|
-
**重要注意事项**:
|
|
289
|
-
- **必须在调用startPush()之前开启至少一个采集源**,否则推流将失败
|
|
290
|
-
- 支持的采集源类型:摄像头采集、麦克风采集、屏幕采集、图片推流、自定义采集
|
|
291
|
-
- 推流过程中可以切换采集源,但需要先关闭当前采集源再开启新采集源
|
|
292
|
-
|
|
293
|
-
**使用时机**: 采集源开启后
|
|
294
|
-
|
|
295
|
-
**示例**:
|
|
296
|
-
```dart
|
|
297
|
-
V2TXLiveCode result = await pusher.startPush("rtmp://example.com/live/stream");
|
|
298
|
-
if (result == V2TXLiveCode.V2TXLIVE_OK) {
|
|
299
|
-
print('开始推流成功');
|
|
300
|
-
} else if (result == V2TXLiveCode.V2TXLIVE_ERROR_INVALID_PARAMETER) {
|
|
301
|
-
print('推流地址不合法');
|
|
302
|
-
} else if (result == V2TXLiveCode.V2TXLIVE_ERROR_INVALID_LICENSE) {
|
|
303
|
-
print('Licence不合法,请检查Licence');
|
|
304
|
-
} else if (result == V2TXLiveCode.V2TXLIVE_ERROR_REFUSED) {
|
|
305
|
-
print('调用被拒绝');
|
|
306
|
-
}
|
|
307
|
-
```
|
|
308
|
-
|
|
309
|
-
### stopPush
|
|
310
|
-
**功能**: 停止推流
|
|
311
|
-
```dart
|
|
312
|
-
Future<V2TXLiveCode> stopPush()
|
|
313
|
-
```
|
|
314
|
-
|
|
315
|
-
### isPushing
|
|
316
|
-
**功能**: 检查是否正在推流
|
|
317
|
-
```dart
|
|
318
|
-
Future<V2TXLiveCode> isPushing()
|
|
319
|
-
```
|
|
320
|
-
|
|
321
|
-
**返回值**:
|
|
322
|
-
- `1`: 正在推流
|
|
323
|
-
- `0`: 推流已停止
|
|
324
|
-
|
|
325
|
-
## 音视频控制
|
|
326
|
-
|
|
327
|
-
### pauseAudio
|
|
328
|
-
**功能**: 暂停音频流
|
|
329
|
-
```dart
|
|
330
|
-
Future<V2TXLiveCode> pauseAudio()
|
|
331
|
-
```
|
|
332
|
-
|
|
333
|
-
### resumeAudio
|
|
334
|
-
**功能**: 恢复音频流
|
|
335
|
-
```dart
|
|
336
|
-
Future<V2TXLiveCode> resumeAudio()
|
|
337
|
-
```
|
|
338
|
-
|
|
339
|
-
### pauseVideo
|
|
340
|
-
**功能**: 暂停视频流
|
|
341
|
-
```dart
|
|
342
|
-
Future<V2TXLiveCode> pauseVideo()
|
|
343
|
-
```
|
|
344
|
-
|
|
345
|
-
### resumeVideo
|
|
346
|
-
**功能**: 恢复视频流
|
|
347
|
-
```dart
|
|
348
|
-
Future<V2TXLiveCode> resumeVideo()
|
|
349
|
-
```
|
|
350
|
-
|
|
351
|
-
## 音视频质量设置
|
|
352
|
-
|
|
353
|
-
### setAudioQuality
|
|
354
|
-
**功能**: 设置推流音频质量
|
|
355
|
-
```dart
|
|
356
|
-
Future<V2TXLiveCode> setAudioQuality(V2TXLiveAudioQuality quality)
|
|
357
|
-
```
|
|
358
|
-
|
|
359
|
-
**参数**:
|
|
360
|
-
- `quality`: 音频质量 [V2TXLiveAudioQuality]
|
|
361
|
-
- `V2TXLiveAudioQuality.v2TXLiveAudioQualityDefault`: 默认值,通用
|
|
362
|
-
- `V2TXLiveAudioQuality.v2TXLiveAudioQualitySpeech`: 语音
|
|
363
|
-
- `V2TXLiveAudioQuality.v2TXLiveAudioQualityMusic`: 音乐
|
|
364
|
-
|
|
365
|
-
**返回值**:
|
|
366
|
-
- `V2TXLIVE_OK`: 成功
|
|
367
|
-
- `V2TXLIVE_ERROR_REFUSED`: 推流过程中无法调整音质
|
|
368
|
-
|
|
369
|
-
### setVideoQuality
|
|
370
|
-
**功能**: 设置推流视频编码参数
|
|
371
|
-
```dart
|
|
372
|
-
Future<V2TXLiveCode> setVideoQuality(V2TXLiveVideoEncoderParam param)
|
|
373
|
-
```
|
|
374
|
-
|
|
375
|
-
**参数**:
|
|
376
|
-
- `param`: 视频编码参数 [V2TXLiveVideoEncoderParam]
|
|
377
|
-
|
|
378
|
-
## 音效和设备管理
|
|
379
|
-
|
|
380
|
-
### getAudioEffectManager
|
|
381
|
-
**功能**: 获取音效管理类
|
|
382
|
-
```dart
|
|
383
|
-
TXAudioEffectManager getAudioEffectManager()
|
|
384
|
-
```
|
|
385
|
-
|
|
386
|
-
**功能说明**:
|
|
387
|
-
- **背景音乐**: 支持在线音乐和本地音乐播放,支持变速、变调、原声、伴奏、循环等功能
|
|
388
|
-
- **耳返**: 麦克风采集的声音实时在耳机中播放,一般用于音乐直播
|
|
389
|
-
- **混响效果**: KTV、小房间、大会堂、深邃、洪亮等效果
|
|
390
|
-
- **变声效果**: 萝莉、大叔、重金属等效果
|
|
391
|
-
- **短音效**: 支持掌声、笑声等短音效文件(小于10秒的文件请设置`isShortFile`参数为`true`)
|
|
392
|
-
|
|
393
|
-
### getDeviceManager
|
|
394
|
-
**功能**: 获取设备管理类
|
|
395
|
-
```dart
|
|
396
|
-
TXDeviceManager getDeviceManager()
|
|
397
|
-
```
|
|
398
|
-
|
|
399
|
-
## 高级功能
|
|
400
|
-
|
|
401
|
-
### snapshot
|
|
402
|
-
**功能**: 推流过程中截取本地画面
|
|
403
|
-
```dart
|
|
404
|
-
Future<V2TXLiveCode> snapshot()
|
|
405
|
-
```
|
|
406
|
-
|
|
407
|
-
**返回值**:
|
|
408
|
-
- `V2TXLIVE_OK`: 成功
|
|
409
|
-
- `V2TXLIVE_ERROR_REFUSED`: 推流已停止,不允许截图操作
|
|
410
|
-
|
|
411
|
-
### enableVolumeEvaluation
|
|
412
|
-
**功能**: 开启采集音量提示
|
|
413
|
-
```dart
|
|
414
|
-
Future<V2TXLiveCode> enableVolumeEvaluation(int intervalMs)
|
|
415
|
-
```
|
|
416
|
-
|
|
417
|
-
**参数**:
|
|
418
|
-
- `intervalMs`: 音量回调触发间隔(毫秒),最小间隔100ms,小于等于0则禁用回调,建议设置为300ms
|
|
419
|
-
|
|
420
|
-
### enableCustomVideoProcess
|
|
421
|
-
**功能**: 启用/禁用自定义视频处理
|
|
422
|
-
```dart
|
|
423
|
-
Future<V2TXLiveCode> enableCustomVideoProcess(bool enable, V2TXLivePixelFormat pixelFormat, V2TXLiveBufferType bufferType)
|
|
424
|
-
```
|
|
425
|
-
|
|
426
|
-
**参数**:
|
|
427
|
-
- `enable`: true启用,false禁用(默认false)
|
|
428
|
-
- `pixelFormat`: 自定义预处理回调视频的像素格式 [V2TXLivePixelFormat]
|
|
429
|
-
- `bufferType`: 自定义预处理回调视频的数据格式 [V2TXLiveBufferType]
|
|
430
|
-
|
|
431
|
-
**支持的格式组合**:
|
|
432
|
-
- `V2TXLivePixelFormatTexture2D` + `V2TXLiveBufferTypeTexture`
|
|
433
|
-
- `V2TXLivePixelFormatI420` + `V2TXLiveBufferTypeByteBuffer`
|
|
434
|
-
|
|
435
|
-
### enableCustomVideoCapture
|
|
436
|
-
**功能**: 开启/关闭自定义视频采集
|
|
437
|
-
```dart
|
|
438
|
-
Future<V2TXLiveCode> enableCustomVideoCapture(bool enable)
|
|
439
|
-
```
|
|
440
|
-
|
|
441
|
-
**参数**:
|
|
442
|
-
- `enable`: true启用自定义采集,false禁用自定义采集(默认false)
|
|
443
|
-
|
|
444
|
-
**注意**: 此模式下SDK不再从摄像头采集图像,只保留编码和发送能力,需要在[startPush]之前调用才能生效
|
|
445
|
-
|
|
446
|
-
### enableCustomAudioCapture
|
|
447
|
-
**功能**: 开启/关闭自定义音频采集
|
|
448
|
-
```dart
|
|
449
|
-
Future<V2TXLiveCode> enableCustomAudioCapture(bool enable)
|
|
450
|
-
```
|
|
451
|
-
|
|
452
|
-
**参数**:
|
|
453
|
-
- `enable`: true启用自定义采集,false禁用自定义采集(默认false)
|
|
454
|
-
|
|
455
|
-
**注意**: 此模式下SDK不再从麦克风采集声音,只保留编码和发送能力,需要在[startPush]之前调用才能生效
|
|
456
|
-
|
|
457
|
-
### sendCustomVideoFrame
|
|
458
|
-
**功能**: 自定义视频采集模式下,将采集的视频数据发送给SDK
|
|
459
|
-
```dart
|
|
460
|
-
Future<V2TXLiveCode> sendCustomVideoFrame(V2TXLiveVideoFrame videoFrame)
|
|
461
|
-
```
|
|
462
|
-
|
|
463
|
-
**参数**:
|
|
464
|
-
- `videoFrame`: 发送给SDK的视频帧数据 [V2TXLiveVideoFrame]
|
|
465
|
-
|
|
466
|
-
**返回值**:
|
|
467
|
-
- `V2TXLIVE_OK`: 成功
|
|
468
|
-
- `V2TXLIVE_ERROR_INVALID_PARAMETER`: 发送失败,视频帧数据无效
|
|
469
|
-
- `V2TXLIVE_ERROR_REFUSED`: 发送失败,必须先调用[enableCustomVideoCapture]启用自定义视频采集
|
|
470
|
-
|
|
471
|
-
### sendCustomAudioFrame
|
|
472
|
-
**功能**: 自定义音频采集模式下,将采集的音频数据发送给SDK
|
|
473
|
-
```dart
|
|
474
|
-
Future<V2TXLiveCode> sendCustomAudioFrame(V2TXLiveAudioFrame audioFrame)
|
|
475
|
-
```
|
|
476
|
-
|
|
477
|
-
**参数**:
|
|
478
|
-
- `audioFrame`: 发送给SDK的音频帧数据 [V2TXLiveAudioFrame]
|
|
479
|
-
|
|
480
|
-
**返回值**:
|
|
481
|
-
- `V2TXLIVE_OK`: 成功
|
|
482
|
-
- `V2TXLIVE_ERROR_REFUSED`: 发送失败,必须先调用[enableCustomAudioCapture]启用自定义音频采集
|
|
483
|
-
|
|
484
|
-
### sendSeiMessage
|
|
485
|
-
**功能**: 发送SEI消息
|
|
486
|
-
```dart
|
|
487
|
-
Future<V2TXLiveCode> sendSeiMessage(int payloadType, Uint8List data)
|
|
488
|
-
```
|
|
489
|
-
|
|
490
|
-
**参数**:
|
|
491
|
-
- `payloadType`: 数据类型,支持5、242,推荐使用242
|
|
492
|
-
- `data`: 要发送的数据
|
|
493
|
-
|
|
494
|
-
**说明**: 播放器通过[V2TXLivePlayerListenerType.onReceiveSeiMessage]回调接收消息
|
|
495
|
-
|
|
496
|
-
### showDebugView
|
|
497
|
-
**功能**: 显示调试面板
|
|
498
|
-
```dart
|
|
499
|
-
Future<V2TXLiveCode> showDebugView(bool isShow)
|
|
500
|
-
```
|
|
501
|
-
|
|
502
|
-
**参数**:
|
|
503
|
-
- `isShow`: 是否显示(默认false)
|
|
504
|
-
|
|
505
|
-
### setProperty
|
|
506
|
-
**功能**: 调用V2TXLivePusher的高级API接口
|
|
507
|
-
```dart
|
|
508
|
-
Future<V2TXLiveCode> setProperty(String key, Object value)
|
|
509
|
-
```
|
|
510
|
-
|
|
511
|
-
**参数**:
|
|
512
|
-
- `key`: 高级API对应的key
|
|
513
|
-
- `value`: 调用高级API时需要的参数,为基础类型或jsonString
|
|
514
|
-
|
|
515
|
-
**返回值**:
|
|
516
|
-
- `V2TXLIVE_OK`: 成功
|
|
517
|
-
- `V2TXLIVE_ERROR_INVALID_PARAMETER`: 操作失败,key不允许为空
|
|
518
|
-
|
|
519
|
-
### setMixTranscodingConfig
|
|
520
|
-
**功能**: 设置云端的混流转码参数
|
|
521
|
-
```dart
|
|
522
|
-
Future<V2TXLiveCode> setMixTranscodingConfig(V2TXLiveTranscodingConfig? config)
|
|
523
|
-
```
|
|
524
|
-
|
|
525
|
-
**参数**:
|
|
526
|
-
- `config`: 混流转码配置 [V2TXLiveTranscodingConfig],传入null则取消云端混流转码
|
|
527
|
-
|
|
528
|
-
**返回值**: `V2TXLiveCode`
|
|
529
|
-
- `V2TXLIVE_OK`: 成功
|
|
530
|
-
- `V2TXLIVE_ERROR_REFUSED`: 未开启推流时,不允许设置混流转码参数
|
|
531
|
-
|
|
532
|
-
**混流原理**:
|
|
533
|
-
```
|
|
534
|
-
【画面1】=> 解码 ====> \
|
|
535
|
-
\
|
|
536
|
-
【画面2】=> 解码 => 画面混合 => 编码 => 【混合后的画面】
|
|
537
|
-
/
|
|
538
|
-
【画面3】=> 解码 ====> /
|
|
539
|
-
|
|
540
|
-
【声音1】=> 解码 ====> \
|
|
541
|
-
\
|
|
542
|
-
【声音2】=> 解码 => 声音混合 => 编码 => 【混合后的声音】
|
|
543
|
-
/
|
|
544
|
-
【声音3】=> 解码 ====> /
|
|
545
|
-
```
|
|
546
|
-
|
|
547
|
-
**注意事项**:
|
|
548
|
-
- **仅支持RTC协议混流**:该接口只能在RTC协议下使用,不支持RTMP等其他推流协议
|
|
549
|
-
- 云端转码会引入1-2秒的CDN观看延迟
|
|
550
|
-
- 及时传入null取消混流,避免不必要的计费损失
|
|
551
|
-
- 退房时会自动取消混流状态
|
|
552
|
-
|
|
553
|
-
**使用时机**: 推流过程中
|
|
554
|
-
|
|
555
|
-
**示例**:
|
|
556
|
-
```dart
|
|
557
|
-
V2TXLiveTranscodingConfig config = V2TXLiveTranscodingConfig(
|
|
558
|
-
videoWidth: 1280,
|
|
559
|
-
videoHeight: 720,
|
|
560
|
-
videoBitrate: 1500,
|
|
561
|
-
videoFps: 15
|
|
562
|
-
);
|
|
563
|
-
await pusher.setMixTranscodingConfig(config);
|
|
564
|
-
|
|
565
|
-
// 取消混流
|
|
566
|
-
await pusher.setMixTranscodingConfig(null);
|
|
567
|
-
```
|
|
568
|
-
|
|
569
|
-
## 使用示例
|
|
570
|
-
|
|
571
|
-
### 基础推流示例(摄像头+麦克风)
|
|
572
|
-
```dart
|
|
573
|
-
import 'package:tencent_trtc/v2_tx_live_pusher.dart';
|
|
574
|
-
import 'package:tencent_trtc/v2_tx_live_pusher_observer.dart';
|
|
575
|
-
import 'package:tencent_trtc/v2_tx_live_def.dart';
|
|
576
|
-
import 'package:tencent_trtc/v2_tx_live_code.dart';
|
|
577
|
-
|
|
578
|
-
class BasicPushExample {
|
|
579
|
-
late V2TXLivePusher pusher;
|
|
580
|
-
|
|
581
|
-
Future<void> setupBasicPush() async {
|
|
582
|
-
// 1. 创建推流器实例
|
|
583
|
-
pusher = await V2TXLivePusher.create(V2TXLiveMode.V2TXLiveModeRTC);
|
|
584
|
-
|
|
585
|
-
// 2. 设置回调观察者
|
|
586
|
-
pusher.addListener(V2TXLivePusherObserver(
|
|
587
|
-
onPushStatusUpdate: (status, msg, extraInfo) {
|
|
588
|
-
// 处理推流状态变化
|
|
589
|
-
switch (status) {
|
|
590
|
-
case V2TXLivePushStatus.V2TXLivePushStatusDisconnected:
|
|
591
|
-
print('推流连接断开');
|
|
592
|
-
break;
|
|
593
|
-
case V2TXLivePushStatus.V2TXLivePushStatusConnecting:
|
|
594
|
-
print('正在连接推流服务器');
|
|
595
|
-
break;
|
|
596
|
-
case V2TXLivePushStatus.V2TXLivePushStatusConnectSuccess:
|
|
597
|
-
print('推流连接成功');
|
|
598
|
-
break;
|
|
599
|
-
case V2TXLivePushStatus.V2TXLivePushStatusReconnecting:
|
|
600
|
-
print('推流正在重连');
|
|
601
|
-
break;
|
|
602
|
-
}
|
|
603
|
-
},
|
|
604
|
-
onStatisticsUpdate: (statistics) {
|
|
605
|
-
// 处理统计信息
|
|
606
|
-
print('App CPU: ${statistics.appCpu}%, System CPU: ${statistics.systemCpu}%');
|
|
607
|
-
print('Width: ${statistics.width}, Height: ${statistics.height}');
|
|
608
|
-
print('FPS: ${statistics.fps}, Video Bitrate: ${statistics.videoBitrate}');
|
|
609
|
-
print('Audio Bitrate: ${statistics.audioBitrate}');
|
|
610
|
-
},
|
|
611
|
-
onError: (code, msg, extraInfo) {
|
|
612
|
-
// 处理错误信息
|
|
613
|
-
print('推流错误: code=$code, msg=$msg');
|
|
614
|
-
}
|
|
615
|
-
));
|
|
616
|
-
|
|
617
|
-
// 3. 设置预览视图
|
|
618
|
-
await pusher.setRenderViewID(yourTextureViewID);
|
|
619
|
-
|
|
620
|
-
// 4. 重要:推流前必须开启至少一个采集源
|
|
621
|
-
// 开启摄像头采集(前置摄像头)
|
|
622
|
-
await pusher.startCamera(true);
|
|
623
|
-
|
|
624
|
-
// 开启麦克风采集
|
|
625
|
-
await pusher.startMicrophone();
|
|
626
|
-
|
|
627
|
-
// 5. 开始推流
|
|
628
|
-
String pushUrl = "rtmp://your-push-server/live/streamid";
|
|
629
|
-
V2TXLiveCode result = await pusher.startPush(pushUrl);
|
|
630
|
-
|
|
631
|
-
if (result == V2TXLiveCode.V2TXLIVE_OK) {
|
|
632
|
-
print('✅ 开始推流成功');
|
|
633
|
-
} else if (result == V2TXLiveCode.V2TXLIVE_ERROR_INVALID_PARAMETER) {
|
|
634
|
-
print('❌ 推流地址不合法');
|
|
635
|
-
} else if (result == V2TXLiveCode.V2TXLIVE_ERROR_INVALID_LICENSE) {
|
|
636
|
-
print('❌ Licence不合法,请检查Licence');
|
|
637
|
-
} else if (result == V2TXLiveCode.V2TXLIVE_ERROR_REFUSED) {
|
|
638
|
-
print('❌ 调用被拒绝');
|
|
639
|
-
}
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
Future<void> stopPush() async {
|
|
643
|
-
// 停止推流
|
|
644
|
-
await pusher.stopPush();
|
|
645
|
-
// 停止采集源
|
|
646
|
-
await pusher.stopCamera();
|
|
647
|
-
await pusher.stopMicrophone();
|
|
648
|
-
// 销毁实例
|
|
649
|
-
pusher.destroy();
|
|
650
|
-
}
|
|
651
|
-
}
|
|
652
|
-
```
|
|
653
|
-
|
|
654
|
-
### 高级配置示例
|
|
655
|
-
|
|
656
|
-
```dart
|
|
657
|
-
// 设置视频编码参数
|
|
658
|
-
V2TXLiveVideoEncoderParam videoParam = V2TXLiveVideoEncoderParam(
|
|
659
|
-
videoResolution: V2TXLiveVideoResolution.v2TXLiveVideoResolution1280x720,
|
|
660
|
-
videoResolutionMode: V2TXLiveVideoResolutionMode.v2TXLiveVideoResolutionModeLandscape,
|
|
661
|
-
videoFps: 15,
|
|
662
|
-
videoBitrate: 1200,
|
|
663
|
-
minVideoBitrate: 800,
|
|
664
|
-
);
|
|
665
|
-
await pusher.setVideoQuality(videoParam);
|
|
666
|
-
|
|
667
|
-
// 设置音频质量
|
|
668
|
-
await pusher.setAudioQuality(V2TXLiveAudioQuality.v2TXLiveAudioQualityMusic);
|
|
669
|
-
|
|
670
|
-
// 开启音量评估
|
|
671
|
-
await pusher.enableVolumeEvaluation(300);
|
|
672
|
-
|
|
673
|
-
// 显示调试面板
|
|
674
|
-
await pusher.showDebugView(true);
|
|
675
|
-
```
|
|
676
|
-
|
|
677
|
-
### 自定义采集示例
|
|
678
|
-
|
|
679
|
-
```dart
|
|
680
|
-
// 启用自定义视频采集
|
|
681
|
-
await pusher.enableCustomVideoCapture(true);
|
|
682
|
-
|
|
683
|
-
// 自定义视频帧处理
|
|
684
|
-
V2TXLiveVideoFrame videoFrame = V2TXLiveVideoFrame(
|
|
685
|
-
pixelFormat: V2TXLivePixelFormat.v2TXLivePixelFormatI420,
|
|
686
|
-
bufferType: V2TXLiveBufferType.v2TXLiveBufferTypeByteBuffer,
|
|
687
|
-
data: yourVideoData,
|
|
688
|
-
width: 640,
|
|
689
|
-
height: 480,
|
|
690
|
-
rotation: V2TXLiveRotation.v2TXLiveRotation0,
|
|
691
|
-
);
|
|
692
|
-
|
|
693
|
-
// 发送自定义视频帧
|
|
694
|
-
await pusher.sendCustomVideoFrame(videoFrame);
|
|
695
|
-
```
|
|
696
|
-
|
|
697
|
-
## 注意事项
|
|
698
|
-
|
|
699
|
-
### 1. 采集源要求(重要)
|
|
700
|
-
**推流前必须开启至少一个采集源**,否则推流将失败:
|
|
701
|
-
- **摄像头采集**: `startCamera()` + `startMicrophone()`
|
|
702
|
-
- **屏幕采集**: `startScreenCapture()` + `startMicrophone()`
|
|
703
|
-
- **图片推流**: `startVirtualCamera()` + `startMicrophone()`
|
|
704
|
-
- **自定义采集**: `enableCustomVideoCapture()` + `enableCustomAudioCapture()`
|
|
705
|
-
- **纯音频推流**: `startMicrophone()`
|
|
706
|
-
|
|
707
|
-
### 2. 采集源切换规则
|
|
708
|
-
- 同一Pusher实例下,仅有一个采集源可以上行
|
|
709
|
-
- 不同采集源之间切换需要成对调用:先关闭当前采集源,再开启新采集源
|
|
710
|
-
|
|
711
|
-
### 3. 调用顺序要求
|
|
712
|
-
1. 创建推流器实例
|
|
713
|
-
2. 设置回调和预览视图
|
|
714
|
-
3. 开启至少一个采集源
|
|
715
|
-
4. 调用`startPush()`开始推流
|
|
716
|
-
|
|
717
|
-
### 4. 自定义采集注意事项
|
|
718
|
-
- 需要在`startPush`之前调用自定义采集相关接口才会生效
|
|
719
|
-
- 自定义采集模式下,SDK只负责编码和发送,不进行实际采集
|
|
720
|
-
|
|
721
|
-
### 5. 云端混流注意事项
|
|
722
|
-
- **协议限制**: 云端混流功能仅支持RTC协议,不支持RTMP等其他推流协议
|
|
723
|
-
- 及时取消混流配置,避免不必要的计费损失
|
|
724
|
-
- 云端转码会引入1-2秒的CDN观看延时
|
|
725
|
-
|
|
726
|
-
### 6. 本地录制注意事项
|
|
727
|
-
- 推流开启后才能开始录制
|
|
728
|
-
- 录制过程中不要动态切换分辨率和软/硬编
|
|
729
|
-
|
|
730
|
-
### 7. 系统声音采集要求
|
|
731
|
-
- 需要Android API 29及以上版本
|
|
732
|
-
- 需要添加前台服务确保采集不被静默
|
|
733
|
-
- 只在屏幕分享时真正生效
|
|
734
|
-
|
|
735
|
-
### 8. 性能优化建议
|
|
736
|
-
- 根据场景选择合适的音视频质量参数
|
|
737
|
-
- 及时释放不使用的推流器实例
|
|
738
|
-
- 合理使用暂停/恢复功能节省带宽
|
|
739
|
-
|
|
740
|
-
### 9. 错误处理建议
|
|
741
|
-
- 必须处理`onError`回调,给用户适当的提示
|
|
742
|
-
- 网络异常时自动重连,无需手动处理
|
|
743
|
-
- Licence失效时及时更新Licence配置
|
|
744
|
-
|
|
745
|
-
### 10. 权限和资源管理
|
|
746
|
-
- 确保应用有摄像头和麦克风使用权限
|
|
747
|
-
- 及时调用`destroy`释放资源
|
|
748
|
-
- 避免内存泄漏,及时移除观察者
|