@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
|
@@ -131,79 +131,77 @@ For more information, see [Error Codes](https://intl.cloud.tencent.com/document/
|
|
|
131
131
|
|
|
132
132
|
**Whether room entry is successful.**
|
|
133
133
|
|
|
134
|
-
After calling the enterRoom API in
|
|
135
|
-
- If room entry succeeded,
|
|
134
|
+
After calling the enterRoom API in `TRTCCloud` to enter a room, you will receive the `onEnterRoom(result)` callback from `TRTCCloudDelegate` .
|
|
135
|
+
- If room entry succeeded, `result` will be a positive number ( `result` > 0), indicating the time in milliseconds (ms) the room entry takes.
|
|
136
136
|
|
|
137
|
-
- If room entry failed,
|
|
137
|
+
- If room entry failed, `result` will be a negative number (result < 0), indicating the error code for the failure.
|
|
138
138
|
|
|
139
139
|
For more information on the error codes for room entry failure, see [Error Codes](https://intl.cloud.tencent.com/document/product/647/35135).
|
|
140
140
|
|
|
141
141
|
|Param|DESC|
|
|
142
142
|
|---------|---------|
|
|
143
|
-
|result|If
|
|
143
|
+
|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.|
|
|
144
144
|
|
|
145
145
|
> **Note**
|
|
146
146
|
>
|
|
147
|
-
|
|
148
|
-
> 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.
|
|
147
|
+
> 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.
|
|
149
148
|
>
|
|
150
|
-
|
|
151
|
-
> 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.
|
|
149
|
+
> 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.
|
|
152
150
|
>
|
|
153
151
|
|
|
154
152
|
## onExitRoom:
|
|
155
153
|
|
|
156
154
|
**Room exit.**
|
|
157
155
|
|
|
158
|
-
Calling the exitRoom API in
|
|
156
|
+
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.
|
|
159
157
|
|
|
160
|
-
After all resources occupied by the SDK are released, the SDK will return the
|
|
158
|
+
After all resources occupied by the SDK are released, the SDK will return the `onExitRoom()` callback.
|
|
161
159
|
|
|
162
|
-
If you need to call enterRoom again or switch to another audio/video SDK, please wait until you receive the
|
|
160
|
+
If you need to call enterRoom again or switch to another audio/video SDK, please wait until you receive the `onExitRoom()` callback.
|
|
163
161
|
|
|
164
162
|
Otherwise, you may encounter problems such as the camera or mic being occupied.
|
|
165
163
|
|
|
166
164
|
|Param|DESC|
|
|
167
165
|
|---------|---------|
|
|
168
|
-
|reason|Reason for room exit.
|
|
166
|
+
|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.|
|
|
169
167
|
|
|
170
168
|
## onSwitchRole:errMsg:
|
|
171
169
|
|
|
172
170
|
**Role switching.**
|
|
173
171
|
|
|
174
|
-
You can call the switchRole API in
|
|
172
|
+
You can call the switchRole API in `TRTCCloud` to switch between the anchor and audience roles. This is accompanied by a line switching process.
|
|
175
173
|
|
|
176
|
-
After the switching, the SDK will return the
|
|
174
|
+
After the switching, the SDK will return the `onSwitchRole()` event callback.
|
|
177
175
|
|
|
178
176
|
|Param|DESC|
|
|
179
177
|
|---------|---------|
|
|
180
|
-
|errCode|Error code.
|
|
178
|
+
|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).|
|
|
181
179
|
|errMsg|Error message|
|
|
182
180
|
|
|
183
181
|
## onSwitchRoom:errMsg:
|
|
184
182
|
|
|
185
183
|
**Result of room switching.**
|
|
186
184
|
|
|
187
|
-
You can call the switchRoom API in
|
|
185
|
+
You can call the switchRoom API in `TRTCCloud` to switch from one room to another.
|
|
188
186
|
|
|
189
|
-
After the switching, the SDK will return the
|
|
187
|
+
After the switching, the SDK will return the `onSwitchRoom()` event callback.
|
|
190
188
|
|
|
191
189
|
|Param|DESC|
|
|
192
190
|
|---------|---------|
|
|
193
|
-
|errCode|Error code.
|
|
191
|
+
|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).|
|
|
194
192
|
|errMsg|Error message|
|
|
195
193
|
|
|
196
194
|
## onConnectOtherRoom:errCode:errMsg:
|
|
197
195
|
|
|
198
196
|
**Result of requesting cross-room call.**
|
|
199
197
|
|
|
200
|
-
You can call the connectOtherRoom API in
|
|
198
|
+
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.
|
|
201
199
|
|
|
202
|
-
The caller will receive the
|
|
200
|
+
The caller will receive the `onConnectOtherRoom()` callback, which can be used to determine whether the cross-room call is successful.
|
|
203
201
|
|
|
204
202
|
|Param|DESC|
|
|
205
203
|
|---------|---------|
|
|
206
|
-
|errCode|Error code.
|
|
204
|
+
|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).|
|
|
207
205
|
|errMsg|Error message|
|
|
208
206
|
|userId|The user ID of the anchor (in another room) to be called|
|
|
209
207
|
|
|
@@ -211,33 +209,33 @@ The caller will receive the ` onConnectOtherRoom() ` callback, which can be used
|
|
|
211
209
|
|
|
212
210
|
**Result of ending cross-room call.**
|
|
213
211
|
|
|
214
|
-
You can call the disConnectOtherRoom API in
|
|
212
|
+
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.
|
|
215
213
|
|
|
216
|
-
The caller will receive the
|
|
214
|
+
The caller will receive the `onDisconnectOtherRoom()` callback to determine whether the cross-room call has been successfully disconnected.
|
|
217
215
|
|
|
218
216
|
|Param|DESC|
|
|
219
217
|
|---------|---------|
|
|
220
|
-
|errCode|Error code.
|
|
218
|
+
|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).|
|
|
221
219
|
|errMsg|Error message|
|
|
222
220
|
|
|
223
221
|
## onUpdateOtherRoomForwardMode:errMsg:
|
|
224
222
|
|
|
225
223
|
**Result of changing the upstream capability of the cross-room anchor.**
|
|
226
224
|
|
|
227
|
-
You can call the updateOtherRoomForwardMode API in
|
|
225
|
+
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.
|
|
228
226
|
|
|
229
|
-
The caller will receive the
|
|
227
|
+
The caller will receive the `onUpdateOtherRoomForwardMode()` callback to determine whether the changing upstream capability of the cross-room anchor is successful.
|
|
230
228
|
|
|
231
229
|
|Param|DESC|
|
|
232
230
|
|---------|---------|
|
|
233
|
-
|errCode|Error code.
|
|
231
|
+
|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).|
|
|
234
232
|
|errMsg|Error message|
|
|
235
233
|
|
|
236
234
|
## onRemoteUserEnterRoom:
|
|
237
235
|
|
|
238
236
|
**A user entered the room.**
|
|
239
237
|
|
|
240
|
-
Due to performance concerns, this callback works differently in different scenarios (i.e.,
|
|
238
|
+
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).
|
|
241
239
|
- Live streaming scenarios (TRTCAppSceneLIVE or TRTCAppSceneVoiceChatRoom): 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.
|
|
242
240
|
|
|
243
241
|
- Call scenarios (TRTCAppSceneVideoCall or TRTCAppSceneAudioCall): 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.
|
|
@@ -248,10 +246,8 @@ Due to performance concerns, this callback works differently in different scenar
|
|
|
248
246
|
|
|
249
247
|
> **Note**
|
|
250
248
|
>
|
|
251
|
-
|
|
252
|
-
> 1. The ` onRemoteUserEnterRoom ` callback indicates that a user entered the room, but it does not necessarily mean that the user enabled audio or video.
|
|
249
|
+
> 1. The `onRemoteUserEnterRoom` callback indicates that a user entered the room, but it does not necessarily mean that the user enabled audio or video.
|
|
253
250
|
>
|
|
254
|
-
|
|
255
251
|
> 2. If you want to know whether a user enabled video, we recommend you use the onUserVideoAvailable callback.
|
|
256
252
|
>
|
|
257
253
|
|
|
@@ -259,47 +255,46 @@ Due to performance concerns, this callback works differently in different scenar
|
|
|
259
255
|
|
|
260
256
|
**A user exited the room.**
|
|
261
257
|
|
|
262
|
-
As with onRemoteUserEnterRoom, this callback works differently in different scenarios (i.e.,
|
|
258
|
+
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).
|
|
263
259
|
- Live streaming scenarios (TRTCAppSceneLIVE or TRTCAppSceneVoiceChatRoom): the callback is triggered only when an anchor exits the room.
|
|
264
260
|
|
|
265
261
|
- Call scenarios (TRTCAppSceneVideoCall or TRTCAppSceneAudioCall): in call scenarios, the concept of roles does not apply, and the callback is returned when any user exits the room.
|
|
266
262
|
|
|
267
263
|
|Param|DESC|
|
|
268
264
|
|---------|---------|
|
|
269
|
-
|reason|Reason for room exit.
|
|
265
|
+
|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.|
|
|
270
266
|
|userId|User ID of the remote user|
|
|
271
267
|
|
|
272
268
|
## onUserVideoAvailable:available:
|
|
273
269
|
|
|
274
270
|
**A remote user published/unpublished primary stream video.**
|
|
275
271
|
|
|
276
|
-
The primary stream is usually used for camera images. If you receive the
|
|
272
|
+
The primary stream is usually used for camera images. If you receive the `onUserVideoAvailable(userId, YES)` callback, it indicates that the user has available primary stream video.
|
|
277
273
|
|
|
278
|
-
You can then call startRemoteView to subscribe to the remote user’s video. If the subscription is successful, you will receive the
|
|
274
|
+
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.
|
|
279
275
|
|
|
280
|
-
If you receive the
|
|
276
|
+
If you receive the `onUserVideoAvailable(userId, NO)` callback, it indicates that the video of the remote user is disabled, which may be because the user called muteLocalVideo or stopLocalPreview.
|
|
281
277
|
|
|
282
278
|
|Param|DESC|
|
|
283
279
|
|---------|---------|
|
|
284
|
-
|available|Whether the user published (or unpublished) primary stream video.
|
|
280
|
+
|available|Whether the user published (or unpublished) primary stream video. `YES` : published; `NO` : unpublished|
|
|
285
281
|
|userId|User ID of the remote user|
|
|
286
282
|
|
|
287
283
|
## onUserSubStreamAvailable:available:
|
|
288
284
|
|
|
289
285
|
**A remote user published/unpublished substream video.**
|
|
290
286
|
|
|
291
|
-
The substream is usually used for screen sharing images. If you receive the
|
|
287
|
+
The substream is usually used for screen sharing images. If you receive the `onUserSubStreamAvailable(userId, YES)` callback, it indicates that the user has available substream video.
|
|
292
288
|
|
|
293
|
-
You can then call startRemoteView to subscribe to the remote user’s video. If the subscription is successful, you will receive the
|
|
289
|
+
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.
|
|
294
290
|
|
|
295
291
|
|Param|DESC|
|
|
296
292
|
|---------|---------|
|
|
297
|
-
|available|Whether the user published (or unpublished) substream video.
|
|
293
|
+
|available|Whether the user published (or unpublished) substream video. `YES` : published; `NO` : unpublished|
|
|
298
294
|
|userId|User ID of the remote user|
|
|
299
295
|
|
|
300
296
|
> **Note**
|
|
301
297
|
>
|
|
302
|
-
|
|
303
298
|
> The API used to display substream images is startRemoteView, not startRemoteSubStreamView, startRemoteSubStreamView is deprecated.
|
|
304
299
|
>
|
|
305
300
|
|
|
@@ -307,19 +302,18 @@ You can then call startRemoteView to subscribe to the remote user’s video. If
|
|
|
307
302
|
|
|
308
303
|
**A remote user published/unpublished audio.**
|
|
309
304
|
|
|
310
|
-
If you receive the
|
|
305
|
+
If you receive the `onUserAudioAvailable(userId, YES)` callback, it indicates that the user published audio.
|
|
311
306
|
- In auto-subscription mode, the SDK will play the user’s audio automatically.
|
|
312
307
|
|
|
313
308
|
- In manual subscription mode, you can call muteRemoteAudio(userid, NO) to play the user’s audio.
|
|
314
309
|
|
|
315
310
|
|Param|DESC|
|
|
316
311
|
|---------|---------|
|
|
317
|
-
|available|Whether the user published (or unpublished) audio.
|
|
312
|
+
|available|Whether the user published (or unpublished) audio. `YES` : published; `NO` : unpublished|
|
|
318
313
|
|userId|User ID of the remote user|
|
|
319
314
|
|
|
320
315
|
> **Note**
|
|
321
316
|
>
|
|
322
|
-
|
|
323
317
|
> 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.
|
|
324
318
|
>
|
|
325
319
|
|
|
@@ -327,24 +321,22 @@ If you receive the ` onUserAudioAvailable(userId, YES) ` callback, it indicates
|
|
|
327
321
|
|
|
328
322
|
**The SDK started rendering the first video frame of the local or a remote user.**
|
|
329
323
|
|
|
330
|
-
The SDK returns this event callback when it starts rendering your first video frame or that of a remote user. The
|
|
331
|
-
- If
|
|
324
|
+
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.
|
|
325
|
+
- 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.
|
|
332
326
|
|
|
333
|
-
- If
|
|
327
|
+
- 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.
|
|
334
328
|
|
|
335
329
|
|Param|DESC|
|
|
336
330
|
|---------|---------|
|
|
337
331
|
|height|Video height|
|
|
338
|
-
|streamType|Video stream type. The primary stream (`
|
|
332
|
+
|streamType|Video stream type. The primary stream ( `Main` ) is usually used for camera images, and the substream ( `Sub` ) for screen sharing images.|
|
|
339
333
|
|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.|
|
|
340
334
|
|width|Video width|
|
|
341
335
|
|
|
342
336
|
> **Note**
|
|
343
337
|
>
|
|
344
|
-
|
|
345
338
|
> 1. The callback of the first local video frame being rendered is triggered only after you call startLocalPreview or startScreenCapture.
|
|
346
339
|
>
|
|
347
|
-
|
|
348
340
|
> 2. The callback of the first video frame of a remote user being rendered is triggered only after you call startRemoteView or startRemoteSubStreamView.
|
|
349
341
|
>
|
|
350
342
|
|
|
@@ -366,11 +358,11 @@ After you enter a room and call startLocalPreview or startScreenCapture to enabl
|
|
|
366
358
|
|
|
367
359
|
the SDK will start video encoding and publish the local video data via its network module to the cloud.
|
|
368
360
|
|
|
369
|
-
It returns the
|
|
361
|
+
It returns the `onSendFirstLocalVideoFrame` callback after publishing the first local video frame.
|
|
370
362
|
|
|
371
363
|
|Param|DESC|
|
|
372
364
|
|---------|---------|
|
|
373
|
-
|streamType|Video stream type. The primary stream (`
|
|
365
|
+
|streamType|Video stream type. The primary stream ( `Main` ) is usually used for camera images, and the substream ( `Sub` ) for screen sharing images.|
|
|
374
366
|
|
|
375
367
|
## onSendFirstLocalAudioFrame
|
|
376
368
|
|
|
@@ -380,79 +372,73 @@ After you enter a room and call startLocalAudio to enable audio capturing (which
|
|
|
380
372
|
|
|
381
373
|
the SDK will start audio encoding and publish the local audio data via its network module to the cloud.
|
|
382
374
|
|
|
383
|
-
The SDK returns the
|
|
375
|
+
The SDK returns the `onSendFirstLocalAudioFrame` callback after sending the first local audio frame.
|
|
384
376
|
|
|
385
377
|
## onRemoteVideoStatusUpdated:streamType:streamStatus:reason:extrainfo:
|
|
386
378
|
|
|
387
379
|
**Change of remote video status.**
|
|
388
380
|
|
|
389
|
-
You can use this callback to get the status (`
|
|
381
|
+
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.
|
|
390
382
|
|
|
391
383
|
|Param|DESC|
|
|
392
384
|
|---------|---------|
|
|
393
385
|
|extraInfo|Extra information|
|
|
394
386
|
|reason|Reason for the change of status|
|
|
395
|
-
|status|Video status, which may be
|
|
396
|
-
|streamType|Video stream type. The primary stream (`
|
|
387
|
+
|status|Video status, which may be `Playing` , `Loading` , or `Stopped` |
|
|
388
|
+
|streamType|Video stream type. The primary stream ( `Main` ) is usually used for camera images, and the substream ( `Sub` ) for screen sharing images.|
|
|
397
389
|
|userId|User ID|
|
|
398
390
|
|
|
399
391
|
## onRemoteAudioStatusUpdated:streamStatus:reason:extrainfo:
|
|
400
392
|
|
|
401
393
|
**Change of remote audio status.**
|
|
402
394
|
|
|
403
|
-
You can use this callback to get the status (`
|
|
395
|
+
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.
|
|
404
396
|
|
|
405
397
|
|Param|DESC|
|
|
406
398
|
|---------|---------|
|
|
407
399
|
|extraInfo|Extra information|
|
|
408
400
|
|reason|Reason for the change of status|
|
|
409
|
-
|status|Audio status, which may be
|
|
401
|
+
|status|Audio status, which may be `Playing` , `Loading` , or `Stopped` |
|
|
410
402
|
|userId|User ID|
|
|
411
403
|
|
|
412
404
|
## onUserVideoSizeChanged:streamType:newWidth:newHeight:
|
|
413
405
|
|
|
414
406
|
**Change of remote video size.**
|
|
415
407
|
|
|
416
|
-
If you receive the
|
|
408
|
+
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.
|
|
417
409
|
|
|
418
410
|
|Param|DESC|
|
|
419
411
|
|---------|---------|
|
|
420
412
|
|newHeight|Video height|
|
|
421
413
|
|newWidth|Video width|
|
|
422
|
-
|streamType|Video stream type. The primary stream (`
|
|
414
|
+
|streamType|Video stream type. The primary stream ( `Main` ) is usually used for camera images, and the substream ( `Sub` ) for screen sharing images.|
|
|
423
415
|
|userId|User ID|
|
|
424
416
|
|
|
425
417
|
## onNetworkQuality:remoteQuality:
|
|
426
418
|
|
|
427
419
|
**Real-time network quality statistics.**
|
|
428
420
|
|
|
429
|
-
This callback is returned every 2 seconds and notifies you of the upstream and
|
|
421
|
+
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.
|
|
430
422
|
|
|
431
423
|
The SDK uses a built-in proprietary algorithm to assess the current latency, bandwidth, and stability of the network and returns a result.
|
|
432
424
|
|
|
433
|
-
If the result is
|
|
425
|
+
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.
|
|
434
426
|
|
|
435
427
|
|Param|DESC|
|
|
436
428
|
|---------|---------|
|
|
437
|
-
|localQuality|Upstream network quality
|
|
438
|
-
|remoteQuality|
|
|
439
|
-
|
|
440
|
-
> **Note**
|
|
441
|
-
>
|
|
442
|
-
|
|
443
|
-
> The uplink quality of remote users cannot be determined independently through this interface.
|
|
444
|
-
>
|
|
429
|
+
|localQuality|Upstream network quality of the local user.|
|
|
430
|
+
|remoteQuality|Upstream network quality of remote users.|
|
|
445
431
|
|
|
446
432
|
## onStatistics:
|
|
447
433
|
|
|
448
434
|
**Real-time statistics on technical metrics.**
|
|
449
435
|
|
|
450
436
|
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:
|
|
451
|
-
- Video statistics: video resolution (`
|
|
437
|
+
- Video statistics: video resolution ( `resolution` ), frame rate ( `FPS` ), bitrate ( `bitrate` ), etc.
|
|
452
438
|
|
|
453
|
-
- Audio statistics: audio sample rate (`
|
|
439
|
+
- Audio statistics: audio sample rate ( `samplerate` ), number of audio channels ( `channel` ), bitrate ( `bitrate` ), etc.
|
|
454
440
|
|
|
455
|
-
- Network statistics: the round trip time (`
|
|
441
|
+
- 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.
|
|
456
442
|
|
|
457
443
|
|Param|DESC|
|
|
458
444
|
|---------|---------|
|
|
@@ -460,7 +446,6 @@ This callback is returned every 2 seconds and notifies you of the statistics on
|
|
|
460
446
|
|
|
461
447
|
> **Note**
|
|
462
448
|
>
|
|
463
|
-
|
|
464
449
|
> 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.
|
|
465
450
|
>
|
|
466
451
|
|
|
@@ -553,8 +538,7 @@ Note that the SDK returns this callback at the specified interval regardless of
|
|
|
553
538
|
|
|
554
539
|
> **Note**
|
|
555
540
|
>
|
|
556
|
-
|
|
557
|
-
> ` 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.
|
|
541
|
+
> `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.
|
|
558
542
|
>
|
|
559
543
|
|
|
560
544
|
## onDevice:type:stateChanged:
|
|
@@ -567,7 +551,7 @@ The SDK returns this callback when a local device (camera, mic, or speaker) is c
|
|
|
567
551
|
|---------|---------|
|
|
568
552
|
|deviceId|Device ID|
|
|
569
553
|
|deviceType|Device type|
|
|
570
|
-
|state|Device status.
|
|
554
|
+
|state|Device status. `0` : disconnected; `1` : connected|
|
|
571
555
|
|
|
572
556
|
## onAudioDeviceCaptureVolumeChanged:muted:
|
|
573
557
|
|
|
@@ -583,13 +567,12 @@ When users set the mic capturing volume via the UI or a keyboard shortcut, the S
|
|
|
583
567
|
|
|
584
568
|
|Param|DESC|
|
|
585
569
|
|---------|---------|
|
|
586
|
-
|muted|Whether the mic is muted.
|
|
570
|
+
|muted|Whether the mic is muted. `YES` : muted; `NO` : unmuted|
|
|
587
571
|
|volume|System audio capturing volume, which users can set in the audio control panel. Value range: [0, 100]|
|
|
588
572
|
|
|
589
573
|
> **Note**
|
|
590
574
|
>
|
|
591
|
-
|
|
592
|
-
> You need to call enableAudioVolumeEvaluation and set the callback interval (` interval ` > 0) to enable the callback. To disable the callback, set ` interval ` to ` 0 `.
|
|
575
|
+
> You need to call enableAudioVolumeEvaluation and set the callback interval ( `interval` > 0) to enable the callback. To disable the callback, set `interval` to `0` .
|
|
593
576
|
>
|
|
594
577
|
|
|
595
578
|
## onAudioDevicePlayoutVolumeChanged:muted:
|
|
@@ -604,13 +587,12 @@ When users set the system’s playback volume via the UI or a keyboard shortcut,
|
|
|
604
587
|
|
|
605
588
|
|Param|DESC|
|
|
606
589
|
|---------|---------|
|
|
607
|
-
|muted|Whether the speaker is muted.
|
|
590
|
+
|muted|Whether the speaker is muted. `YES` : muted; `NO` : unmuted|
|
|
608
591
|
|volume|The system playback volume, which users can set in the audio control panel. Value range: 0-100|
|
|
609
592
|
|
|
610
593
|
> **Note**
|
|
611
594
|
>
|
|
612
|
-
|
|
613
|
-
> You need to call enableAudioVolumeEvaluation and set the callback interval (` interval ` > 0) to enable the callback. To disable the callback, set ` interval ` to ` 0 `.
|
|
595
|
+
> You need to call enableAudioVolumeEvaluation and set the callback interval ( `interval` > 0) to enable the callback. To disable the callback, set `interval` to `0` .
|
|
614
596
|
>
|
|
615
597
|
|
|
616
598
|
## onSystemAudioLoopbackError:
|
|
@@ -627,13 +609,13 @@ The SDK returns this callback after trying to enable system audio capturing. To
|
|
|
627
609
|
|
|
628
610
|
|Param|DESC|
|
|
629
611
|
|---------|---------|
|
|
630
|
-
|err|If it is
|
|
612
|
+
|err|If it is `ERR_NULL` , system audio capturing is enabled successfully. Otherwise, it is not. For more information, please see [Error Codes](https://intl.cloud.tencent.com/document/product/647/35135).|
|
|
631
613
|
|
|
632
614
|
## onRecvCustomCmdMsgUserId:cmdID:seq:message:
|
|
633
615
|
|
|
634
616
|
**Receipt of custom message.**
|
|
635
617
|
|
|
636
|
-
When a user in a room uses sendCustomCmdMsg to send a custom message, other users in the room can receive the message through the
|
|
618
|
+
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.
|
|
637
619
|
|
|
638
620
|
|Param|DESC|
|
|
639
621
|
|---------|---------|
|
|
@@ -646,9 +628,9 @@ When a user in a room uses sendCustomCmdMsg to send a custom message, other user
|
|
|
646
628
|
|
|
647
629
|
**Loss of custom message.**
|
|
648
630
|
|
|
649
|
-
When you use sendCustomCmdMsg to send a custom UDP message, even if you enable reliable transfer (by setting
|
|
631
|
+
When you use sendCustomCmdMsg to send a custom UDP message, even if you enable reliable transfer (by setting `reliable` to `YES` ), 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.
|
|
650
632
|
|
|
651
|
-
If the sender sets
|
|
633
|
+
If the sender sets `reliable` to `YES` , 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.
|
|
652
634
|
|
|
653
635
|
|Param|DESC|
|
|
654
636
|
|---------|---------|
|
|
@@ -659,15 +641,14 @@ If the sender sets ` reliable ` to ` YES `, the SDK will use this callback to no
|
|
|
659
641
|
|
|
660
642
|
> **Note**
|
|
661
643
|
>
|
|
662
|
-
|
|
663
|
-
> The recipient receives this callback only if the sender sets ` reliable ` to ` YES `.
|
|
644
|
+
> The recipient receives this callback only if the sender sets `reliable` to `YES` .
|
|
664
645
|
>
|
|
665
646
|
|
|
666
647
|
## onRecvSEIMsg:message:
|
|
667
648
|
|
|
668
649
|
**Receipt of SEI message.**
|
|
669
650
|
|
|
670
|
-
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
|
|
651
|
+
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.
|
|
671
652
|
|
|
672
653
|
|Param|DESC|
|
|
673
654
|
|---------|---------|
|
|
@@ -684,7 +665,7 @@ The SDK will then receive the execution result from the CVM and return the resul
|
|
|
684
665
|
|
|
685
666
|
|Param|DESC|
|
|
686
667
|
|---------|---------|
|
|
687
|
-
|err
|
|
668
|
+
|err| `0` : successful; other values: failed. For more information, please see [Error Codes](https://intl.cloud.tencent.com/document/product/647/35135).|
|
|
688
669
|
|errMsg|Error message|
|
|
689
670
|
|
|
690
671
|
## onStopPublishing:errMsg:
|
|
@@ -697,7 +678,7 @@ The SDK will then receive the execution result from the CVM and return the resul
|
|
|
697
678
|
|
|
698
679
|
|Param|DESC|
|
|
699
680
|
|---------|---------|
|
|
700
|
-
|err
|
|
681
|
+
|err| `0` : successful; other values: failed. For more information, please see [Error Codes](https://intl.cloud.tencent.com/document/product/647/35135).|
|
|
701
682
|
|errMsg|Error message|
|
|
702
683
|
|
|
703
684
|
## onStartPublishCDNStream:errMsg:
|
|
@@ -710,12 +691,11 @@ The SDK will then receive the execution result from the CVM and return the resul
|
|
|
710
691
|
|
|
711
692
|
|Param|DESC|
|
|
712
693
|
|---------|---------|
|
|
713
|
-
|err
|
|
694
|
+
|err| `0` : successful; other values: failed. For more information, please see [Error Codes](https://intl.cloud.tencent.com/document/product/647/35135).|
|
|
714
695
|
|errMsg|Error message|
|
|
715
696
|
|
|
716
697
|
> **Note**
|
|
717
698
|
>
|
|
718
|
-
|
|
719
699
|
> 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.
|
|
720
700
|
>
|
|
721
701
|
|
|
@@ -729,7 +709,7 @@ The SDK will then receive the execution result from the CVM and return the resul
|
|
|
729
709
|
|
|
730
710
|
|Param|DESC|
|
|
731
711
|
|---------|---------|
|
|
732
|
-
|err
|
|
712
|
+
|err| `0` : successful; other values: failed. For more information, please see [Error Codes](https://intl.cloud.tencent.com/document/product/647/35135).|
|
|
733
713
|
|errMsg|Error message|
|
|
734
714
|
|
|
735
715
|
## onSetMixTranscodingConfig:errMsg:
|
|
@@ -742,7 +722,7 @@ The SDK will then receive the execution result from the CVM and return the resul
|
|
|
742
722
|
|
|
743
723
|
|Param|DESC|
|
|
744
724
|
|---------|---------|
|
|
745
|
-
|err
|
|
725
|
+
|err| `0` : successful; other values: failed. For more information, please see [Error Codes](https://intl.cloud.tencent.com/document/product/647/35135).|
|
|
746
726
|
|errMsg|Error message|
|
|
747
727
|
|
|
748
728
|
## onStartPublishMediaStream:code:message:extraInfo:
|
|
@@ -754,7 +734,7 @@ When you call startPublishMediaStream to publish a stream to the TRTC backend, t
|
|
|
754
734
|
The SDK will then receive the publishing result from the cloud server and will send the result to you via this callback.
|
|
755
735
|
| Param | DESC |
|
|
756
736
|
| --- | --- |
|
|
757
|
-
| code | :
|
|
737
|
+
| 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>. |
|
|
758
738
|
| 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. |
|
|
759
739
|
| message | : The callback information. |
|
|
760
740
|
| 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. |
|
|
@@ -768,7 +748,7 @@ When you call updatePublishMediaStream to modify publishing parameters, the SDK
|
|
|
768
748
|
The SDK will then receive the modification result from the cloud server and will send the result to you via this callback.
|
|
769
749
|
| Param | DESC |
|
|
770
750
|
| --- | --- |
|
|
771
|
-
| code | :
|
|
751
|
+
| 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>. |
|
|
772
752
|
| 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. |
|
|
773
753
|
| message | : The callback information. |
|
|
774
754
|
| taskId | : The task ID you pass in when calling updatePublishMediaStream, which is used to identify a request. |
|
|
@@ -782,7 +762,7 @@ When you call stopPublishMediaStream to stop publishing, the SDK will immediatel
|
|
|
782
762
|
The SDK will then receive the modification result from the cloud server and will send the result to you via this callback.
|
|
783
763
|
| Param | DESC |
|
|
784
764
|
| --- | --- |
|
|
785
|
-
| code | :
|
|
765
|
+
| 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>. |
|
|
786
766
|
| 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. |
|
|
787
767
|
| message | : The callback information. |
|
|
788
768
|
| taskId | : The task ID you pass in when calling stopPublishMediaStream, which is used to identify a request. |
|
|
@@ -797,10 +777,10 @@ If you set the publishing destination (TRTCPublishTarget) to the URL of Tencent
|
|
|
797
777
|
| Param | DESC |
|
|
798
778
|
| --- | --- |
|
|
799
779
|
| cdnUrl | : The URL you specify in TRTCPublishTarget when you call startPublishMediaStream. |
|
|
800
|
-
| code | : The publishing result.
|
|
780
|
+
| 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>. |
|
|
801
781
|
| extraInfo | : Additional information. For some error codes, there may be additional information to help you troubleshoot the issues. |
|
|
802
782
|
| message | : The publishing information. |
|
|
803
|
-
| 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
|
|
783
|
+
| 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> . |
|
|
804
784
|
|
|
805
785
|
## onScreenCaptureStarted
|
|
806
786
|
|
|
@@ -825,7 +805,7 @@ The SDK returns this callback when you call stopScreenCapture to stop screen sha
|
|
|
825
805
|
|
|
826
806
|
|Param|DESC|
|
|
827
807
|
|---------|---------|
|
|
828
|
-
|reason|Reason.
|
|
808
|
+
|reason|Reason. `0` : the user stopped screen sharing; `1` : screen sharing stopped because the shared window was closed.|
|
|
829
809
|
|
|
830
810
|
## onLocalRecordBegin:storagePath:
|
|
831
811
|
|
|
@@ -905,8 +885,8 @@ If you have configured the callback of custom rendering for local or remote vide
|
|
|
905
885
|
|Param|DESC|
|
|
906
886
|
|---------|---------|
|
|
907
887
|
|frame|Video frames to be rendered|
|
|
908
|
-
|streamType|Stream type. The primary stream (`
|
|
909
|
-
|userId
|
|
888
|
+
|streamType|Stream type. The primary stream ( `Main` ) is usually used for camera images, and the substream ( `Sub` ) for screen sharing images.|
|
|
889
|
+
|userId| `userId` of the video source. This parameter can be ignored if the callback is for local video (setLocalVideoRenderDelegate).|
|
|
910
890
|
|
|
911
891
|
## onGLContextCreated
|
|
912
892
|
|
|
@@ -916,13 +896,13 @@ If you have configured the callback of custom rendering for local or remote vide
|
|
|
916
896
|
|
|
917
897
|
**Video processing by third-party beauty filters.**
|
|
918
898
|
|
|
919
|
-
If you use a third-party beauty filter component, you need to configure this callback in
|
|
899
|
+
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.
|
|
920
900
|
|
|
921
901
|
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.
|
|
922
902
|
|
|
923
903
|
Case 1: the beauty filter component generates new textures
|
|
924
904
|
|
|
925
|
-
If the beauty filter component you use generates a frame of new texture (for the processed image) during image processing, please set
|
|
905
|
+
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.
|
|
926
906
|
``` objectivec
|
|
927
907
|
uint32_t onProcessVideoFrame(TRTCVideoFrame * _Nonnull)srcFrame dstFrame:(TRTCVideoFrame * _Nonnull)dstFrame{
|
|
928
908
|
self.frameID += 1;
|
|
@@ -951,7 +931,6 @@ uint32_t onProcessVideoFrame(TRTCVideoFrame * _Nonnull)srcFrame dstFrame:(TRTCVi
|
|
|
951
931
|
|
|
952
932
|
> **Note**
|
|
953
933
|
>
|
|
954
|
-
|
|
955
934
|
> Currently, only the OpenGL texture scheme is supported(PC supports TRTCVideoBufferType_Buffer format Only)
|
|
956
935
|
>
|
|
957
936
|
|
|
@@ -976,13 +955,10 @@ After you configure the callback of custom audio processing, the SDK will return
|
|
|
976
955
|
|
|
977
956
|
> **Note**
|
|
978
957
|
>
|
|
979
|
-
|
|
980
958
|
> 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.
|
|
981
959
|
>
|
|
982
|
-
|
|
983
960
|
> 2. The audio data returned via this callback can be read and modified, but please keep the duration of your operation short.
|
|
984
961
|
>
|
|
985
|
-
|
|
986
962
|
> 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.
|
|
987
963
|
>
|
|
988
964
|
|
|
@@ -999,11 +975,11 @@ After you configure the callback of custom audio processing, the SDK will return
|
|
|
999
975
|
|
|
1000
976
|
Instructions:
|
|
1001
977
|
|
|
1002
|
-
You could write data to the
|
|
978
|
+
You could write data to the `TRTCAudioFrame.extraData` filed, in order to achieve the purpose of transmitting signaling.
|
|
1003
979
|
|
|
1004
980
|
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.
|
|
1005
981
|
|
|
1006
|
-
Other users in the room can receive the message through the
|
|
982
|
+
Other users in the room can receive the message through the `TRTCAudioFrame.extraData` in `onRemoteUserAudioFrame` callback in TRTCAudioFrameDelegate.
|
|
1007
983
|
|
|
1008
984
|
|Param|DESC|
|
|
1009
985
|
|---------|---------|
|
|
@@ -1011,13 +987,10 @@ Other users in the room can receive the message through the ` TRTCAudioFrame.ext
|
|
|
1011
987
|
|
|
1012
988
|
> **Note**
|
|
1013
989
|
>
|
|
1014
|
-
|
|
1015
990
|
> 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.
|
|
1016
991
|
>
|
|
1017
|
-
|
|
1018
992
|
> 2. The audio data returned via this callback can be read and modified, but please keep the duration of your operation short.
|
|
1019
993
|
>
|
|
1020
|
-
|
|
1021
994
|
> 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.
|
|
1022
995
|
>
|
|
1023
996
|
|
|
@@ -1039,7 +1012,6 @@ After you configure the callback of custom audio processing, the SDK will return
|
|
|
1039
1012
|
|
|
1040
1013
|
> **Note**
|
|
1041
1014
|
>
|
|
1042
|
-
|
|
1043
1015
|
> The audio data returned via this callback can be read but not modified.
|
|
1044
1016
|
>
|
|
1045
1017
|
|
|
@@ -1060,13 +1032,10 @@ After you configure the callback of custom audio processing, the SDK will return
|
|
|
1060
1032
|
|
|
1061
1033
|
> **Note**
|
|
1062
1034
|
>
|
|
1063
|
-
|
|
1064
1035
|
> 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.
|
|
1065
1036
|
>
|
|
1066
|
-
|
|
1067
1037
|
> 2. The audio data returned via this callback can be read and modified, but please keep the duration of your operation short.
|
|
1068
1038
|
>
|
|
1069
|
-
|
|
1070
1039
|
> 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.
|
|
1071
1040
|
>
|
|
1072
1041
|
|
|
@@ -1087,10 +1056,8 @@ After you configure the callback of custom audio processing, the SDK will return
|
|
|
1087
1056
|
|
|
1088
1057
|
> **Note**
|
|
1089
1058
|
>
|
|
1090
|
-
|
|
1091
1059
|
> 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.
|
|
1092
1060
|
>
|
|
1093
|
-
|
|
1094
1061
|
> 2. The audio data returned via this callback cannot be modified.
|
|
1095
1062
|
>
|
|
1096
1063
|
|
|
@@ -1111,10 +1078,8 @@ After you configure the callback of custom audio processing, the SDK will return
|
|
|
1111
1078
|
|
|
1112
1079
|
> **Note**
|
|
1113
1080
|
>
|
|
1114
|
-
|
|
1115
1081
|
> 1. Please avoid time-consuming operations in this callback function, or it will cause audio exceptions.
|
|
1116
1082
|
>
|
|
1117
|
-
|
|
1118
1083
|
> 2. The audio data returned via this callback can be read and modified, but please keep the duration of your operation short.
|
|
1119
1084
|
>
|
|
1120
1085
|
|
|
@@ -1128,4 +1093,4 @@ If you want to capture the local log printing event, you can configure the log c
|
|
|
1128
1093
|
|---------|---------|
|
|
1129
1094
|
|level|Log level. For more information, please see TRTC_LOG_LEVEL.|
|
|
1130
1095
|
|log|Log content|
|
|
1131
|
-
|module|Reserved field, which is not defined at the moment and has a fixed value of
|
|
1096
|
+
|module|Reserved field, which is not defined at the moment and has a fixed value of `TXLiteAVSDK` .|
|