@tencent-rtc/mcp 1.6.3 → 1.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +0 -4
- package/knowledge/chunker.js +83 -54
- package/knowledge/path-meta.js +179 -26
- package/knowledge/search/exact-lookup.js +153 -0
- package/knowledge/search/filter-pool.js +73 -19
- package/knowledge/search/product-scope-intent.js +2 -2
- package/knowledge/search/requires-framework.js +2 -2
- package/knowledge/search/search-knowledge.js +235 -58
- package/package.json +1 -1
- package/resource/index/manifest.json +1 -1
- package/resource/integration/callkit/preset/android/integration.md +2 -4
- package/resource/integration/callkit/preset/flutter/integration.md +4 -5
- package/resource/integration/callkit/preset/ios/integration.md +1 -4
- package/resource/integration/callkit/preset/react/integration.md +13 -20
- package/resource/integration/callkit/preset/vue/integration.md +14 -21
- package/resource/integration/chat/preset/android/integration.md +6 -9
- package/resource/integration/chat/preset/flutter/integration.md +9 -12
- package/resource/integration/chat/preset/ios/integration.md +2 -4
- package/resource/integration/chat/preset/react/integration.md +0 -10
- package/resource/integration/livekit/preset/live/android/live-audience-integration.md +129 -0
- package/resource/integration/livekit/preset/live/android/live-host-integration.md +219 -0
- package/resource/integration/livekit/preset/live/android/live-list-integration.md +261 -0
- package/resource/integration/livekit/preset/live/android/prepare-integration.md +254 -0
- package/resource/integration/livekit/preset/live/ios/live-audience-integration.md +202 -0
- package/resource/integration/livekit/preset/live/ios/live-host-integration.md +369 -0
- package/resource/integration/livekit/preset/live/ios/live-list-integration.md +229 -0
- package/resource/integration/livekit/preset/live/ios/prepare-integration.md +204 -0
- package/resource/integration/livekit/preset/live/vue/live-list-integration.md +0 -3
- package/resource/integration/livekit/preset/live/vue/live-player-desk-integration.md +0 -5
- package/resource/integration/livekit/preset/live/vue/live-player-h5-integration.md +0 -6
- package/resource/integration/livekit/preset/live/vue/live-pusher-integration.md +5 -10
- package/resource/integration/roomkit/preset/vue/integration.md +0 -4
- package/resource/knowledge/callkit/best-practice/web/callengine-invitation.md +80 -0
- package/resource/knowledge/callkit/best-practice/web/callengine-log-control.md +24 -0
- package/resource/knowledge/callkit/best-practice/web/callkit-call-vs-calls.md +116 -0
- package/resource/knowledge/callkit/core-sdk/android/answer-call.md +7 -8
- package/resource/knowledge/callkit/core-sdk/android/make-call.md +5 -7
- package/resource/knowledge/callkit/core-sdk/android/offline-push.md +3 -5
- package/resource/knowledge/callkit/core-sdk/flutter/answer-call.md +2 -6
- package/resource/knowledge/callkit/core-sdk/flutter/make-call.md +2 -6
- package/resource/knowledge/callkit/core-sdk/flutter/offline-push.md +4 -9
- package/resource/knowledge/callkit/core-sdk/ios/answer-call.md +1 -4
- package/resource/knowledge/callkit/core-sdk/ios/make-call.md +8 -11
- package/resource/knowledge/callkit/core-sdk/ios/offline-push.md +17 -23
- package/resource/knowledge/callkit/core-sdk/web/call-engine.md +33 -0
- package/resource/knowledge/callkit/core-sdk/web/call-event.md +327 -0
- package/resource/knowledge/callkit/core-sdk/web/callengine-api-overview.md +33 -0
- package/resource/knowledge/callkit/faq/android.md +0 -2
- package/resource/knowledge/callkit/faq/error-code.md +0 -2
- package/resource/knowledge/callkit/faq/flutter.md +2 -2
- package/resource/knowledge/callkit/faq/ios.md +3 -5
- package/resource/knowledge/callkit/faq/web.md +2 -3
- package/resource/knowledge/callkit/preset/android/api.md +2 -5
- package/resource/knowledge/callkit/preset/ios/api.md +0 -2
- package/resource/knowledge/callkit/preset/react/api.md +445 -0
- package/resource/knowledge/callkit/preset/react/uikit-api-reference.md +445 -0
- package/resource/knowledge/callkit/preset/vue/api.md +465 -0
- package/resource/knowledge/callkit/preset/vue/uikit-api-reference.md +465 -0
- package/resource/knowledge/chat/best-practice/web/image-message-url-handling.md +16 -0
- package/resource/knowledge/chat/preset/android/features/chat-setting.md +1 -1
- package/resource/knowledge/chat/preset/android/features/conversation-list.md +1 -1
- package/resource/knowledge/chat/preset/android/features/language.md +0 -1
- package/resource/knowledge/chat/preset/android/features/message-input.md +1 -1
- package/resource/knowledge/chat/preset/android/features/message-list.md +2 -3
- package/resource/knowledge/chat/preset/android/features/search.md +0 -1
- package/resource/knowledge/chat/preset/android/features/theme.md +1 -1
- package/resource/knowledge/chat/preset/android-view/integration.md +3 -11
- package/resource/knowledge/chat/preset/flutter/features/conversation-list.md +0 -1
- package/resource/knowledge/chat/preset/flutter/features/message-list.md +1 -2
- package/resource/knowledge/chat/preset/flutter/features/search.md +5 -6
- package/resource/knowledge/chat/preset/flutter/features/theme.md +2 -2
- package/resource/knowledge/chat/preset/ios/features/chat-setting.md +1 -1
- package/resource/knowledge/chat/preset/ios/features/conversation-list.md +1 -2
- package/resource/knowledge/chat/preset/ios/features/message-list.md +1 -2
- package/resource/knowledge/chat/preset/ios/features/search.md +0 -1
- package/resource/knowledge/chat/preset/ios-uikit/integration.md +13 -15
- package/resource/knowledge/chat/preset/react/features/conversation-list.md +5 -5
- package/resource/knowledge/chat/preset/react/features/message-input.md +2 -3
- package/resource/knowledge/chat/preset/react/features/search.md +0 -1
- package/resource/knowledge/chat/preset/react/features/theme.md +0 -1
- package/resource/knowledge/livekit/core-sdk/api-reference/android/AudioEffectStore.md +7 -14
- package/resource/knowledge/livekit/core-sdk/api-reference/android/BarrageStore.md +5 -8
- package/resource/knowledge/livekit/core-sdk/api-reference/android/BattleStore.md +15 -18
- package/resource/knowledge/livekit/core-sdk/api-reference/android/CameraView.md +1 -2
- package/resource/knowledge/livekit/core-sdk/api-reference/android/CoGuestStore.md +15 -20
- package/resource/knowledge/livekit/core-sdk/api-reference/android/CoHostStore.md +10 -13
- package/resource/knowledge/livekit/core-sdk/api-reference/android/DeviceStore.md +2 -4
- package/resource/knowledge/livekit/core-sdk/api-reference/android/GiftStore.md +4 -6
- package/resource/knowledge/livekit/core-sdk/api-reference/android/LikeStore.md +2 -4
- package/resource/knowledge/livekit/core-sdk/api-reference/android/LiveAudienceStore.md +2 -4
- package/resource/knowledge/livekit/core-sdk/api-reference/android/LiveCoreView.md +1 -2
- package/resource/knowledge/livekit/core-sdk/api-reference/android/LiveSeatStore.md +8 -10
- package/resource/knowledge/livekit/core-sdk/api-reference/android/LoginStore.md +5 -7
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/AudioEffectStore.md +7 -14
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/BarrageStore.md +6 -9
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/BaseBeautyStore.md +1 -2
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/BattleStore.md +15 -18
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/CoGuestStore.md +15 -20
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/CoHostStore.md +10 -13
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/DeviceStore.md +2 -4
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/GiftStore.md +4 -6
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LikeStore.md +2 -4
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LiveAudienceStore.md +2 -4
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LiveCoreView.md +1 -2
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LiveSeatStore.md +8 -10
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LoginStore.md +3 -5
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/AudioEffectStore.md +7 -14
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/BarrageStore.md +5 -8
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/BaseBeautyStore.md +1 -2
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/BattleStore.md +6 -9
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/CoGuestStore.md +5 -10
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/CoHostStore.md +3 -6
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/DeviceStore.md +2 -4
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/GiftStore.md +4 -6
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/LikeStore.md +2 -4
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/LiveAudienceStore.md +2 -4
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/LiveCoreView.md +1 -2
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/LiveSeatStore.md +4 -6
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/LoginStore.md +3 -5
- package/resource/knowledge/livekit/core-sdk/api-reference/{web → vue}/index.md +24 -24
- package/resource/knowledge/livekit/core-sdk/{voice/android/voice-audio-effect.md → features/android/audio-effect.md} +1 -2
- package/resource/knowledge/livekit/core-sdk/{live/android/live-gift.md → features/android/gift.md} +2 -3
- package/resource/knowledge/livekit/core-sdk/{voice/android/voice-room-list.md → features/android/live-list.md} +2 -4
- package/resource/knowledge/livekit/core-sdk/{live/flutter/live-audio-effect.md → features/flutter/audio-effect.md} +0 -2
- package/resource/knowledge/livekit/core-sdk/{voice/flutter/voice-barrage.md → features/flutter/barrage.md} +2 -2
- package/resource/knowledge/livekit/core-sdk/{live/flutter/live-gift.md → features/flutter/gift.md} +2 -3
- package/resource/knowledge/livekit/core-sdk/{voice/flutter/voice-room-list.md → features/flutter/live-list.md} +1 -1
- package/resource/knowledge/livekit/core-sdk/{voice/ios/voice-audience-list.md → features/ios/audience-list.md} +1 -2
- package/resource/knowledge/livekit/core-sdk/{voice/ios/voice-audio-effect.md → features/ios/audio-effect.md} +1 -3
- package/resource/knowledge/livekit/core-sdk/{live/ios/live-base-beauty.md → features/ios/base-beauty.md} +2 -2
- package/resource/knowledge/livekit/core-sdk/{voice/ios/voice-gift.md → features/ios/gift.md} +2 -3
- package/resource/knowledge/livekit/core-sdk/{voice/ios/voice-room-list.md → features/ios/live-list.md} +2 -4
- package/resource/knowledge/livekit/core-sdk/live/android/{live-co-guest-interaction.md → co-guest-interaction.md} +0 -1
- package/resource/knowledge/livekit/core-sdk/live/android/{live-host-interaction.md → host-interaction.md} +5 -7
- package/resource/knowledge/livekit/core-sdk/live/android/{live-integration.md → integration.md} +3 -6
- package/resource/knowledge/livekit/core-sdk/live/flutter/{live-co-guest-interaction.md → co-guest-interaction.md} +1 -1
- package/resource/knowledge/livekit/core-sdk/live/flutter/{live-host-interaction.md → host-interaction.md} +0 -2
- package/resource/knowledge/livekit/core-sdk/live/flutter/{live-integration.md → integration.md} +1 -4
- package/resource/knowledge/livekit/core-sdk/live/ios/{live-co-guest-interaction.md → co-guest-interaction.md} +0 -1
- package/resource/knowledge/livekit/core-sdk/live/ios/{live-host-interaction.md → host-interaction.md} +2 -4
- package/resource/knowledge/livekit/core-sdk/live/ios/{live-integration.md → integration.md} +2 -5
- package/resource/knowledge/livekit/core-sdk/voice/android/{voice-host-interaction.md → host-interaction.md} +3 -5
- package/resource/knowledge/livekit/core-sdk/voice/android/{voice-integration.md → integration.md} +3 -6
- package/resource/knowledge/livekit/core-sdk/voice/flutter/{voice-co-guest-interaction.md → co-guest-interaction.md} +1 -2
- package/resource/knowledge/livekit/core-sdk/voice/flutter/{voice-integration.md → integration.md} +6 -9
- package/resource/knowledge/livekit/core-sdk/voice/ios/{voice-co-guest-interaction.md → co-guest-interaction.md} +2 -2
- package/resource/knowledge/livekit/core-sdk/voice/ios/{voice-host-interaction.md → host-interaction.md} +4 -6
- package/resource/knowledge/livekit/core-sdk/voice/ios/{voice-integration.md → integration.md} +1 -4
- package/resource/knowledge/livekit/preset/live/vue/features/barrage.md +0 -2
- package/resource/knowledge/push/api-reference/android.md +123 -0
- package/resource/knowledge/push/api-reference/flutter.md +176 -0
- package/resource/knowledge/push/api-reference/harmonyos.md +138 -0
- package/resource/knowledge/push/api-reference/ios.md +176 -0
- package/resource/knowledge/push/api-reference/react-native.md +147 -0
- package/resource/knowledge/push/api-reference/uni-app.md +147 -0
- package/resource/knowledge/push/api-reference/unity.md +119 -0
- package/resource/knowledge/push/api-reference/unreal-engine.md +123 -0
- package/resource/knowledge/push/config/android.md +4 -7
- package/resource/knowledge/push/config/harmonyos.md +0 -3
- package/resource/knowledge/push/config/ios.md +12 -20
- package/resource/knowledge/push/config/react-native.md +18 -26
- package/resource/knowledge/push/config/unity.md +20 -28
- package/resource/knowledge/push/config/unreal-engine.md +21 -29
- package/resource/knowledge/push/integration/android.md +6 -8
- package/resource/knowledge/push/integration/flutter.md +6 -9
- package/resource/knowledge/push/integration/harmonyos.md +1 -0
- package/resource/knowledge/push/integration/ios.md +7 -9
- package/resource/knowledge/push/integration/react-native.md +9 -13
- package/resource/knowledge/push/integration/uni-app.md +7 -7
- package/resource/knowledge/push/integration/unity.md +10 -13
- package/resource/knowledge/push/integration/unreal-engine.md +6 -9
- package/resource/knowledge/push/overview/prepare.md +2 -2
- package/resource/knowledge/roomkit/core-sdk/android/call-user-to-room.md +3 -3
- package/resource/knowledge/roomkit/core-sdk/android/capability-matrix.md +46 -0
- package/resource/knowledge/roomkit/core-sdk/android/room-participant-state.md +1 -1
- package/resource/knowledge/roomkit/core-sdk/android/room-state.md +2 -2
- package/resource/knowledge/roomkit/core-sdk/android/schedule-room.md +6 -6
- package/resource/knowledge/roomkit/core-sdk/android/unsupported-features.md +79 -0
- package/resource/knowledge/roomkit/core-sdk/flutter/capability-matrix.md +46 -0
- package/resource/knowledge/roomkit/core-sdk/flutter/room-participant-state.md +1 -1
- package/resource/knowledge/roomkit/core-sdk/flutter/unsupported-features.md +79 -0
- package/resource/knowledge/roomkit/core-sdk/ios/capability-matrix.md +46 -0
- package/resource/knowledge/roomkit/core-sdk/ios/room-participant-state.md +1 -1
- package/resource/knowledge/roomkit/core-sdk/ios/unsupported-features.md +79 -0
- package/resource/knowledge/roomkit/preset/android/integration.md +5 -7
- package/resource/knowledge/roomkit/preset/flutter/integration.md +2 -7
- package/resource/knowledge/roomkit/preset/ios/integration.md +3 -9
- package/resource/knowledge/roomkit/preset/react/integration.md +12 -16
- package/resource/knowledge/trtc/android/TRTCCloud.md +154 -238
- package/resource/knowledge/trtc/android/TRTCCloudDef.md +133 -134
- package/resource/knowledge/trtc/android/TRTCCloudListener.md +86 -120
- package/resource/knowledge/trtc/android/TRTCStatistics.md +10 -10
- package/resource/knowledge/trtc/android/TXAudioEffectManager.md +10 -30
- package/resource/knowledge/trtc/android/TXBeautyManager.md +25 -25
- package/resource/knowledge/trtc/android/TXDeviceManager.md +2 -2
- package/resource/knowledge/trtc/android/TXLiteAVCode.md +12 -12
- package/resource/knowledge/trtc/c++/ITRTCCloud.md +166 -261
- package/resource/knowledge/trtc/c++/ITRTCStatistics.md +12 -12
- package/resource/knowledge/trtc/c++/ITXAudioEffectManager.md +10 -30
- package/resource/knowledge/trtc/c++/ITXDeviceManager.md +9 -11
- package/resource/knowledge/trtc/c++/TRTCCloudCallback.md +96 -130
- package/resource/knowledge/trtc/c++/TRTCTypeDef.md +122 -123
- package/resource/knowledge/trtc/c++/TXLiteAVCode.md +12 -12
- package/resource/knowledge/trtc/ios/TRTCCloud.md +168 -255
- package/resource/knowledge/trtc/ios/TRTCCloudDef.md +124 -125
- package/resource/knowledge/trtc/ios/TRTCCloudDelegate.md +89 -124
- package/resource/knowledge/trtc/ios/TRTCStatistics.md +10 -10
- package/resource/knowledge/trtc/ios/TXAudioEffectManager.md +9 -28
- package/resource/knowledge/trtc/ios/TXBeautyManager.md +25 -25
- package/resource/knowledge/trtc/ios/TXDeviceManager.md +9 -11
- package/resource/knowledge/trtc/ios/TXLiteAVCode.md +12 -12
- package/server-config.js +7 -4
- package/server.js +21 -21
- package/tools/common/finalize_answer.js +1 -1
- package/tools/common/present_framework_choice.js +2 -2
- package/tools/common/search_trtc_knowledge.js +3 -3
- package/tools/common/submit_feedback.js +1 -1
- package/tools/definitions/get_native_live_uikit_integration_def.js +61 -0
- package/tools/definitions/get_native_livekit_core_integration_def.js +3 -3
- package/tools/definitions/present_framework_choice_def.js +2 -2
- package/tools/definitions/search_trtc_knowledge_def.js +5 -5
- package/tools/index.js +2 -0
- package/tools/live/get_native_live_uikit_integration.js +69 -0
- package/tools/live/get_native_livekit_core_integration.js +6 -6
- package/utils/is-valid-sdkappid.js +4 -0
- package/utils/report-cls-client.js +1 -1
- package/utils/report-es-client.js +1 -1
- package/resource/knowledge/callkit/preset/web/api.md +0 -83
- package/resource/knowledge/livekit/core-sdk/live/android/live-audio-effect.md +0 -226
- package/resource/knowledge/livekit/core-sdk/live/android/live-live-list.md +0 -438
- package/resource/knowledge/livekit/core-sdk/live/flutter/live-barrage.md +0 -490
- package/resource/knowledge/livekit/core-sdk/live/flutter/live-live-list.md +0 -726
- package/resource/knowledge/livekit/core-sdk/live/ios/live-audience-list.md +0 -264
- package/resource/knowledge/livekit/core-sdk/live/ios/live-audio-effect.md +0 -216
- package/resource/knowledge/livekit/core-sdk/live/ios/live-gift.md +0 -407
- package/resource/knowledge/livekit/core-sdk/live/ios/live-live-list.md +0 -349
- package/resource/knowledge/livekit/core-sdk/voice/android/voice-audience-list.md +0 -269
- package/resource/knowledge/livekit/core-sdk/voice/android/voice-barrage.md +0 -456
- package/resource/knowledge/livekit/core-sdk/voice/android/voice-gift.md +0 -455
- package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-audience-list.md +0 -260
- package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-audio-effect.md +0 -598
- package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-gift.md +0 -424
- package/resource/knowledge/livekit/core-sdk/voice/ios/voice-barrage.md +0 -408
- /package/resource/knowledge/livekit/core-sdk/{live/android/live-audience-list.md → features/android/audience-list.md} +0 -0
- /package/resource/knowledge/livekit/core-sdk/{live/android/live-barrage.md → features/android/barrage.md} +0 -0
- /package/resource/knowledge/livekit/core-sdk/{live/android/live-base-beauty.md → features/android/base-beauty.md} +0 -0
- /package/resource/knowledge/livekit/core-sdk/{live/flutter/live-audience-list.md → features/flutter/audience-list.md} +0 -0
- /package/resource/knowledge/livekit/core-sdk/{live/flutter/live-base-beauty.md → features/flutter/base-beauty.md} +0 -0
- /package/resource/knowledge/livekit/core-sdk/{live/ios/live-barrage.md → features/ios/barrage.md} +0 -0
- /package/resource/knowledge/livekit/core-sdk/voice/android/{voice-co-guest-interaction.md → co-guest-interaction.md} +0 -0
|
@@ -106,8 +106,8 @@ If you have configured the callback of custom rendering for local or remote vide
|
|
|
106
106
|
|Param|DESC|
|
|
107
107
|
|---------|---------|
|
|
108
108
|
|frame|Video frames to be rendered|
|
|
109
|
-
|streamType|Stream type. The primary stream (`
|
|
110
|
-
|userId
|
|
109
|
+
|streamType|Stream type. The primary stream ( `Main` ) is usually used for camera images, and the substream ( `Sub` ) for screen sharing images.|
|
|
110
|
+
|userId| `userId` of the video source. This parameter can be ignored if the callback is for local video (setLocalVideoRenderDelegate).|
|
|
111
111
|
|
|
112
112
|
## onGLContextCreated
|
|
113
113
|
|
|
@@ -117,13 +117,13 @@ If you have configured the callback of custom rendering for local or remote vide
|
|
|
117
117
|
|
|
118
118
|
**Video processing by third-party beauty filters.**
|
|
119
119
|
|
|
120
|
-
If you use a third-party beauty filter component, you need to configure this callback in
|
|
120
|
+
If you use a third-party beauty filter component, you need to configure this callback in `TRTCCloud` to have the SDK return to you video frames that are otherwise pre-processed by TRTC.
|
|
121
121
|
|
|
122
122
|
You can then send the video frames to the third-party beauty filter component for processing. As the data returned can be read and modified, the result of processing can be synced to TRTC for subsequent encoding and publishing.
|
|
123
123
|
|
|
124
124
|
Case 1: the beauty filter component generates new textures
|
|
125
125
|
|
|
126
|
-
If the beauty filter component you use generates a frame of new texture (for the processed image) during image processing, please set
|
|
126
|
+
If the beauty filter component you use generates a frame of new texture (for the processed image) during image processing, please set `dstFrame.textureId` to the ID of the new texture in the callback function.
|
|
127
127
|
``` java
|
|
128
128
|
private final TRTCVideoFrameListener mVideoFrameListener = new TRTCVideoFrameListener() {
|
|
129
129
|
@Override
|
|
@@ -160,7 +160,6 @@ int onProcessVideoFrame(TRTCCloudDef.TRTCVideoFrame srcFrame, TRTCCloudDef.TRTCV
|
|
|
160
160
|
|
|
161
161
|
> **Note**
|
|
162
162
|
>
|
|
163
|
-
|
|
164
163
|
> Currently, only the OpenGL texture scheme is supported(PC supports TRTCVideoBufferType_Buffer format Only)
|
|
165
164
|
>
|
|
166
165
|
|
|
@@ -185,13 +184,10 @@ After you configure the callback of custom audio processing, the SDK will return
|
|
|
185
184
|
|
|
186
185
|
> **Note**
|
|
187
186
|
>
|
|
188
|
-
|
|
189
187
|
> 1. Please avoid time-consuming operations in this callback function. The SDK processes an audio frame every 20 ms, so if your operation takes more than 20 ms, it will cause audio exceptions.
|
|
190
188
|
>
|
|
191
|
-
|
|
192
189
|
> 2. The audio data returned via this callback can be read and modified, but please keep the duration of your operation short.
|
|
193
190
|
>
|
|
194
|
-
|
|
195
191
|
> 3. The audio data is returned via this callback after ANS, AEC and AGC, but it **does not include** pre-processing effects like background music, audio effects, or reverb, and therefore has a short delay.
|
|
196
192
|
>
|
|
197
193
|
|
|
@@ -208,11 +204,11 @@ After you configure the callback of custom audio processing, the SDK will return
|
|
|
208
204
|
|
|
209
205
|
Instructions:
|
|
210
206
|
|
|
211
|
-
You could write data to the
|
|
207
|
+
You could write data to the `TRTCAudioFrame.extraData` filed, in order to achieve the purpose of transmitting signaling.
|
|
212
208
|
|
|
213
209
|
Because the data block of the audio frame header cannot be too large, we recommend you limit the size of the signaling data to only a few bytes when using this API. If extra data more than 100 bytes, it won't be sent.
|
|
214
210
|
|
|
215
|
-
Other users in the room can receive the message through the
|
|
211
|
+
Other users in the room can receive the message through the `TRTCAudioFrame.extraData` in `onRemoteUserAudioFrame` callback in TRTCAudioFrameDelegate.
|
|
216
212
|
|
|
217
213
|
|Param|DESC|
|
|
218
214
|
|---------|---------|
|
|
@@ -220,13 +216,10 @@ Other users in the room can receive the message through the ` TRTCAudioFrame.ext
|
|
|
220
216
|
|
|
221
217
|
> **Note**
|
|
222
218
|
>
|
|
223
|
-
|
|
224
219
|
> 1. Please avoid time-consuming operations in this callback function. The SDK processes an audio frame every 20 ms, so if your operation takes more than 20 ms, it will cause audio exceptions.
|
|
225
220
|
>
|
|
226
|
-
|
|
227
221
|
> 2. The audio data returned via this callback can be read and modified, but please keep the duration of your operation short.
|
|
228
222
|
>
|
|
229
|
-
|
|
230
223
|
> 3. Audio data is returned via this callback after ANS, AEC, AGC, effect-processing and BGM-mixing, and therefore the delay is longer than that with onCapturedAudioFrame.
|
|
231
224
|
>
|
|
232
225
|
|
|
@@ -248,7 +241,6 @@ After you configure the callback of custom audio processing, the SDK will return
|
|
|
248
241
|
|
|
249
242
|
> **Note**
|
|
250
243
|
>
|
|
251
|
-
|
|
252
244
|
> The audio data returned via this callback can be read but not modified.
|
|
253
245
|
>
|
|
254
246
|
|
|
@@ -269,13 +261,10 @@ After you configure the callback of custom audio processing, the SDK will return
|
|
|
269
261
|
|
|
270
262
|
> **Note**
|
|
271
263
|
>
|
|
272
|
-
|
|
273
264
|
> 1. Please avoid time-consuming operations in this callback function. The SDK processes an audio frame every 20 ms, so if your operation takes more than 20 ms, it will cause audio exceptions.
|
|
274
265
|
>
|
|
275
|
-
|
|
276
266
|
> 2. The audio data returned via this callback can be read and modified, but please keep the duration of your operation short.
|
|
277
267
|
>
|
|
278
|
-
|
|
279
268
|
> 3. The audio data returned via this callback is the audio data mixed from each channel before it is played. It does not include the in-ear monitoring data.
|
|
280
269
|
>
|
|
281
270
|
|
|
@@ -296,10 +285,8 @@ After you configure the callback of custom audio processing, the SDK will return
|
|
|
296
285
|
|
|
297
286
|
> **Note**
|
|
298
287
|
>
|
|
299
|
-
|
|
300
288
|
> 1. This data returned via this callback is mixed from all audio in the SDK, including local audio after pre-processing (ANS, AEC, and AGC), special effects application, and music mixing, as well as all remote audio, but it does not include the in-ear monitoring data.
|
|
301
289
|
>
|
|
302
|
-
|
|
303
290
|
> 2. The audio data returned via this callback cannot be modified.
|
|
304
291
|
>
|
|
305
292
|
|
|
@@ -320,10 +307,8 @@ After you configure the callback of custom audio processing, the SDK will return
|
|
|
320
307
|
|
|
321
308
|
> **Note**
|
|
322
309
|
>
|
|
323
|
-
|
|
324
310
|
> 1. Please avoid time-consuming operations in this callback function, or it will cause audio exceptions.
|
|
325
311
|
>
|
|
326
|
-
|
|
327
312
|
> 2. The audio data returned via this callback can be read and modified, but please keep the duration of your operation short.
|
|
328
313
|
>
|
|
329
314
|
|
|
@@ -337,7 +322,7 @@ If you want to capture the local log printing event, you can configure the log c
|
|
|
337
322
|
|---------|---------|
|
|
338
323
|
|level|Log level. For more information, please see TRTC_LOG_LEVEL.|
|
|
339
324
|
|log|Log content|
|
|
340
|
-
|module|Reserved field, which is not defined at the moment and has a fixed value of
|
|
325
|
+
|module|Reserved field, which is not defined at the moment and has a fixed value of `TXLiteAVSDK` .|
|
|
341
326
|
|
|
342
327
|
## onError
|
|
343
328
|
|
|
@@ -371,79 +356,77 @@ For more information, see [Error Codes](https://intl.cloud.tencent.com/document/
|
|
|
371
356
|
|
|
372
357
|
**Whether room entry is successful.**
|
|
373
358
|
|
|
374
|
-
After calling the enterRoom API in
|
|
375
|
-
- If room entry succeeded,
|
|
359
|
+
After calling the enterRoom API in `TRTCCloud` to enter a room, you will receive the `onEnterRoom(result)` callback from `TRTCCloudDelegate` .
|
|
360
|
+
- If room entry succeeded, `result` will be a positive number ( `result` > 0), indicating the time in milliseconds (ms) the room entry takes.
|
|
376
361
|
|
|
377
|
-
- If room entry failed,
|
|
362
|
+
- If room entry failed, `result` will be a negative number (result < 0), indicating the error code for the failure.
|
|
378
363
|
|
|
379
364
|
For more information on the error codes for room entry failure, see [Error Codes](https://intl.cloud.tencent.com/document/product/647/35135).
|
|
380
365
|
|
|
381
366
|
|Param|DESC|
|
|
382
367
|
|---------|---------|
|
|
383
|
-
|result|If
|
|
368
|
+
|result|If `result` is greater than 0, it indicates the time (in ms) the room entry takes; if `result` is less than 0, it represents the error code for room entry.|
|
|
384
369
|
|
|
385
370
|
> **Note**
|
|
386
371
|
>
|
|
387
|
-
|
|
388
|
-
> 1. In TRTC versions below 6.6, the ` onEnterRoom(result) ` callback is returned only if room entry succeeds, and the onError callback is returned if room entry fails.
|
|
372
|
+
> 1. In TRTC versions below 6.6, the `onEnterRoom(result)` callback is returned only if room entry succeeds, and the onError callback is returned if room entry fails.
|
|
389
373
|
>
|
|
390
|
-
|
|
391
|
-
> 2. In TRTC 6.6 and above, the ` onEnterRoom(result) ` callback is returned regardless of whether room entry succeeds or fails, and the onError callback is also returned if room entry fails.
|
|
374
|
+
> 2. In TRTC 6.6 and above, the `onEnterRoom(result)` callback is returned regardless of whether room entry succeeds or fails, and the onError callback is also returned if room entry fails.
|
|
392
375
|
>
|
|
393
376
|
|
|
394
377
|
## onExitRoom
|
|
395
378
|
|
|
396
379
|
**Room exit.**
|
|
397
380
|
|
|
398
|
-
Calling the exitRoom API in
|
|
381
|
+
Calling the exitRoom API in `TRTCCloud` will trigger the execution of room exit-related logic, such as releasing resources of audio/video devices and codecs.
|
|
399
382
|
|
|
400
|
-
After all resources occupied by the SDK are released, the SDK will return the
|
|
383
|
+
After all resources occupied by the SDK are released, the SDK will return the `onExitRoom()` callback.
|
|
401
384
|
|
|
402
|
-
If you need to call enterRoom again or switch to another audio/video SDK, please wait until you receive the
|
|
385
|
+
If you need to call enterRoom again or switch to another audio/video SDK, please wait until you receive the `onExitRoom()` callback.
|
|
403
386
|
|
|
404
387
|
Otherwise, you may encounter problems such as the camera or mic being occupied.
|
|
405
388
|
|
|
406
389
|
|Param|DESC|
|
|
407
390
|
|---------|---------|
|
|
408
|
-
|reason|Reason for room exit.
|
|
391
|
+
|reason|Reason for room exit. `0` : the user called `exitRoom` to exit the room; `1` : the user was removed from the room by the server; `2` : the room was dismissed; `3` : the server status was abnormal.|
|
|
409
392
|
|
|
410
393
|
## onSwitchRole
|
|
411
394
|
|
|
412
395
|
**Role switching.**
|
|
413
396
|
|
|
414
|
-
You can call the switchRole API in
|
|
397
|
+
You can call the switchRole API in `TRTCCloud` to switch between the anchor and audience roles. This is accompanied by a line switching process.
|
|
415
398
|
|
|
416
|
-
After the switching, the SDK will return the
|
|
399
|
+
After the switching, the SDK will return the `onSwitchRole()` event callback.
|
|
417
400
|
|
|
418
401
|
|Param|DESC|
|
|
419
402
|
|---------|---------|
|
|
420
|
-
|errCode|Error code.
|
|
403
|
+
|errCode|Error code. `ERR_NULL` indicates a successful switch. For more information, please see [Error Codes](https://intl.cloud.tencent.com/document/product/647/35135).|
|
|
421
404
|
|errMsg|Error message|
|
|
422
405
|
|
|
423
406
|
## onSwitchRoom
|
|
424
407
|
|
|
425
408
|
**Result of room switching.**
|
|
426
409
|
|
|
427
|
-
You can call the switchRoom API in
|
|
410
|
+
You can call the switchRoom API in `TRTCCloud` to switch from one room to another.
|
|
428
411
|
|
|
429
|
-
After the switching, the SDK will return the
|
|
412
|
+
After the switching, the SDK will return the `onSwitchRoom()` event callback.
|
|
430
413
|
|
|
431
414
|
|Param|DESC|
|
|
432
415
|
|---------|---------|
|
|
433
|
-
|errCode|Error code.
|
|
416
|
+
|errCode|Error code. `ERR_NULL` indicates a successful switch. For more information, please see [Error Codes](https://intl.cloud.tencent.com/document/product/647/35124).|
|
|
434
417
|
|errMsg|Error message|
|
|
435
418
|
|
|
436
419
|
## onConnectOtherRoom
|
|
437
420
|
|
|
438
421
|
**Result of requesting cross-room call.**
|
|
439
422
|
|
|
440
|
-
You can call the connectOtherRoom API in
|
|
423
|
+
You can call the connectOtherRoom API in `TRTCCloud` to establish a video call with the anchor of another room. This is the “anchor competition” feature.
|
|
441
424
|
|
|
442
|
-
The caller will receive the
|
|
425
|
+
The caller will receive the `onConnectOtherRoom()` callback, which can be used to determine whether the cross-room call is successful.
|
|
443
426
|
|
|
444
427
|
|Param|DESC|
|
|
445
428
|
|---------|---------|
|
|
446
|
-
|errCode|Error code.
|
|
429
|
+
|errCode|Error code. `ERR_NULL` indicates that cross-room connection is established successfully. For more information, please see [Error Codes](https://intl.cloud.tencent.com/document/product/647/35135).|
|
|
447
430
|
|errMsg|Error message|
|
|
448
431
|
|userId|The user ID of the anchor (in another room) to be called|
|
|
449
432
|
|
|
@@ -451,33 +434,33 @@ The caller will receive the ` onConnectOtherRoom() ` callback, which can be used
|
|
|
451
434
|
|
|
452
435
|
**Result of ending cross-room call.**
|
|
453
436
|
|
|
454
|
-
You can call the disConnectOtherRoom API in
|
|
437
|
+
You can call the disConnectOtherRoom API in `TRTCCloud` to end a video call with the anchor of another room. This is the “anchor competition” feature.
|
|
455
438
|
|
|
456
|
-
The caller will receive the
|
|
439
|
+
The caller will receive the `onDisconnectOtherRoom()` callback to determine whether the cross-room call has been successfully disconnected.
|
|
457
440
|
|
|
458
441
|
|Param|DESC|
|
|
459
442
|
|---------|---------|
|
|
460
|
-
|errCode|Error code.
|
|
443
|
+
|errCode|Error code. `ERR_NULL` indicates that the cross-room call has been successfully disconnected. For more information, please see [Error Codes](https://intl.cloud.tencent.com/document/product/647/35135).|
|
|
461
444
|
|errMsg|Error message|
|
|
462
445
|
|
|
463
446
|
## onUpdateOtherRoomForwardMode
|
|
464
447
|
|
|
465
448
|
**Result of changing the upstream capability of the cross-room anchor.**
|
|
466
449
|
|
|
467
|
-
You can call the updateOtherRoomForwardMode API in
|
|
450
|
+
You can call the updateOtherRoomForwardMode API in `TRTCCloud` to limit the upstream capability of the cross-room anchor in the current room, and prohibit or allow the cross-room anchor to publish audio/video/sub-stream. This behavior will affect all users in the room.
|
|
468
451
|
|
|
469
|
-
The caller will receive the
|
|
452
|
+
The caller will receive the `onUpdateOtherRoomForwardMode()` callback to determine whether the changing upstream capability of the cross-room anchor is successful.
|
|
470
453
|
|
|
471
454
|
|Param|DESC|
|
|
472
455
|
|---------|---------|
|
|
473
|
-
|errCode|Error code.
|
|
456
|
+
|errCode|Error code. `ERR_NULL` indicates that upstream capability of the cross-room anchor is changed successfully. For more information, please see [Error Codes](https://intl.cloud.tencent.com/document/product/647/35135).|
|
|
474
457
|
|errMsg|Error message|
|
|
475
458
|
|
|
476
459
|
## onRemoteUserEnterRoom
|
|
477
460
|
|
|
478
461
|
**A user entered the room.**
|
|
479
462
|
|
|
480
|
-
Due to performance concerns, this callback works differently in different scenarios (i.e.,
|
|
463
|
+
Due to performance concerns, this callback works differently in different scenarios (i.e., `AppScene` , which you can specify by setting the second parameter when calling enterRoom).
|
|
481
464
|
- Live streaming scenarios (TRTC_APP_SCENE_LIVE or TRTC_APP_SCENE_VOICE_CHATROOM): in live streaming scenarios, a user is either in the role of an anchor or audience. The callback is returned only when an anchor enters the room.
|
|
482
465
|
|
|
483
466
|
- Call scenarios (TRTC_APP_SCENE_VIDEOCALL or TRTC_APP_SCENE_AUDIOCALL): in call scenarios, the concept of roles does not apply (all users can be considered as anchors), and the callback is returned when any user enters the room.
|
|
@@ -488,10 +471,8 @@ Due to performance concerns, this callback works differently in different scenar
|
|
|
488
471
|
|
|
489
472
|
> **Note**
|
|
490
473
|
>
|
|
491
|
-
|
|
492
|
-
> 1. The ` onRemoteUserEnterRoom ` callback indicates that a user entered the room, but it does not necessarily mean that the user enabled audio or video.
|
|
474
|
+
> 1. The `onRemoteUserEnterRoom` callback indicates that a user entered the room, but it does not necessarily mean that the user enabled audio or video.
|
|
493
475
|
>
|
|
494
|
-
|
|
495
476
|
> 2. If you want to know whether a user enabled video, we recommend you use the onUserVideoAvailable callback.
|
|
496
477
|
>
|
|
497
478
|
|
|
@@ -499,47 +480,46 @@ Due to performance concerns, this callback works differently in different scenar
|
|
|
499
480
|
|
|
500
481
|
**A user exited the room.**
|
|
501
482
|
|
|
502
|
-
As with onRemoteUserEnterRoom, this callback works differently in different scenarios (i.e.,
|
|
483
|
+
As with onRemoteUserEnterRoom, this callback works differently in different scenarios (i.e., `AppScene` , which you can specify by setting the second parameter when calling enterRoom).
|
|
503
484
|
- Live streaming scenarios (TRTC_APP_SCENE_LIVE or TRTC_APP_SCENE_VOICE_CHATROOM): the callback is triggered only when an anchor exits the room.
|
|
504
485
|
|
|
505
486
|
- Call scenarios (TRTC_APP_SCENE_VIDEOCALL or TRTC_APP_SCENE_AUDIOCALL): in call scenarios, the concept of roles does not apply, and the callback is returned when any user exits the room.
|
|
506
487
|
|
|
507
488
|
|Param|DESC|
|
|
508
489
|
|---------|---------|
|
|
509
|
-
|reason|Reason for room exit.
|
|
490
|
+
|reason|Reason for room exit. `0` : the user exited the room voluntarily; `1` : the user exited the room due to timeout; `2` : the user was removed from the room; `3` : the anchor user exited the room due to switch to audience.|
|
|
510
491
|
|userId|User ID of the remote user|
|
|
511
492
|
|
|
512
493
|
## onUserVideoAvailable
|
|
513
494
|
|
|
514
495
|
**A remote user published/unpublished primary stream video.**
|
|
515
496
|
|
|
516
|
-
The primary stream is usually used for camera images. If you receive the
|
|
497
|
+
The primary stream is usually used for camera images. If you receive the `onUserVideoAvailable(userId, true)` callback, it indicates that the user has available primary stream video.
|
|
517
498
|
|
|
518
|
-
You can then call startRemoteView to subscribe to the remote user’s video. If the subscription is successful, you will receive the
|
|
499
|
+
You can then call startRemoteView to subscribe to the remote user’s video. If the subscription is successful, you will receive the `onFirstVideoFrame(userid)` callback, which indicates that the first video frame of the user is rendered.
|
|
519
500
|
|
|
520
|
-
If you receive the
|
|
501
|
+
If you receive the `onUserVideoAvailable(userId, false)` callback, it indicates that the video of the remote user is disabled, which may be because the user called muteLocalVideo or stopLocalPreview.
|
|
521
502
|
|
|
522
503
|
|Param|DESC|
|
|
523
504
|
|---------|---------|
|
|
524
|
-
|available|Whether the user published (or unpublished) primary stream video.
|
|
505
|
+
|available|Whether the user published (or unpublished) primary stream video. `true` : published; `false` : unpublished|
|
|
525
506
|
|userId|User ID of the remote user|
|
|
526
507
|
|
|
527
508
|
## onUserSubStreamAvailable
|
|
528
509
|
|
|
529
510
|
**A remote user published/unpublished substream video.**
|
|
530
511
|
|
|
531
|
-
The substream is usually used for screen sharing images. If you receive the
|
|
512
|
+
The substream is usually used for screen sharing images. If you receive the `onUserSubStreamAvailable(userId, true)` callback, it indicates that the user has available substream video.
|
|
532
513
|
|
|
533
|
-
You can then call startRemoteView to subscribe to the remote user’s video. If the subscription is successful, you will receive the
|
|
514
|
+
You can then call startRemoteView to subscribe to the remote user’s video. If the subscription is successful, you will receive the `onFirstVideoFrame(userid)` callback, which indicates that the first frame of the user is rendered.
|
|
534
515
|
|
|
535
516
|
|Param|DESC|
|
|
536
517
|
|---------|---------|
|
|
537
|
-
|available|Whether the user published (or unpublished) substream video.
|
|
518
|
+
|available|Whether the user published (or unpublished) substream video. `true` : published; `false` : unpublished|
|
|
538
519
|
|userId|User ID of the remote user|
|
|
539
520
|
|
|
540
521
|
> **Note**
|
|
541
522
|
>
|
|
542
|
-
|
|
543
523
|
> The API used to display substream images is startRemoteView, not startRemoteSubStreamView, startRemoteSubStreamView is deprecated.
|
|
544
524
|
>
|
|
545
525
|
|
|
@@ -547,19 +527,18 @@ You can then call startRemoteView to subscribe to the remote user’s video. If
|
|
|
547
527
|
|
|
548
528
|
**A remote user published/unpublished audio.**
|
|
549
529
|
|
|
550
|
-
If you receive the
|
|
530
|
+
If you receive the `onUserAudioAvailable(userId, true)` callback, it indicates that the user published audio.
|
|
551
531
|
- In auto-subscription mode, the SDK will play the user’s audio automatically.
|
|
552
532
|
|
|
553
533
|
- In manual subscription mode, you can call muteRemoteAudio(userid, false) to play the user’s audio.
|
|
554
534
|
|
|
555
535
|
|Param|DESC|
|
|
556
536
|
|---------|---------|
|
|
557
|
-
|available|Whether the user published (or unpublished) audio.
|
|
537
|
+
|available|Whether the user published (or unpublished) audio. `true` : published; `false` : unpublished|
|
|
558
538
|
|userId|User ID of the remote user|
|
|
559
539
|
|
|
560
540
|
> **Note**
|
|
561
541
|
>
|
|
562
|
-
|
|
563
542
|
> The auto-subscription mode is used by default. You can switch to the manual subscription mode by calling setDefaultStreamRecvMode, but it must be called before room entry for the switch to take effect.
|
|
564
543
|
>
|
|
565
544
|
|
|
@@ -567,24 +546,22 @@ If you receive the ` onUserAudioAvailable(userId, true) ` callback, it indicates
|
|
|
567
546
|
|
|
568
547
|
**The SDK started rendering the first video frame of the local or a remote user.**
|
|
569
548
|
|
|
570
|
-
The SDK returns this event callback when it starts rendering your first video frame or that of a remote user. The
|
|
571
|
-
- If
|
|
549
|
+
The SDK returns this event callback when it starts rendering your first video frame or that of a remote user. The `userId` in the callback can help you determine whether the frame is yours or a remote user’s.
|
|
550
|
+
- If `userId` is empty, it indicates that the SDK has started rendering your first video frame. The precondition is that you have called startLocalPreview or startScreenCapture.
|
|
572
551
|
|
|
573
|
-
- If
|
|
552
|
+
- If `userId` is not empty, it indicates that the SDK has started rendering the first video frame of a remote user. The precondition is that you have called startRemoteView to subscribe to the user’s video.
|
|
574
553
|
|
|
575
554
|
|Param|DESC|
|
|
576
555
|
|---------|---------|
|
|
577
556
|
|height|Video height|
|
|
578
|
-
|streamType|Video stream type. The primary stream (`
|
|
557
|
+
|streamType|Video stream type. The primary stream ( `Main` ) is usually used for camera images, and the substream ( `Sub` ) for screen sharing images.|
|
|
579
558
|
|userId|The user ID of the local or a remote user. If it is empty, it indicates that the first local video frame is available; if it is not empty, it indicates that the first video frame of a remote user is available.|
|
|
580
559
|
|width|Video width|
|
|
581
560
|
|
|
582
561
|
> **Note**
|
|
583
562
|
>
|
|
584
|
-
|
|
585
563
|
> 1. The callback of the first local video frame being rendered is triggered only after you call startLocalPreview or startScreenCapture.
|
|
586
564
|
>
|
|
587
|
-
|
|
588
565
|
> 2. The callback of the first video frame of a remote user being rendered is triggered only after you call startRemoteView or startRemoteSubStreamView.
|
|
589
566
|
>
|
|
590
567
|
|
|
@@ -606,11 +583,11 @@ After you enter a room and call startLocalPreview or startScreenCapture to enabl
|
|
|
606
583
|
|
|
607
584
|
the SDK will start video encoding and publish the local video data via its network module to the cloud.
|
|
608
585
|
|
|
609
|
-
It returns the
|
|
586
|
+
It returns the `onSendFirstLocalVideoFrame` callback after publishing the first local video frame.
|
|
610
587
|
|
|
611
588
|
|Param|DESC|
|
|
612
589
|
|---------|---------|
|
|
613
|
-
|streamType|Video stream type. The primary stream (`
|
|
590
|
+
|streamType|Video stream type. The primary stream ( `Main` ) is usually used for camera images, and the substream ( `Sub` ) for screen sharing images.|
|
|
614
591
|
|
|
615
592
|
## onSendFirstLocalAudioFrame
|
|
616
593
|
|
|
@@ -620,79 +597,73 @@ After you enter a room and call startLocalAudio to enable audio capturing (which
|
|
|
620
597
|
|
|
621
598
|
the SDK will start audio encoding and publish the local audio data via its network module to the cloud.
|
|
622
599
|
|
|
623
|
-
The SDK returns the
|
|
600
|
+
The SDK returns the `onSendFirstLocalAudioFrame` callback after sending the first local audio frame.
|
|
624
601
|
|
|
625
602
|
## onRemoteVideoStatusUpdated
|
|
626
603
|
|
|
627
604
|
**Change of remote video status.**
|
|
628
605
|
|
|
629
|
-
You can use this callback to get the status (`
|
|
606
|
+
You can use this callback to get the status ( `Playing` , `Loading` , or `Stopped` ) of the video of each remote user and display it on the UI.
|
|
630
607
|
|
|
631
608
|
|Param|DESC|
|
|
632
609
|
|---------|---------|
|
|
633
610
|
|extraInfo|Extra information|
|
|
634
611
|
|reason|Reason for the change of status|
|
|
635
|
-
|status|Video status, which may be
|
|
636
|
-
|streamType|Video stream type. The primary stream (`
|
|
612
|
+
|status|Video status, which may be `Playing` , `Loading` , or `Stopped` |
|
|
613
|
+
|streamType|Video stream type. The primary stream ( `Main` ) is usually used for camera images, and the substream ( `Sub` ) for screen sharing images.|
|
|
637
614
|
|userId|User ID|
|
|
638
615
|
|
|
639
616
|
## onRemoteAudioStatusUpdated
|
|
640
617
|
|
|
641
618
|
**Change of remote audio status.**
|
|
642
619
|
|
|
643
|
-
You can use this callback to get the status (`
|
|
620
|
+
You can use this callback to get the status ( `Playing` , `Loading` , or `Stopped` ) of the audio of each remote user and display it on the UI.
|
|
644
621
|
|
|
645
622
|
|Param|DESC|
|
|
646
623
|
|---------|---------|
|
|
647
624
|
|extraInfo|Extra information|
|
|
648
625
|
|reason|Reason for the change of status|
|
|
649
|
-
|status|Audio status, which may be
|
|
626
|
+
|status|Audio status, which may be `Playing` , `Loading` , or `Stopped` |
|
|
650
627
|
|userId|User ID|
|
|
651
628
|
|
|
652
629
|
## onUserVideoSizeChanged
|
|
653
630
|
|
|
654
631
|
**Change of remote video size.**
|
|
655
632
|
|
|
656
|
-
If you receive the
|
|
633
|
+
If you receive the `onUserVideoSizeChanged(userId, streamType, newWidth, newHeight)` callback, it indicates that the user changed the video size. It may be triggered by setVideoEncoderParam or setSubStreamEncoderParam.
|
|
657
634
|
|
|
658
635
|
|Param|DESC|
|
|
659
636
|
|---------|---------|
|
|
660
637
|
|newHeight|Video height|
|
|
661
638
|
|newWidth|Video width|
|
|
662
|
-
|streamType|Video stream type. The primary stream (`
|
|
639
|
+
|streamType|Video stream type. The primary stream ( `Main` ) is usually used for camera images, and the substream ( `Sub` ) for screen sharing images.|
|
|
663
640
|
|userId|User ID|
|
|
664
641
|
|
|
665
642
|
## onNetworkQuality
|
|
666
643
|
|
|
667
644
|
**Real-time network quality statistics.**
|
|
668
645
|
|
|
669
|
-
This callback is returned every 2 seconds and notifies you of the upstream and
|
|
646
|
+
This callback is returned every 2 seconds and notifies you of the upstream quality of the local user and remote users detected by the SDK.
|
|
670
647
|
|
|
671
648
|
The SDK uses a built-in proprietary algorithm to assess the current latency, bandwidth, and stability of the network and returns a result.
|
|
672
649
|
|
|
673
|
-
If the result is
|
|
650
|
+
If the result is `1` (excellent), it means that the current network conditions are excellent; if it is `6` (down), it means that the current network conditions are too bad to support TRTC calls.
|
|
674
651
|
|
|
675
652
|
|Param|DESC|
|
|
676
653
|
|---------|---------|
|
|
677
|
-
|localQuality|Upstream network quality
|
|
678
|
-
|remoteQuality|
|
|
679
|
-
|
|
680
|
-
> **Note**
|
|
681
|
-
>
|
|
682
|
-
|
|
683
|
-
> The uplink quality of remote users cannot be determined independently through this interface.
|
|
684
|
-
>
|
|
654
|
+
|localQuality|Upstream network quality of the local user.|
|
|
655
|
+
|remoteQuality|Upstream network quality of remote users.|
|
|
685
656
|
|
|
686
657
|
## onStatistics
|
|
687
658
|
|
|
688
659
|
**Real-time statistics on technical metrics.**
|
|
689
660
|
|
|
690
661
|
This callback is returned every 2 seconds and notifies you of the statistics on technical metrics related to video, audio, and network. The metrics are listed in TRTCStatistics:
|
|
691
|
-
- Video statistics: video resolution (`
|
|
662
|
+
- Video statistics: video resolution ( `resolution` ), frame rate ( `FPS` ), bitrate ( `bitrate` ), etc.
|
|
692
663
|
|
|
693
|
-
- Audio statistics: audio sample rate (`
|
|
664
|
+
- Audio statistics: audio sample rate ( `samplerate` ), number of audio channels ( `channel` ), bitrate ( `bitrate` ), etc.
|
|
694
665
|
|
|
695
|
-
- Network statistics: the round trip time (`
|
|
666
|
+
- Network statistics: the round trip time ( `rtt` ) between the SDK and the cloud (SDK -> Cloud -> SDK), package loss rate ( `loss` ), upstream traffic ( `sentBytes` ), downstream traffic ( `receivedBytes` ), etc.
|
|
696
667
|
|
|
697
668
|
|Param|DESC|
|
|
698
669
|
|---------|---------|
|
|
@@ -700,7 +671,6 @@ This callback is returned every 2 seconds and notifies you of the statistics on
|
|
|
700
671
|
|
|
701
672
|
> **Note**
|
|
702
673
|
>
|
|
703
|
-
|
|
704
674
|
> If you want to learn about only the current network quality and do not want to spend much time analyzing the statistics returned by this callback, we recommend you use onNetworkQuality.
|
|
705
675
|
>
|
|
706
676
|
|
|
@@ -793,15 +763,14 @@ Note that the SDK returns this callback at the specified interval regardless of
|
|
|
793
763
|
|
|
794
764
|
> **Note**
|
|
795
765
|
>
|
|
796
|
-
|
|
797
|
-
> ` userVolumes ` is an array. If ` userId ` is empty, the elements in the array represent the volume of the local user’s audio. Otherwise, they represent the volume of a remote user’s audio.
|
|
766
|
+
> `userVolumes` is an array. If `userId` is empty, the elements in the array represent the volume of the local user’s audio. Otherwise, they represent the volume of a remote user’s audio.
|
|
798
767
|
>
|
|
799
768
|
|
|
800
769
|
## onRecvCustomCmdMsg
|
|
801
770
|
|
|
802
771
|
**Receipt of custom message.**
|
|
803
772
|
|
|
804
|
-
When a user in a room uses sendCustomCmdMsg to send a custom message, other users in the room can receive the message through the
|
|
773
|
+
When a user in a room uses sendCustomCmdMsg to send a custom message, other users in the room can receive the message through the `onRecvCustomCmdMsg` callback.
|
|
805
774
|
|
|
806
775
|
|Param|DESC|
|
|
807
776
|
|---------|---------|
|
|
@@ -814,9 +783,9 @@ When a user in a room uses sendCustomCmdMsg to send a custom message, other user
|
|
|
814
783
|
|
|
815
784
|
**Loss of custom message.**
|
|
816
785
|
|
|
817
|
-
When you use sendCustomCmdMsg to send a custom UDP message, even if you enable reliable transfer (by setting
|
|
786
|
+
When you use sendCustomCmdMsg to send a custom UDP message, even if you enable reliable transfer (by setting `reliable` to `true` ), there is still a chance of message loss. Reliable transfer only helps maintain a low probability of message loss, which meets the reliability requirements in most cases.
|
|
818
787
|
|
|
819
|
-
If the sender sets
|
|
788
|
+
If the sender sets `reliable` to `true` , the SDK will use this callback to notify the recipient of the number of custom messages lost during a specified time period (usually 5s) in the past.
|
|
820
789
|
|
|
821
790
|
|Param|DESC|
|
|
822
791
|
|---------|---------|
|
|
@@ -827,15 +796,14 @@ If the sender sets ` reliable ` to ` true `, the SDK will use this callback to n
|
|
|
827
796
|
|
|
828
797
|
> **Note**
|
|
829
798
|
>
|
|
830
|
-
|
|
831
|
-
> The recipient receives this callback only if the sender sets ` reliable ` to ` true `.
|
|
799
|
+
> The recipient receives this callback only if the sender sets `reliable` to `true` .
|
|
832
800
|
>
|
|
833
801
|
|
|
834
802
|
## onRecvSEIMsg
|
|
835
803
|
|
|
836
804
|
**Receipt of SEI message.**
|
|
837
805
|
|
|
838
|
-
If a user in the room uses sendSEIMsg to send an SEI message via video frames, other users in the room can receive the message through the
|
|
806
|
+
If a user in the room uses sendSEIMsg to send an SEI message via video frames, other users in the room can receive the message through the `onRecvSEIMsg` callback.
|
|
839
807
|
|
|
840
808
|
|Param|DESC|
|
|
841
809
|
|---------|---------|
|
|
@@ -852,7 +820,7 @@ The SDK will then receive the execution result from the CVM and return the resul
|
|
|
852
820
|
|
|
853
821
|
|Param|DESC|
|
|
854
822
|
|---------|---------|
|
|
855
|
-
|err
|
|
823
|
+
|err| `0` : successful; other values: failed. For more information, please see [Error Codes](https://intl.cloud.tencent.com/document/product/647/35135).|
|
|
856
824
|
|errMsg|Error message|
|
|
857
825
|
|
|
858
826
|
## onStopPublishing
|
|
@@ -865,7 +833,7 @@ The SDK will then receive the execution result from the CVM and return the resul
|
|
|
865
833
|
|
|
866
834
|
|Param|DESC|
|
|
867
835
|
|---------|---------|
|
|
868
|
-
|err
|
|
836
|
+
|err| `0` : successful; other values: failed. For more information, please see [Error Codes](https://intl.cloud.tencent.com/document/product/647/35135).|
|
|
869
837
|
|errMsg|Error message|
|
|
870
838
|
|
|
871
839
|
## onStartPublishCDNStream
|
|
@@ -878,12 +846,11 @@ The SDK will then receive the execution result from the CVM and return the resul
|
|
|
878
846
|
|
|
879
847
|
|Param|DESC|
|
|
880
848
|
|---------|---------|
|
|
881
|
-
|err
|
|
849
|
+
|err| `0` : successful; other values: failed. For more information, please see [Error Codes](https://intl.cloud.tencent.com/document/product/647/35135).|
|
|
882
850
|
|errMsg|Error message|
|
|
883
851
|
|
|
884
852
|
> **Note**
|
|
885
853
|
>
|
|
886
|
-
|
|
887
854
|
> If you receive a callback that the command is executed successfully, it only means that your command was sent to Tencent Cloud’s backend server. If the CDN vendor does not accept your streams, the publishing will still fail.
|
|
888
855
|
>
|
|
889
856
|
|
|
@@ -897,7 +864,7 @@ The SDK will then receive the execution result from the CVM and return the resul
|
|
|
897
864
|
|
|
898
865
|
|Param|DESC|
|
|
899
866
|
|---------|---------|
|
|
900
|
-
|err
|
|
867
|
+
|err| `0` : successful; other values: failed. For more information, please see [Error Codes](https://intl.cloud.tencent.com/document/product/647/35135).|
|
|
901
868
|
|errMsg|Error message|
|
|
902
869
|
|
|
903
870
|
## onSetMixTranscodingConfig
|
|
@@ -910,7 +877,7 @@ The SDK will then receive the execution result from the CVM and return the resul
|
|
|
910
877
|
|
|
911
878
|
|Param|DESC|
|
|
912
879
|
|---------|---------|
|
|
913
|
-
|err
|
|
880
|
+
|err| `0` : successful; other values: failed. For more information, please see [Error Codes](https://intl.cloud.tencent.com/document/product/647/35135).|
|
|
914
881
|
|errMsg|Error message|
|
|
915
882
|
|
|
916
883
|
## onStartPublishMediaStream
|
|
@@ -922,7 +889,7 @@ When you call startPublishMediaStream to publish a stream to the TRTC backend, t
|
|
|
922
889
|
The SDK will then receive the publishing result from the cloud server and will send the result to you via this callback.
|
|
923
890
|
| Param | DESC |
|
|
924
891
|
| --- | --- |
|
|
925
|
-
| code | :
|
|
892
|
+
| code | : <code>0</code> : Successful; other values: Failed. For more information, please see <a href="https://intl.cloud.tencent.com/document/product/647/35135">Error Codes</a>. |
|
|
926
893
|
| extraInfo | : Additional information. For some error codes, there may be additional information to help you troubleshoot the issues.<br>If the code return value is ERR_SERVER_PROCESS_FAILED, it means the server failed to process your request. You can use "error_code" as the key to retrieve the error code returned by the server. The specific error codes and recommended actions are as follows:<br>- 2000: Parameter error. Check the request parameters.<br>- 2001: Live streaming service is not enabled. Enable it in the Live streaming console.<br>- 2021: Third-party retweet service is not enabled. Contact product support to enable it.<br>- 3000: Internal server error. Retry is recommended.<br>- 4006: Concurrency conflict with the same task. The server is still processing the previous startPublishMediaStream task. Retry after a delay is recommended.<br>- 4007: The same task has already been successfully started using startPublishMediaStream. Use the returned taskId to call the updatePublishMediaStream API to update the task.<br>- 5001: Resource constraints. Retry after a delay is recommended. |
|
|
927
894
|
| message | : The callback information. |
|
|
928
895
|
| taskId | : If a request is successful, a task ID will be returned via the callback. You need to provide this task ID when you call updatePublishMediaStream to modify publishing parameters or stopPublishMediaStream to stop publishing. |
|
|
@@ -936,7 +903,7 @@ When you call updatePublishMediaStream to modify publishing parameters, the SDK
|
|
|
936
903
|
The SDK will then receive the modification result from the cloud server and will send the result to you via this callback.
|
|
937
904
|
| Param | DESC |
|
|
938
905
|
| --- | --- |
|
|
939
|
-
| code | :
|
|
906
|
+
| code | : <code>0</code> : Successful; other values: Failed. For more information, please see <a href="https://intl.cloud.tencent.com/document/product/647/35135">Error Codes</a>. |
|
|
940
907
|
| extraInfo | : Additional information. For some error codes, there may be additional information to help you troubleshoot the issues.<br>If the code return value is ERR_SERVER_PROCESS_FAILED, it means the server failed to process your request. You can use "error_code" as the key to retrieve the error code returned by the server. The specific error codes and recommended solutions are as follows:<br>- 2000: Parameter error. Check the request parameters.<br>- 2001: Live streaming service is not enabled. Enable it in the Live Streaming Console.<br>- 2002: Task not found. Restart the task by calling the startPublishMediaStream API.<br>- 2018: Concurrent requests are out of order. Retry with the latest streaming parameters.<br>- 2021: Third-party retweet service is not enabled. Contact product support to enable it.<br>- 3000: Internal server error. Retry.<br>- 4003: Task is exiting. Stop the task by calling the stopPublishMediaStream API first, then restart it by calling the startPublishMediaStream API. |
|
|
941
908
|
| message | : The callback information. |
|
|
942
909
|
| taskId | : The task ID you pass in when calling updatePublishMediaStream, which is used to identify a request. |
|
|
@@ -950,7 +917,7 @@ When you call stopPublishMediaStream to stop publishing, the SDK will immediatel
|
|
|
950
917
|
The SDK will then receive the modification result from the cloud server and will send the result to you via this callback.
|
|
951
918
|
| Param | DESC |
|
|
952
919
|
| --- | --- |
|
|
953
|
-
| code | :
|
|
920
|
+
| code | : <code>0</code> : Successful; other values: Failed. For more information, please see <a href="https://intl.cloud.tencent.com/document/product/647/35135">Error Codes</a>. |
|
|
954
921
|
| extraInfo | : Additional information. For some error codes, there may be additional information to help you troubleshoot the issues.<br>If the code return value is ERR_SERVER_PROCESS_FAILED, it means the server was unable to process your request. You can use "error_code" as the key to retrieve the error code returned by the server. The specific error codes and recommended actions are as follows:<br>- 2000: Parameter error. Please check the request parameters.<br>- 2002: Task not found. No action required.<br>- 3000: Internal server error. Please retry.<br>- 4003: Task is exiting. No action required. |
|
|
955
922
|
| message | : The callback information. |
|
|
956
923
|
| taskId | : The task ID you pass in when calling stopPublishMediaStream, which is used to identify a request. |
|
|
@@ -965,10 +932,10 @@ If you set the publishing destination (TRTCPublishTarget) to the URL of Tencent
|
|
|
965
932
|
| Param | DESC |
|
|
966
933
|
| --- | --- |
|
|
967
934
|
| cdnUrl | : The URL you specify in TRTCPublishTarget when you call startPublishMediaStream. |
|
|
968
|
-
| code | : The publishing result.
|
|
935
|
+
| code | : The publishing result. <code>0</code> : Successful; other values: Failed. For more information, please see <a href="https://intl.cloud.tencent.com/document/product/647/35135">Error Codes</a>. |
|
|
969
936
|
| extraInfo | : Additional information. For some error codes, there may be additional information to help you troubleshoot the issues. |
|
|
970
937
|
| message | : The publishing information. |
|
|
971
|
-
| status | : The publishing status.<br>- 0: The publishing has not started yet or has ended. This value will be returned after you call stopPublishMediaStream.<br>- 1: The TRTC server is connecting to the CDN server. If the first attempt fails, the TRTC backend will retry multiple times and will return this value via the callback (every five seconds). After publishing succeeds, the value
|
|
938
|
+
| status | : The publishing status.<br>- 0: The publishing has not started yet or has ended. This value will be returned after you call stopPublishMediaStream.<br>- 1: The TRTC server is connecting to the CDN server. If the first attempt fails, the TRTC backend will retry multiple times and will return this value via the callback (every five seconds). After publishing succeeds, the value <code>2</code> will be returned. If a server error occurs or publishing is still unsuccessful after 60 seconds, the value <code>4</code> will be returned.<br>- 2: The TRTC server is publishing to the CDN. This value will be returned if the publishing succeeds.<br>- 3: The TRTC server is disconnected from the CDN server and is reconnecting. If a CDN error occurs or publishing is interrupted, the TRTC backend will try to reconnect and resume publishing and will return this value via the callback (every five seconds). After publishing resumes, the value <code>2</code> will be returned. If a server error occurs or the attempt to resume publishing is still unsuccessful after 60 seconds, the value <code>4</code> will be returned.<br>- 4: The TRTC server is disconnected from the CDN server and failed to reconnect within the timeout period. In this case, the publishing is deemed to have failed. You can call updatePublishMediaStream to try again.<br>- 5: The TRTC server is disconnecting from the CDN server. After you call stopPublishMediaStream, the SDK will return this value first and then the value <code>0</code> . |
|
|
972
939
|
|
|
973
940
|
## onScreenCaptureStarted
|
|
974
941
|
|
|
@@ -996,7 +963,7 @@ The SDK returns this callback when you call stopScreenCapture to stop screen sha
|
|
|
996
963
|
|
|
997
964
|
|Param|DESC|
|
|
998
965
|
|---------|---------|
|
|
999
|
-
|reason|Reason.
|
|
966
|
+
|reason|Reason. `0` : the user stopped screen sharing; `1` : screen sharing stopped because the shared window was closed.|
|
|
1000
967
|
|
|
1001
968
|
## onLocalRecordBegin
|
|
1002
969
|
|
|
@@ -1049,18 +1016,17 @@ When you call stopLocalRecording to stop local recording, the SDK returns this c
|
|
|
1049
1016
|
|
|
1050
1017
|
|Param|DESC|
|
|
1051
1018
|
|---------|---------|
|
|
1052
|
-
|bmp|Screenshot result. If it is
|
|
1053
|
-
|data|Screenshot data. If it is
|
|
1019
|
+
|bmp|Screenshot result. If it is `null` , the screenshot failed to be taken.|
|
|
1020
|
+
|data|Screenshot data. If it is `nullptr` , it indicates that the SDK failed to take the screenshot.|
|
|
1054
1021
|
|format|Screenshot data format. Only TRTCVideoPixelFormat_BGRA32 is supported now.|
|
|
1055
1022
|
|height|Screenshot height|
|
|
1056
|
-
|length|Screenshot data length. In BGRA32 format,
|
|
1023
|
+
|length|Screenshot data length. In BGRA32 format, `length = width * height * 4` .|
|
|
1057
1024
|
|type|Video stream type|
|
|
1058
1025
|
|userId|User ID. If it is empty, the screenshot is a local image.|
|
|
1059
1026
|
|width|Screenshot width|
|
|
1060
1027
|
|
|
1061
1028
|
> **Note**
|
|
1062
1029
|
>
|
|
1063
|
-
|
|
1064
1030
|
> The parameters of the full-platform C++ interface and the Java interface are different. The C++ interface uses 7 parameters to describe a screenshot, while the Java interface uses only one Bitmap to describe a screenshot.
|
|
1065
1031
|
>
|
|
1066
1032
|
|