@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
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
|
|
75
75
|
**Video resolution.**
|
|
76
76
|
|
|
77
|
-
Here, only the landscape resolution (e.g., 640x360) is defined. If the portrait resolution (e.g., 360x640) needs to be used,
|
|
77
|
+
Here, only the landscape resolution (e.g., 640x360) is defined. If the portrait resolution (e.g., 360x640) needs to be used, `Portrait` must be selected for TRTCVideoResolutionMode.
|
|
78
78
|
|
|
79
79
|
|Enum|Value|DESC|
|
|
80
80
|
|---------|---------|---------|
|
|
@@ -103,12 +103,12 @@ Here, only the landscape resolution (e.g., 640x360) is defined. If the portrait
|
|
|
103
103
|
|
|
104
104
|
**Video aspect ratio mode.**
|
|
105
105
|
|
|
106
|
-
Only the landscape resolution (e.g., 640x360) is defined in
|
|
106
|
+
Only the landscape resolution (e.g., 640x360) is defined in `TRTCVideoResolution` . If the portrait resolution (e.g., 360x640) needs to be used, `Portrait` must be selected for `TRTCVideoResolutionMode` .
|
|
107
107
|
|
|
108
108
|
|Enum|Value|DESC|
|
|
109
109
|
|---------|---------|---------|
|
|
110
|
-
|TRTCVideoResolutionModeLandscape|0|Landscape resolution, such as
|
|
111
|
-
|TRTCVideoResolutionModePortrait|1|Portrait resolution, such as
|
|
110
|
+
|TRTCVideoResolutionModeLandscape|0|Landscape resolution, such as `TRTCVideoResolution_640_360 + TRTCVideoResolutionModeLandscape = 640x360` .|
|
|
111
|
+
|TRTCVideoResolutionModePortrait|1|Portrait resolution, such as `TRTCVideoResolution_640_360 + TRTCVideoResolutionModePortrait = 360x640` .|
|
|
112
112
|
|
|
113
113
|
## TRTCVideoStreamType
|
|
114
114
|
|
|
@@ -123,7 +123,6 @@ TRTC provides three different video streams, including:
|
|
|
123
123
|
|
|
124
124
|
> **Note**
|
|
125
125
|
>
|
|
126
|
-
|
|
127
126
|
> The SDK does not support enabling the smooth small image alone, which must be enabled together with the big image. It will automatically set the resolution and bitrate of the small image.
|
|
128
127
|
>
|
|
129
128
|
|
|
@@ -199,8 +198,8 @@ For custom capturing and rendering features, you need to use the following enume
|
|
|
199
198
|
| Enum | Value | DESC |
|
|
200
199
|
| --- | --- | --- |
|
|
201
200
|
| TRTCVideoBufferType_Unknown | 0 | Undefined transfer method |
|
|
202
|
-
| TRTCVideoBufferType_PixelBuffer | 1 | Use memory buffer to transfer video data. iOS:
|
|
203
|
-
| TRTCVideoBufferType_NSData | 2 | Use memory buffer to transfer video data. iOS: more compact memory block in
|
|
201
|
+
| TRTCVideoBufferType_PixelBuffer | 1 | Use memory buffer to transfer video data. iOS: <code>PixelBuffer</code> ; Android: <code>Direct Buffer</code> for JNI layer; Windows: memory data block. |
|
|
202
|
+
| TRTCVideoBufferType_NSData | 2 | Use memory buffer to transfer video data. iOS: more compact memory block in <code>NSData</code> type after additional processing; Android: <code>byte[]</code> for Java layer.<br>This transfer method has a lower efficiency than other methods. |
|
|
204
203
|
| TRTCVideoBufferType_Texture | 3 | Use OpenGL texture to transfer video data |
|
|
205
204
|
|
|
206
205
|
## TRTCVideoMirrorType
|
|
@@ -235,24 +234,24 @@ The SDK can take screenshots from the following two data sources and save them a
|
|
|
235
234
|
**Use cases.**
|
|
236
235
|
|
|
237
236
|
TRTC features targeted optimizations for common audio/video application scenarios to meet the differentiated requirements in various verticals. The main scenarios can be divided into the following two categories:
|
|
238
|
-
- Live streaming scenario (LIVE): including
|
|
237
|
+
- Live streaming scenario (LIVE): including `LIVE` (audio + video) and `VoiceChatRoom` (pure audio).
|
|
239
238
|
|
|
240
239
|
In the live streaming scenario, users are divided into two roles: "anchor" and "audience". A single room can sustain up to 100,000 concurrent online users. This is suitable for live streaming to a large audience.
|
|
241
|
-
- Real-Time scenario (RTC): including
|
|
240
|
+
- Real-Time scenario (RTC): including `VideoCall` (audio + video) and `AudioCall` (pure audio).
|
|
242
241
|
|
|
243
242
|
In the real-time scenario, there is no role difference between users, but a single room can sustain only up to 300 concurrent online users. This is suitable for small-scale real-time communication.
|
|
244
243
|
| Enum | Value | DESC |
|
|
245
244
|
| --- | --- | --- |
|
|
246
245
|
| TRTCAppSceneVideoCall | 0 | In the video call scenario, 720p and 1080p HD image quality is supported. A single room can sustain up to 300 concurrent online users, and up to 50 of them can speak simultaneously.<br>Use cases: [one-to-one video call], [video conferencing with up to 300 participants], [online medical diagnosis], [small class], [video interview], etc. |
|
|
247
|
-
| TRTCAppSceneLIVE | 1 | In the interactive video live streaming scenario, mic can be turned on/off smoothly without waiting for switchover, and the anchor latency is as low as less than 300 ms. Live streaming to hundreds of thousands of concurrent users in the audience role is supported with the playback latency down to 1,000 ms.<br>Use cases: [low-latency interactive live streaming], [big class], [anchor competition], [video dating room], [online interactive classroom], [remote training], [large-scale conferencing], etc.<br><strong>Note</strong><br>In this scenario, you must use the
|
|
248
|
-
| TRTCAppSceneAudioCall | 2 | Audio call scenario, where the
|
|
249
|
-
| TRTCAppSceneVoiceChatRoom | 3 | In the interactive audio live streaming scenario, mic can be turned on/off smoothly without waiting for switchover, and the anchor latency is as low as less than 300 ms. Live streaming to hundreds of thousands of concurrent users in the audience role is supported with the playback latency down to 1,000 ms.<br>Use cases: [audio club], [online karaoke room], [music live room], [FM radio], etc.<br><strong>Note</strong><br>In this scenario, you must use the
|
|
246
|
+
| TRTCAppSceneLIVE | 1 | In the interactive video live streaming scenario, mic can be turned on/off smoothly without waiting for switchover, and the anchor latency is as low as less than 300 ms. Live streaming to hundreds of thousands of concurrent users in the audience role is supported with the playback latency down to 1,000 ms.<br>Use cases: [low-latency interactive live streaming], [big class], [anchor competition], [video dating room], [online interactive classroom], [remote training], [large-scale conferencing], etc.<br><strong>Note</strong><br>In this scenario, you must use the <code>role</code> field in <code>TRTCParams</code> to specify the role of the current user. |
|
|
247
|
+
| TRTCAppSceneAudioCall | 2 | Audio call scenario, where the <code>SPEECH</code> sound quality is used by default. A single room can sustain up to 300 concurrent online users, and up to 50 of them can speak simultaneously.<br>Use cases: [one-to-one audio call], [audio conferencing with up to 300 participants], [audio chat], [online Werewolf], etc. |
|
|
248
|
+
| TRTCAppSceneVoiceChatRoom | 3 | In the interactive audio live streaming scenario, mic can be turned on/off smoothly without waiting for switchover, and the anchor latency is as low as less than 300 ms. Live streaming to hundreds of thousands of concurrent users in the audience role is supported with the playback latency down to 1,000 ms.<br>Use cases: [audio club], [online karaoke room], [music live room], [FM radio], etc.<br><strong>Note</strong><br>In this scenario, you must use the <code>role</code> field in <code>TRTCParams</code> to specify the role of the current user. |
|
|
250
249
|
|
|
251
250
|
## TRTCRoleType
|
|
252
251
|
|
|
253
252
|
**Role.**
|
|
254
253
|
|
|
255
|
-
Role is applicable only to live streaming scenarios (`
|
|
254
|
+
Role is applicable only to live streaming scenarios ( `TRTCAppSceneLIVE` and `TRTCAppSceneVoiceChatRoom` ). Users are divided into two roles:
|
|
256
255
|
- Anchor, who can publish their audio/video streams. There is a limit on the number of anchors. Up to 50 anchors are allowed to publish streams at the same time in one room.
|
|
257
256
|
|
|
258
257
|
- Audience, who can only listen to or watch audio/video streams of anchors in the room. If they want to publish their streams, they need to switch to the "anchor" role first through switchRole. One room can sustain up to 100,000 concurrent online users in the audience role.
|
|
@@ -286,7 +285,7 @@ TRTC has two control modes in weak network environments: "ensuring clarity" and
|
|
|
286
285
|
|
|
287
286
|
**Network quality.**
|
|
288
287
|
|
|
289
|
-
TRTC evaluates the current network quality once every two seconds. The evaluation results are divided into six levels:
|
|
288
|
+
TRTC evaluates the current network quality once every two seconds. The evaluation results are divided into six levels: `Excellent` indicates the best, and `Down` indicates the worst.
|
|
290
289
|
|
|
291
290
|
|Enum|Value|DESC|
|
|
292
291
|
|---------|---------|---------|
|
|
@@ -319,18 +318,18 @@ This enumerated type is used in the audio status changed API onRemoteAudioStatus
|
|
|
319
318
|
|Enum|Value|DESC|
|
|
320
319
|
|---------|---------|---------|
|
|
321
320
|
|TRTCAVStatusChangeReasonInternal|0|Default value|
|
|
322
|
-
|TRTCAVStatusChangeReasonBufferingBegin|1|The stream enters the
|
|
323
|
-
|TRTCAVStatusChangeReasonBufferingEnd|2|The stream enters the
|
|
324
|
-
|TRTCAVStatusChangeReasonLocalStarted|3|As a start-related API was directly called locally, the stream enters the
|
|
325
|
-
|TRTCAVStatusChangeReasonLocalStopped|4|As a stop-related API was directly called locally, the stream enters the
|
|
326
|
-
|TRTCAVStatusChangeReasonRemoteStarted|5|As the remote user started (or resumed) publishing the audio or video stream, the stream enters the
|
|
321
|
+
|TRTCAVStatusChangeReasonBufferingBegin|1|The stream enters the `Loading` state due to network congestion|
|
|
322
|
+
|TRTCAVStatusChangeReasonBufferingEnd|2|The stream enters the `Playing` state after network recovery|
|
|
323
|
+
|TRTCAVStatusChangeReasonLocalStarted|3|As a start-related API was directly called locally, the stream enters the `Playing` state|
|
|
324
|
+
|TRTCAVStatusChangeReasonLocalStopped|4|As a stop-related API was directly called locally, the stream enters the `Stopped` state|
|
|
325
|
+
|TRTCAVStatusChangeReasonRemoteStarted|5|As the remote user started (or resumed) publishing the audio or video stream, the stream enters the `Loading` or `Playing` state|
|
|
327
326
|
|TRTCAVStatusChangeReasonRemoteStopped|6|As the remote user stopped (or paused) publishing the audio or video stream, the stream enters the "Stopped" state|
|
|
328
327
|
|
|
329
328
|
## TRTCAudioSampleRate
|
|
330
329
|
|
|
331
330
|
**Audio sample rate.**
|
|
332
331
|
|
|
333
|
-
The audio sample rate is used to measure the audio fidelity. A higher sample rate indicates higher fidelity. If there is music in the use case,
|
|
332
|
+
The audio sample rate is used to measure the audio fidelity. A higher sample rate indicates higher fidelity. If there is music in the use case, `TRTCAudioSampleRate48000` is recommended.
|
|
334
333
|
|
|
335
334
|
|Enum|Value|DESC|
|
|
336
335
|
|---------|---------|---------|
|
|
@@ -348,7 +347,7 @@ TRTC provides three well-tuned modes to meet the differentiated requirements for
|
|
|
348
347
|
|
|
349
348
|
- Music mode (Music): it is suitable for scenarios with demanding requirements for music. In this mode, the amount of transferred audio data is very large, and TRTC uses various technologies to ensure that the high-fidelity details of music signals can be restored in each frequency band.
|
|
350
349
|
|
|
351
|
-
- Default mode (Default): it is between
|
|
350
|
+
- Default mode (Default): it is between `Speech` and `Music` . In this mode, the reproduction of music is better than that in `Speech` mode, and the amount of transferred data is much lower than that in `Music` mode; therefore, this mode has good adaptability to various scenarios.
|
|
352
351
|
|
|
353
352
|
|Enum|Value|DESC|
|
|
354
353
|
|---------|---------|---------|
|
|
@@ -429,9 +428,9 @@ If you are able to mute your phone using the volume buttons, then your phone is
|
|
|
429
428
|
The SDK offers three system volume control modes: auto, call volume, and media volume.
|
|
430
429
|
| Enum | Value | DESC |
|
|
431
430
|
| --- | --- | --- |
|
|
432
|
-
| TRTCSystemVolumeTypeAuto | 0 | Auto:<br>In the auto mode, call volume is used for anchors, and media volume for audience. This mode is suitable for live streaming scenarios.<br>If the scenario you select during
|
|
431
|
+
| TRTCSystemVolumeTypeAuto | 0 | Auto:<br>In the auto mode, call volume is used for anchors, and media volume for audience. This mode is suitable for live streaming scenarios.<br>If the scenario you select during <code>enterRoom</code> is <code>TRTCAppSceneLIVE</code> or <code>TRTCAppSceneVoiceChatRoom</code> , the SDK will automatically use this mode. |
|
|
433
432
|
| TRTCSystemVolumeTypeMedia | 1 | Media volume:<br>In this mode, media volume is used in all scenarios. It is rarely used, mainly suitable for music scenarios with demanding requirements on audio quality.<br>Use this mode if most of your users use peripheral devices such as audio cards. Otherwise, it is not recommended. |
|
|
434
|
-
| TRTCSystemVolumeTypeVOIP | 2 | Call volume:<br>In this mode, the audio module does not change its work mode when users switch between anchors and audience, enabling seamless mic on/off. This mode is suitable for scenarios where users need to switch frequently between anchors and audience.<br>If the scenario you select during
|
|
433
|
+
| TRTCSystemVolumeTypeVOIP | 2 | Call volume:<br>In this mode, the audio module does not change its work mode when users switch between anchors and audience, enabling seamless mic on/off. This mode is suitable for scenarios where users need to switch frequently between anchors and audience.<br>If the scenario you select during <code>enterRoom</code> is <code>TRTCAppSceneVideoCall</code> or <code>TRTCAppSceneAudioCall</code> , the SDK will automatically use this mode. |
|
|
435
434
|
|
|
436
435
|
## TRTCAudioFrameOperationMode
|
|
437
436
|
|
|
@@ -451,7 +450,7 @@ TRTC provides two modes of operation for audio callback data.
|
|
|
451
450
|
|
|
452
451
|
**Log level.**
|
|
453
452
|
|
|
454
|
-
Different log levels indicate different levels of details and number of logs. We recommend you set the log level to
|
|
453
|
+
Different log levels indicate different levels of details and number of logs. We recommend you set the log level to `TRTCLogLevelInfo` generally.
|
|
455
454
|
|
|
456
455
|
|Enum|Value|DESC|
|
|
457
456
|
|---------|---------|---------|
|
|
@@ -471,8 +470,8 @@ Different log levels indicate different levels of details and number of logs. We
|
|
|
471
470
|
| Enum | Value | DESC |
|
|
472
471
|
| --- | --- | --- |
|
|
473
472
|
| TRTCGSensorMode_Disable | 0 | Do not adapt to G-sensor orientation<br>This mode is the default value for desktop platforms. In this mode, the video image published by the current user is not affected by the change of the G-sensor orientation. |
|
|
474
|
-
| TRTCGSensorMode_UIAutoLayout | 1 | Adapt to G-sensor orientation<br>This mode is the default value on mobile platforms. In this mode, the video image published by the current user is adjusted according to the G-sensor orientation, while the orientation of the local preview image remains unchanged.<br>One of the adaptation modes currently supported by the SDK is as follows: when the phone or tablet is upside down, in order to ensure that the screen orientation seen by the remote user is normal, the SDK will automatically rotate the published video image by 180 degrees.<br>If the UI layer of your application has enabled G-sensor adaption, we recommend you use the
|
|
475
|
-
| TRTCGSensorMode_UIFixLayout | 2 | Adapt to G-sensor orientation<br>In this mode, the video image published by the current user is adjusted according to the G-sensor orientation, and the local preview image will also be rotated accordingly.<br>One of the features currently supported is as follows: when the phone or tablet is upside down, in order to ensure that the screen orientation seen by the remote user is normal, the SDK will automatically rotate the published video image by 180 degrees.<br>If the UI layer of your application doesn't support G-sensor adaption, but you want the video image in the SDK to adapt to the G-sensor orientation, we recommend you use the
|
|
473
|
+
| TRTCGSensorMode_UIAutoLayout | 1 | Adapt to G-sensor orientation<br>This mode is the default value on mobile platforms. In this mode, the video image published by the current user is adjusted according to the G-sensor orientation, while the orientation of the local preview image remains unchanged.<br>One of the adaptation modes currently supported by the SDK is as follows: when the phone or tablet is upside down, in order to ensure that the screen orientation seen by the remote user is normal, the SDK will automatically rotate the published video image by 180 degrees.<br>If the UI layer of your application has enabled G-sensor adaption, we recommend you use the <code>UIFixLayout</code> mode. |
|
|
474
|
+
| TRTCGSensorMode_UIFixLayout | 2 | Adapt to G-sensor orientation<br>In this mode, the video image published by the current user is adjusted according to the G-sensor orientation, and the local preview image will also be rotated accordingly.<br>One of the features currently supported is as follows: when the phone or tablet is upside down, in order to ensure that the screen orientation seen by the remote user is normal, the SDK will automatically rotate the published video image by 180 degrees.<br>If the UI layer of your application doesn't support G-sensor adaption, but you want the video image in the SDK to adapt to the G-sensor orientation, we recommend you use the <code>UIFixLayout</code> mode.<br>@deprecated Begin from v11.5 version, it no longer supports TRTCGSensorMode_UIFixLayout and only supports the above two modes. |
|
|
476
475
|
|
|
477
476
|
## TRTCScreenCaptureSourceType
|
|
478
477
|
|
|
@@ -492,10 +491,10 @@ TRTC's On-Cloud MixTranscoding service can mix multiple audio/video streams in t
|
|
|
492
491
|
| Enum | Value | DESC |
|
|
493
492
|
| --- | --- | --- |
|
|
494
493
|
| TRTCTranscodingConfigMode_Unknown | 0 | Undefined |
|
|
495
|
-
| TRTCTranscodingConfigMode_Manual | 1 | Manual layout mode<br>In this mode, you need to specify the precise position of each video image. This mode has the highest degree of freedom, but its ease of use is the worst:<br>- You need to enter all the parameters in TRTCTranscodingConfig, including the position coordinates of each video image (TRTCMixUser).<br>- You need to listen on the onUserVideoAvailable and onUserAudioAvailable event callbacks in TRTCCloudDelegate and constantly adjust the
|
|
496
|
-
| TRTCTranscodingConfigMode_Template_PureAudio | 2 | Pure audio mode<br>This mode is suitable for pure audio scenarios such as audio call (AudioCall) and audio chat room (VoiceChatRoom).<br>- You only need to set it once through the setMixTranscodingConfig API after room entry, and then the SDK will automatically mix the audio of all mic-on users in the room into the current user's live stream.<br>- You don't need to set the
|
|
497
|
-
| TRTCTranscodingConfigMode_Template_PresetLayout | 3 | Preset layout mode<br>This is the most popular layout mode, because it allows you to set the position of each video image in advance through placeholders, and then the SDK automatically adjusts it dynamically according to the number of video images in the room.<br>In this mode, you still need to set the
|
|
498
|
-
| TRTCTranscodingConfigMode_Template_ScreenSharing | 4 | Screen sharing mode<br>This mode is suitable for screen sharing-based use cases such as online education and supported only by the SDKs for Windows and macOS.<br>In this mode, the SDK will first build a canvas according to the target resolution you set (through the
|
|
494
|
+
| TRTCTranscodingConfigMode_Manual | 1 | Manual layout mode<br>In this mode, you need to specify the precise position of each video image. This mode has the highest degree of freedom, but its ease of use is the worst:<br>- You need to enter all the parameters in TRTCTranscodingConfig, including the position coordinates of each video image (TRTCMixUser).<br>- You need to listen on the onUserVideoAvailable and onUserAudioAvailable event callbacks in TRTCCloudDelegate and constantly adjust the <code>mixUsers</code> parameter according to the audio/video status of each user with mic on in the current room. |
|
|
495
|
+
| TRTCTranscodingConfigMode_Template_PureAudio | 2 | Pure audio mode<br>This mode is suitable for pure audio scenarios such as audio call (AudioCall) and audio chat room (VoiceChatRoom).<br>- You only need to set it once through the setMixTranscodingConfig API after room entry, and then the SDK will automatically mix the audio of all mic-on users in the room into the current user's live stream.<br>- You don't need to set the <code>mixUsers</code> parameter in TRTCTranscodingConfig; instead, you only need to set the <code>audioSampleRate</code> , <code>audioBitrate</code> and <code>audioChannels</code> parameters. |
|
|
496
|
+
| TRTCTranscodingConfigMode_Template_PresetLayout | 3 | Preset layout mode<br>This is the most popular layout mode, because it allows you to set the position of each video image in advance through placeholders, and then the SDK automatically adjusts it dynamically according to the number of video images in the room.<br>In this mode, you still need to set the <code>mixUsers</code> parameter, but you can set <code>userId</code> as a "placeholder". Placeholder values include:<br>- "$PLACE_HOLDER_REMOTE$": image of remote user. Multiple images can be set.<br>- "$PLACE_HOLDER_LOCAL_MAIN$": local camera image. Only one image can be set.<br>- "$PLACE_HOLDER_LOCAL_SUB$": local screen sharing image. Only one image can be set.<br>In this mode, you don't need to listen on the onUserVideoAvailable and onUserAudioAvailable callbacks in TRTCCloudDelegate to make real-time adjustments.<br>Instead, you only need to call setMixTranscodingConfig once after successful room entry. Then, the SDK will automatically populate the placeholders you set with real <code>userId</code> values. |
|
|
497
|
+
| TRTCTranscodingConfigMode_Template_ScreenSharing | 4 | Screen sharing mode<br>This mode is suitable for screen sharing-based use cases such as online education and supported only by the SDKs for Windows and macOS.<br>In this mode, the SDK will first build a canvas according to the target resolution you set (through the <code>videoWidth</code> and <code>videoHeight</code> parameters).<br>- Before the teacher enables screen sharing, the SDK will scale up the teacher's camera image and draw it onto the canvas.<br>- After the teacher enables screen sharing, the SDK will draw the video image shared on the screen onto the same canvas.<br>The purpose of this layout mode is to ensure consistency in the output resolution of the mixtranscoding module and avoid problems with blurred screen during course replay and webpage playback (web players don't support adjustable resolution).<br>Meanwhile, the audio of mic-on students will be mixed into the teacher's audio/video stream by default.<br>Video content is primarily the shared screen in teaching mode, and it is a waste of bandwidth to transfer camera image and screen image at the same time.<br>Therefore, the recommended practice is to directly draw the camera image onto the current screen through the setLocalVideoRenderCallback API.<br>In this mode, you don't need to set the <code>mixUsers</code> parameter in TRTCTranscodingConfig, and the SDK will not mix students' images so as not to interfere with the screen sharing effect.<br>You can set width x height in TRTCTranscodingConfig to 0 px x 0 px, and the SDK will automatically calculate a suitable resolution based on the aspect ratio of the user's current screen.<br>- If the teacher's current screen width is less than or equal to 1920 px, the SDK will use the actual resolution of the teacher's current screen.<br>- If the teacher's current screen width is greater than 1920 px, the SDK will select one of the three resolutions of 1920x1080 (16:9), 1920x1200 (16:10), and 1920x1440 (4:3) according to the current screen aspect ratio. |
|
|
499
498
|
|
|
500
499
|
## TRTCRecordType
|
|
501
500
|
|
|
@@ -514,11 +513,11 @@ This enumerated type is used in the local media recording API startLocalRecordin
|
|
|
514
513
|
**Stream mix input type.**
|
|
515
514
|
| Enum | Value | DESC |
|
|
516
515
|
| --- | --- | --- |
|
|
517
|
-
| TRTCMixInputTypeUndefined | 0 | Default.<br>Considering the compatibility with older versions, if you specify the inputType as Undefined, the SDK will determine the stream mix input type according to the value of the
|
|
516
|
+
| TRTCMixInputTypeUndefined | 0 | Default.<br>Considering the compatibility with older versions, if you specify the inputType as Undefined, the SDK will determine the stream mix input type according to the value of the <code>pureAudio</code> parameter |
|
|
518
517
|
| TRTCMixInputTypeAudioVideo | 1 | Mix both audio and video |
|
|
519
518
|
| TRTCMixInputTypePureVideo | 2 | Mix video only |
|
|
520
519
|
| TRTCMixInputTypePureAudio | 3 | Mix audio only |
|
|
521
|
-
| TRTCMixInputTypeWatermark | 4 | Mix watermark<br>In this case, you don't need to specify the
|
|
520
|
+
| TRTCMixInputTypeWatermark | 4 | Mix watermark<br>In this case, you don't need to specify the <code>userId</code> parameter, but you need to specify the <code>image</code> parameter. It is recommended to use png format. |
|
|
522
521
|
|
|
523
522
|
## TRTCAudioRecordingContent
|
|
524
523
|
|
|
@@ -547,7 +546,7 @@ You can specify one of the following publishing modes to use:
|
|
|
547
546
|
| TRTCPublishBigStreamToCdn | 1 | Use this parameter to publish the primary stream (TRTCVideoStreamTypeBig) in the room to Tencent Cloud or a third-party CDN (only RTMP is supported). |
|
|
548
547
|
| TRTCPublishSubStreamToCdn | 2 | Use this parameter to publish the substream (TRTCVideoStreamTypeSub) in the room to Tencent Cloud or a third-party CDN (only RTMP is supported). |
|
|
549
548
|
| TRTCPublishMixStreamToCdn | 3 | Use this parameter together with the encoding parameter TRTCStreamEncoderParam and On-Cloud MixTranscoding parameter TRTCStreamMixingConfig to transcode the streams you specify and publish the mixed stream to Tencent Cloud or a third-party CDN (only RTMP is supported). |
|
|
550
|
-
| TRTCPublishMixStreamToRoom | 4 | Use this parameter together with the encoding parameter TRTCStreamEncoderParam and On-Cloud MixTranscoding parameter TRTCStreamMixingConfig to transcode the streams you specify and publish the mixed stream to the room you specify.<br>- Use
|
|
549
|
+
| TRTCPublishMixStreamToRoom | 4 | Use this parameter together with the encoding parameter TRTCStreamEncoderParam and On-Cloud MixTranscoding parameter TRTCStreamMixingConfig to transcode the streams you specify and publish the mixed stream to the room you specify.<br>- Use <code>TRTCUser</code> in TRTCPublishTarget to specify the robot that publishes the transcoded stream to a TRTC room. |
|
|
551
550
|
|
|
552
551
|
## TRTCEncryptionAlgorithm
|
|
553
552
|
|
|
@@ -588,23 +587,23 @@ Begin from v11.7 version,It only takes effect when the camera capture scene in
|
|
|
588
587
|
|
|
589
588
|
**Room entry parameters.**
|
|
590
589
|
|
|
591
|
-
As the room entry parameters in the TRTC SDK, these parameters must be correctly set so that the user can successfully enter the audio/video room specified by
|
|
590
|
+
As the room entry parameters in the TRTC SDK, these parameters must be correctly set so that the user can successfully enter the audio/video room specified by `roomId` or `strRoomId` .
|
|
592
591
|
|
|
593
|
-
For historical reasons, TRTC supports two types of room IDs:
|
|
592
|
+
For historical reasons, TRTC supports two types of room IDs: `roomId` and `strRoomId` .
|
|
594
593
|
|
|
595
|
-
Note: do not mix
|
|
594
|
+
Note: do not mix `roomId` and `strRoomId` , because they are not interchangeable. For example, the number `123` and the string `123` are two completely different rooms in TRTC.
|
|
596
595
|
| EnumType | DESC |
|
|
597
596
|
| --- | --- |
|
|
598
597
|
| bussInfo | Field description: business data, which is optional. This field is needed only by some advanced features.<br>Recommended value: do not set this field on your own. |
|
|
599
|
-
| privateMapKey | Field description: permission credential used for permission control, which is optional. If you want only users with the specified
|
|
598
|
+
| privateMapKey | Field description: permission credential used for permission control, which is optional. If you want only users with the specified <code>userId</code> values to enter a room, you need to use <code>privateMapKey</code> to restrict the permission.<br>Recommended value: we recommend you use this parameter only if you have high security requirements. For more information, please see <a href="https://www.tencentcloud.com/document/product/647/35157">Enabling Advanced Permission Control</a>. |
|
|
600
599
|
| role | Field description: role in the live streaming scenario, which is applicable only to the live streaming scenario (TRTCAppSceneLIVE or TRTCAppSceneVoiceChatRoom) but doesn't take effect in the call scenario.<br>Recommended value: default value: anchor (TRTCRoleAnchor). |
|
|
601
|
-
| roomId | Field description: numeric room ID. Users (userId) in the same room can see one another and make audio/video calls.<br>Recommended value: value range: 1–4294967294.<br>@note
|
|
602
|
-
| sdkAppId | Field description: application ID, which is required. Tencent Cloud generates bills based on
|
|
603
|
-
| strRoomId | Field description: string-type room ID. Users (userId) in the same room can see one another and make audio/video calls.<br>@note
|
|
604
|
-
| streamId | Field description: specified
|
|
605
|
-
| userDefineRecordId | Field description: on-cloud recording field, which is optional and used to specify whether to record the user's audio/video stream in the cloud.<br>For more information, please see <a href="https://www.tencentcloud.com/document/product/647/45169">On-Cloud Recording</a>.<br>Recommended value: it can contain up to 64 bytes. Letters (a–z and A–Z), digits (0–9), underscores, and hyphens are allowed.<br>Scheme 1. Manual recording<br>1. Enable on-cloud recording in "Application Management" > "On-cloud Recording Configuration" in the <a href="https://console.cloud.tencent.com/trtc">console</a>.<br>2. Set "Recording Mode" to "Manual Recording".<br>3. After manual recording is set, in a TRTC room, only users with the
|
|
606
|
-
| userId | Field description: user ID, which is required. It is the
|
|
607
|
-
| userSig | Field description: user signature, which is required. It is the authentication signature corresponding to the current
|
|
600
|
+
| roomId | Field description: numeric room ID. Users (userId) in the same room can see one another and make audio/video calls.<br>Recommended value: value range: 1–4294967294.<br>@note <code>roomId</code> and <code>strRoomId</code> are mutually exclusive. If you decide to use <code>strRoomId</code> , then <code>roomId</code> should be entered as 0. If both are entered, <code>roomId</code> will be used.<br><strong>Note</strong><br>do not mix <code>roomId</code> and <code>strRoomId</code> , because they are not interchangeable. For example, the number <code>123</code> and the string <code>123</code> are two completely different rooms in TRTC. |
|
|
601
|
+
| sdkAppId | Field description: application ID, which is required. Tencent Cloud generates bills based on <code>sdkAppId</code> .<br>Recommended value: the ID can be obtained on the account information page in the <a href="https://console.cloud.tencent.com/rav/">TRTC console</a> after the corresponding application is created. |
|
|
602
|
+
| strRoomId | Field description: string-type room ID. Users (userId) in the same room can see one another and make audio/video calls.<br>@note <code>roomId</code> and <code>strRoomId</code> are mutually exclusive. If you decide to use <code>strRoomId</code> , then <code>roomId</code> should be entered as 0. If both are entered, <code>roomId</code> will be used.<br><strong>Note</strong><br>do not mix <code>roomId</code> and <code>strRoomId</code> , because they are not interchangeable. For example, the number <code>123</code> and the string <code>123</code> are two completely different rooms in TRTC.<br>Recommended value: the length limit is 64 bytes. The following 89 characters are supported:<br>- Uppercase and lowercase letters (a–z and A–Z)<br>- Digits (0–9)<br>- Space, "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "\\|", "~", and ",". |
|
|
603
|
+
| streamId | Field description: specified <code>streamId</code> in Tencent Cloud CSS, which is optional. After setting this field, you can play back the user's audio/video stream on Tencent Cloud CSS CDN through a standard pull scheme (FLV or HLS).<br>Recommended value: this parameter can contain up to 64 bytes and can be left empty. We recommend you use <code>sdkappid_roomid_userid_main</code> as the <code>streamid</code> , which is easier to identify and will not cause conflicts in your multiple applications.<br><strong>Note</strong><br>to use Tencent Cloud CSS CDN, you need to enable the auto-relayed live streaming feature on the "Function Configuration" page in the <a href="https://console.cloud.tencent.com/trtc/">console</a> first.<br>For more information, please see <a href="https://www.tencentcloud.com/document/product/647/47858">Relay to CDN</a>. |
|
|
604
|
+
| userDefineRecordId | Field description: on-cloud recording field, which is optional and used to specify whether to record the user's audio/video stream in the cloud.<br>For more information, please see <a href="https://www.tencentcloud.com/document/product/647/45169">On-Cloud Recording</a>.<br>Recommended value: it can contain up to 64 bytes. Letters (a–z and A–Z), digits (0–9), underscores, and hyphens are allowed.<br>Scheme 1. Manual recording<br>1. Enable on-cloud recording in "Application Management" > "On-cloud Recording Configuration" in the <a href="https://console.cloud.tencent.com/trtc">console</a>.<br>2. Set "Recording Mode" to "Manual Recording".<br>3. After manual recording is set, in a TRTC room, only users with the <code>userDefineRecordId</code> parameter set will have video recording files in the cloud, while users without this parameter set will not.<br>4. The recording file will be named in the format of "userDefineRecordId_start time_end time" in the cloud.<br>Scheme 2. Auto-recording<br>1. You need to enable on-cloud recording in "Application Management" > "On-cloud Recording Configuration" in the <a href="https://console.cloud.tencent.com/trtc">console</a>.<br>2. Set "Recording Mode" to "Auto-recording".<br>3. After auto-recording is set, any user who upstreams audio/video in a TRTC room will have a video recording file in the cloud.<br>4. The file will be named in the format of "userDefineRecordId_start time_end time". If <code>userDefineRecordId</code> is not specified, the file will be named in the format of "streamId_start time_end time". |
|
|
605
|
+
| userId | Field description: user ID, which is required. It is the <code>userId</code> of the local user in UTF-8 encoding and acts as the username.<br>Recommended value: if the ID of a user in your account system is "mike", <code>userId</code> can be set to "mike". |
|
|
606
|
+
| userSig | Field description: user signature, which is required. It is the authentication signature corresponding to the current <code>userId</code> and acts as the login password for Tencent Cloud services.<br>Recommended value: for the calculation method, please see <a href="https://www.tencentcloud.com/document/product/647/35166">UserSig</a>. |
|
|
608
607
|
|
|
609
608
|
## TRTCVideoEncParam
|
|
610
609
|
|
|
@@ -614,11 +613,11 @@ These settings determine the quality of image viewed by remote users as well as
|
|
|
614
613
|
| EnumType | DESC |
|
|
615
614
|
| --- | --- |
|
|
616
615
|
| enableAdjustRes | Field description: whether to allow dynamic resolution adjustment. Once enabled, this field will affect on-cloud recording.<br>Recommended value: this feature is suitable for scenarios that don't require on-cloud recording. After it is enabled, the SDK will intelligently select a suitable resolution according to the current network conditions to avoid the inefficient encoding mode of "large resolution + small bitrate".<br><strong>Note</strong><br>default value: NO. If you need on-cloud recording, please do not enable this feature, because if the video resolution changes, the MP4 file recorded in the cloud cannot be played back normally by common players. |
|
|
617
|
-
| minVideoBitrate | Field description: minimum video bitrate. The SDK will reduce the bitrate to as low as the value specified by
|
|
618
|
-
| resMode | Field description: resolution mode (landscape/portrait)<br>Recommended value: for mobile platforms (iOS and Android),
|
|
619
|
-
| videoBitrate | Field description: target video bitrate. The SDK encodes streams at the target video bitrate and will actively reduce the bitrate only in weak network environments.<br>Recommended value: please see the optimal bitrate for each specification in
|
|
616
|
+
| minVideoBitrate | Field description: minimum video bitrate. The SDK will reduce the bitrate to as low as the value specified by <code>minVideoBitrate</code> to ensure the smoothness only if the network conditions are poor.<br>Note: default value: 0, indicating that a reasonable value of the lowest bitrate will be automatically calculated by the SDK according to the resolution you specify.<br>Recommended value: you can set the <code>videoBitrate</code> and <code>minVideoBitrate</code> parameters at the same time to restrict the SDK's adjustment range of the video bitrate:<br>- If you want to "ensure clarity while allowing lag in weak network environments", you can set <code>minVideoBitrate</code> to 60% of <code>videoBitrate</code> .<br>- If you want to "ensure smoothness while allowing blur in weak network environments", you can set <code>minVideoBitrate</code> to a low value, for example, 100 Kbps.<br>- If you set <code>videoBitrate</code> and <code>minVideoBitrate</code> to the same value, it is equivalent to disabling the adaptive adjustment capability of the SDK for the video bitrate. |
|
|
617
|
+
| resMode | Field description: resolution mode (landscape/portrait)<br>Recommended value: for mobile platforms (iOS and Android), <code>Portrait</code> is recommended; for desktop platforms (Windows and macOS), <code>Landscape</code> is recommended.<br><strong>Note</strong><br>to use a portrait resolution, please specify <code>resMode</code> as <code>Portrait</code> ; for example, when used together with <code>Portrait</code> , 640x360 represents 360x640. |
|
|
618
|
+
| videoBitrate | Field description: target video bitrate. The SDK encodes streams at the target video bitrate and will actively reduce the bitrate only in weak network environments.<br>Recommended value: please see the optimal bitrate for each specification in <code>TRTCVideoResolution</code> . You can also slightly increase the optimal bitrate.<br>For example, <code>TRTCVideoResolution_1280_720</code> corresponds to the target bitrate of 1,200 Kbps. You can also set the bitrate to 1,500 Kbps for higher definition.<br><strong>Note</strong><br>you can set the <code>videoBitrate</code> and <code>minVideoBitrate</code> parameters at the same time to restrict the SDK's adjustment range of the video bitrate:<br>- If you want to "ensure clarity while allowing lag in weak network environments", you can set <code>minVideoBitrate</code> to 60% of <code>videoBitrate</code> .<br>- If you want to "ensure smoothness while allowing blur in weak network environments", you can set <code>minVideoBitrate</code> to a low value, for example, 100 Kbps.<br>- If you set <code>videoBitrate</code> and <code>minVideoBitrate</code> to the same value, it is equivalent to disabling the adaptive adjustment capability of the SDK for the video bitrate. |
|
|
620
619
|
| videoFps | Field description: video capturing frame rate<br>Recommended value: 15 or 20 fps. If the frame rate is lower than 5 fps, there will be obvious lagging; if lower than 10 fps but higher than 5 fps, there will be slight lagging; if higher than 20 fps, the bandwidth will be wasted (the frame rate of movies is generally 24 fps).<br><strong>Note</strong><br>the front cameras on certain Android phones do not support a capturing frame rate higher than 15 fps. For some Android phones that focus on beautification features, the capturing frame rate of the front cameras may be lower than 10 fps. |
|
|
621
|
-
| videoResolution | Field description: video resolution<br>Recommended value<br>- For mobile video call, we recommend you select a resolution of 360x640 or below and select
|
|
620
|
+
| videoResolution | Field description: video resolution<br>Recommended value<br>- For mobile video call, we recommend you select a resolution of 360x640 or below and select <code>Portrait</code> (portrait resolution) for <code>resMode</code> .<br>- For mobile live streaming, we recommend you select a resolution of 540x960 and select <code>Portrait</code> (portrait resolution) for <code>resMode</code> .<br>- For desktop platforms (Windows and macOS), we recommend you select a resolution of 640x360 or above and select <code>Landscape</code> (landscape resolution) for <code>resMode</code> .<br><strong>Note</strong><br>to use a portrait resolution, please specify <code>resMode</code> as <code>Portrait</code> ; for example, when used together with <code>Portrait</code> , 640x360 represents 360x640. |
|
|
622
621
|
|
|
623
622
|
## TRTCNetworkQosParam
|
|
624
623
|
|
|
@@ -661,7 +660,7 @@ This indicates the audio volume value. You can use it to display the volume of e
|
|
|
661
660
|
| --- | --- |
|
|
662
661
|
| pitch | The local user's vocal frequency (unit: Hz), the value range is [0 - 4000]. For remote users, this value is always 0. |
|
|
663
662
|
| spectrumData | Audio spectrum data, which divides the sound frequency into 256 frequency domains, spectrumData records the energy value of each frequency domain,<br>The value range of each energy value is [-300, 0] in dBFS.<br><strong>Note</strong><br>The local spectrum is calculated using the audio data before encoding, which will be affected by the capture volume, BGM, etc.; the remote spectrum is calculated using the received audio data, and operations such as adjusting the remote playback volume locally will not affect it. |
|
|
664
|
-
| userId | <code>
|
|
663
|
+
| userId | <code>userId</code> of the speaker. An empty value indicates the local user. |
|
|
665
664
|
| vad | Vad result of the local user. 0: not speech 1: speech. |
|
|
666
665
|
| volume | Volume of the speaker. Value range: 0–100. |
|
|
667
666
|
|
|
@@ -672,8 +671,8 @@ This indicates the audio volume value. You can use it to display the volume of e
|
|
|
672
671
|
You can test the network speed through the startSpeedTest: interface before the user enters the room (this API cannot be called during a call).
|
|
673
672
|
| EnumType | DESC |
|
|
674
673
|
| --- | --- |
|
|
675
|
-
| expectedDownBandwidth | Expected downstream bandwidth (kbps, value range: 10 to 5000, no downlink bandwidth test when it is 0).<br><strong>Note</strong><br>When the parameter
|
|
676
|
-
| expectedUpBandwidth | Expected upstream bandwidth (kbps, value range: 10 to 5000, no uplink bandwidth test when it is 0).<br><strong>Note</strong><br>When the parameter
|
|
674
|
+
| expectedDownBandwidth | Expected downstream bandwidth (kbps, value range: 10 to 5000, no downlink bandwidth test when it is 0).<br><strong>Note</strong><br>When the parameter <code>scene</code> is set to TRTCSpeedTestScene_OnlineChorusTesting, in order to obtain more accurate information such as <code>rtt / jitter</code> , the value range is limited to [10, 1000]. |
|
|
675
|
+
| expectedUpBandwidth | Expected upstream bandwidth (kbps, value range: 10 to 5000, no uplink bandwidth test when it is 0).<br><strong>Note</strong><br>When the parameter <code>scene</code> is set to TRTCSpeedTestScene_OnlineChorusTesting, in order to obtain more accurate information such as <code>rtt / jitter</code> , the value range is limited to [10, 1000]. |
|
|
677
676
|
| scene | Speed test scene. |
|
|
678
677
|
| sdkAppId | Application identification, please refer to the relevant instructions in TRTCParams. |
|
|
679
678
|
| userId | User identification, please refer to the relevant instructions in TRTCParams. |
|
|
@@ -703,17 +702,17 @@ The startSpeedTest: API can be used to test the network speed before a user ente
|
|
|
703
702
|
|
|
704
703
|
**Video frame information.**
|
|
705
704
|
|
|
706
|
-
`
|
|
705
|
+
`TRTCVideoFrame` is used to describe the raw data of a frame of the video image, which is the image data before frame encoding or after frame decoding.
|
|
707
706
|
| EnumType | DESC |
|
|
708
707
|
| --- | --- |
|
|
709
708
|
| bufferType | Field description: video data structure type |
|
|
710
|
-
| data | Field description: video data when
|
|
709
|
+
| data | Field description: video data when <code>bufferType</code> is TRTCVideoBufferType_NSData, which carries the memory data blocks in <code>NSData</code> type. |
|
|
711
710
|
| height | Field description: video height<br>Recommended value: please enter the height of the video data passed in. |
|
|
712
|
-
| pixelBuffer | Field description: video data when
|
|
711
|
+
| pixelBuffer | Field description: video data when <code>bufferType</code> is TRTCVideoBufferType_PixelBuffer, which carries the <code>PixelBuffer</code> unique to iOS. |
|
|
713
712
|
| pixelFormat | Field description: video pixel format |
|
|
714
713
|
| rotation | Field description: clockwise rotation angle of video pixels |
|
|
715
|
-
| textureId | Field description: video texture ID, i.e., video data when
|
|
716
|
-
| timestamp | Field description: video frame timestamp in milliseconds<br>Recommended value: this parameter can be set to 0 for custom video capturing. In this case, the SDK will automatically set the
|
|
714
|
+
| textureId | Field description: video texture ID, i.e., video data when <code>bufferType</code> is TRTCVideoBufferType_Texture, which carries the texture data used for OpenGL rendering. |
|
|
715
|
+
| timestamp | Field description: video frame timestamp in milliseconds<br>Recommended value: this parameter can be set to 0 for custom video capturing. In this case, the SDK will automatically set the <code>timestamp</code> field. However, please "evenly" set the calling interval of sendCustomVideoData. |
|
|
717
716
|
| width | Field description: video width<br>Recommended value: please enter the width of the video data passed in. |
|
|
718
717
|
|
|
719
718
|
## TRTCAudioFrame
|
|
@@ -732,14 +731,14 @@ The startSpeedTest: API can be used to test the network speed before a user ente
|
|
|
732
731
|
|
|
733
732
|
**Description information of each video image in On-Cloud MixTranscoding.**
|
|
734
733
|
|
|
735
|
-
`
|
|
734
|
+
`TRTCMixUser` is used to specify the location, size, layer, and stream type of each video image in On-Cloud MixTranscoding.
|
|
736
735
|
| EnumType | DESC |
|
|
737
736
|
| --- | --- |
|
|
738
|
-
| image | Field description: specify the placeholder or watermark image. The placeholder image will be displayed when there is no upstream video.A watermark image is a semi-transparent image posted in the mixed image, and this image will always be overlaid on the mixed image.<br>- When the
|
|
739
|
-
| inputType | Field description: specify the mixed content of this stream (audio only, video only, audio and video, or watermark).<br>Recommended value: default value: TRTCMixInputTypeUndefined.<br><strong>Note</strong><br>- When specifying
|
|
740
|
-
| pureAudio | Field description: specify whether this stream mixes audio only<br>Recommended value: default value: NO<br><strong>Note</strong><br>this field has been disused. We recommend you use the new field
|
|
737
|
+
| image | Field description: specify the placeholder or watermark image. The placeholder image will be displayed when there is no upstream video.A watermark image is a semi-transparent image posted in the mixed image, and this image will always be overlaid on the mixed image.<br>- When the <code>inputType</code> field is set to TRTCMixInputTypePureAudio, the image is a placeholder image, and you need to specify <code>userId</code> .<br>- When the <code>inputType</code> field is set to TRTCMixInputTypeWatermark, the image is a watermark image, and you don't need to specify <code>userId</code> .<br>Recommended value: default value: null, indicating not to set the placeholder or watermark image.<br><strong>Note</strong><br>TRTC's backend service will mix the image specified by the URL address into the final stream.URL link length is limited to 512 bytes. The image size is limited to 10MB.Support png, jpg, jpeg, bmp format. Take effects iff the <code>inputType</code> field is set to TRTCMixInputTypePureAudio or TRTCMixInputTypeWatermark. |
|
|
738
|
+
| inputType | Field description: specify the mixed content of this stream (audio only, video only, audio and video, or watermark).<br>Recommended value: default value: TRTCMixInputTypeUndefined.<br><strong>Note</strong><br>- When specifying <code>inputType</code> as TRTCMixInputTypeUndefined and specifying <code>pureAudio</code> to YES, it is equivalent to setting <code>inputType</code> to <code>TRTCMixInputTypePureAudio</code> .<br>- When specifying <code>inputType</code> as TRTCMixInputTypeUndefined and specifying <code>pureAudio</code> to NO, it is equivalent to setting <code>inputType</code> to <code>TRTCMixInputTypeAudioVideo</code> .<br>- When specifying <code>inputType</code> as TRTCMixInputTypeWatermark, you don't need to specify the <code>userId</code> field, but you need to specify the <code>image</code> field. |
|
|
739
|
+
| pureAudio | Field description: specify whether this stream mixes audio only<br>Recommended value: default value: NO<br><strong>Note</strong><br>this field has been disused. We recommend you use the new field <code>inputType</code> introduced in v8.5. |
|
|
741
740
|
| rect | Field description: specify the coordinate area of this video image in px |
|
|
742
|
-
| renderMode | Field description: specify the display mode of this stream.<br>Recommended value: default value: 0. 0 is cropping, 1 is zooming, 2 is zooming and displaying black background.<br><strong>Note</strong><br>image doesn't support setting
|
|
741
|
+
| renderMode | Field description: specify the display mode of this stream.<br>Recommended value: default value: 0. 0 is cropping, 1 is zooming, 2 is zooming and displaying black background.<br><strong>Note</strong><br>image doesn't support setting <code>renderMode</code> temporarily, the default display mode is forced stretch. |
|
|
743
742
|
| roomID | Field description: ID of the room where this audio/video stream is located (an empty value indicates the local room ID) |
|
|
744
743
|
| soundLevel | Field description: specify the target volumn level of On-Cloud MixTranscoding. (value range: 0-100)<br>Recommended value: default value: 100. |
|
|
745
744
|
| streamType | Field description: specify whether this video image is the primary stream image (TRTCVideoStreamTypeBig) or substream image (TRTCVideoStreamTypeSub). |
|
|
@@ -753,23 +752,23 @@ The startSpeedTest: API can be used to test the network speed before a user ente
|
|
|
753
752
|
These parameters are used to specify the layout position information of each video image and the encoding parameters of mixtranscoding during On-Cloud MixTranscoding.
|
|
754
753
|
| EnumType | DESC |
|
|
755
754
|
| --- | --- |
|
|
756
|
-
| appId | Field description:
|
|
755
|
+
| appId | Field description: <code>appId</code> of Tencent Cloud CSS<br>Recommended value: please click <code>Application Management</code> > <code>Application Information</code> in the <a href="https://console.cloud.tencent.com/trtc">TRTC console</a> and get the <code>appId</code> in <code>Relayed Live Streaming Info</code> .<br><strong>Note</strong><br>applications created on or after January 9, 2020 do not need to fill in this field. |
|
|
757
756
|
| audioBitrate | Field description: specify the target audio bitrate of On-Cloud MixTranscoding<br>Recommended value: default value: 64 Kbps. Value range: [32,192]. |
|
|
758
757
|
| audioChannels | Field description: specify the number of sound channels of On-Cloud MixTranscoding<br>Recommended value: default value: 1, which means mono channel. Valid values: 1: mono channel; 2: dual channel. |
|
|
759
758
|
| audioCodec | Field description: specify the audio encoding type of On-Cloud MixTranscoding<br>Recommended value: default value: 0, which means LC-AAC. Valid values: 0: LC-AAC; 1: HE-AAC; 2: HE-AACv2.<br><strong>Note</strong><br>- HE-AAC and HE-AACv2 only support [48000, 44100, 32000, 24000, 16000] sample rate.<br>- HE-AACv2 only support dual channel.<br>- HE-AAC and HE-AACv2 take effects iff the output streamId is specified. |
|
|
760
759
|
| audioSampleRate | Field description: specify the target audio sample rate of On-Cloud MixTranscoding<br>Recommended value: default value: 48000 Hz. Valid values: 12000 Hz, 16000 Hz, 22050 Hz, 24000 Hz, 32000 Hz, 44100 Hz, 48000 Hz. |
|
|
761
760
|
| backgroundColor | Field description: specify the background color of the mixed video image.<br>Recommended value: default value: 0x000000, which means black and is in the format of hex number; for example: "0x61B9F1" represents the RGB color (97,158,241). |
|
|
762
761
|
| backgroundImage | Field description: specify the background image of the mixed video image.<br>**Recommended value: default value: null, indicating not to set the background image.<br><strong>Note</strong><br>TRTC's backend service will mix the image specified by the URL address into the final stream.URL link length is limited to 512 bytes. The image size is limited to 10MB.Support png, jpg, jpeg, bmp format. |
|
|
763
|
-
| bizId | Field description:
|
|
764
|
-
| mixUsers | Field description: specify the position, size, layer, and stream type of each video image in On-Cloud MixTranscoding<br>Recommended value: this field is an array in
|
|
762
|
+
| bizId | Field description: <code>bizId</code> of Tencent Cloud CSS<br>Recommended value: please click <code>Application Management</code> > <code>Application Information</code> in the <a href="https://console.cloud.tencent.com/trtc">TRTC console</a> and get the <code>bizId</code> in <code>Relayed Live Streaming Info</code> .<br><strong>Note</strong><br>applications created on or after January 9, 2020 do not need to fill in this field. |
|
|
763
|
+
| mixUsers | Field description: specify the position, size, layer, and stream type of each video image in On-Cloud MixTranscoding<br>Recommended value: this field is an array in <code>TRTCMixUser</code> type, where each element represents the information of a video image. |
|
|
765
764
|
| mode | Field description: layout mode<br>Recommended value: please choose a value according to your business needs. The preset mode has better applicability. |
|
|
766
|
-
| streamId | Field description: ID of the live stream output to CDN<br>Recommended value: default value: null, that is, the audio/video streams in the room will be mixed into the audio/video stream of the caller of this API.<br>- If you don't set this parameter, the SDK will execute the default logic, that is, it will mix the multiple audio/video streams in the room into the audio/video stream of the caller of this API, i.e., A + B => A.<br>- If you set this parameter, the SDK will mix the audio/video streams in the room into the live stream you specify, i.e., A + B => C (C is the
|
|
767
|
-
| videoBitrate | Field description: specify the target video bitrate (Kbps) of On-Cloud MixTranscoding<br>Recommended value: if you enter 0, TRTC will estimate a reasonable bitrate value based on
|
|
765
|
+
| streamId | Field description: ID of the live stream output to CDN<br>Recommended value: default value: null, that is, the audio/video streams in the room will be mixed into the audio/video stream of the caller of this API.<br>- If you don't set this parameter, the SDK will execute the default logic, that is, it will mix the multiple audio/video streams in the room into the audio/video stream of the caller of this API, i.e., A + B => A.<br>- If you set this parameter, the SDK will mix the audio/video streams in the room into the live stream you specify, i.e., A + B => C (C is the <code>streamId</code> you specify). |
|
|
766
|
+
| videoBitrate | Field description: specify the target video bitrate (Kbps) of On-Cloud MixTranscoding<br>Recommended value: if you enter 0, TRTC will estimate a reasonable bitrate value based on <code>videoWidth</code> and <code>videoHeight</code> . You can also refer to the recommended bitrate value in the video resolution enumeration definition (in the comment section). |
|
|
768
767
|
| videoFramerate | Field description: specify the target video frame rate (fps) of On-Cloud MixTranscoding<br>Recommended value: default value: 15 fps. Value range: (0,30]. |
|
|
769
768
|
| videoGOP | Field description: specify the target video keyframe interval (GOP) of On-Cloud MixTranscoding<br>Recommended value: default value: 2 (in seconds). Value range: [1,8]. |
|
|
770
|
-
| videoHeight | Field description: specify the target resolution (height) of On-Cloud MixTranscoding<br>Recommended value: 640 px. If you only mix audio streams, please set both
|
|
769
|
+
| videoHeight | Field description: specify the target resolution (height) of On-Cloud MixTranscoding<br>Recommended value: 640 px. If you only mix audio streams, please set both <code>width</code> and <code>height</code> to 0; otherwise, there will be a black background in the live stream after mixtranscoding. |
|
|
771
770
|
| videoSeiParams | Field description: SEI parameters. default value: null<br><strong>Note</strong><br>the parameter is passed in the form of a JSON string. Here is an example to use it:<br>The currently supported fields and their meanings are as follows:<br>- payloadContent: Required. The payload content of the passthrough SEI, which cannot be empty.<br>- payloadType: Required. The type of the SEI message, with a value range of 5 or an integer within the range of [100, 254] (excluding 244, which is an internally defined timestamp SEI).<br>- payloadUuid: Required when payloadType is 5, and ignored in other cases. The value must be a 32-digit hexadecimal number.<br>- interval: Optional, default is 1000. The sending interval of the SEI, in milliseconds.<br>- followIdr: Optional, default is false. When this value is true, the SEI will be ensured to be carried when sending a key frame, otherwise it is not guaranteed. |
|
|
772
|
-
| videoWidth | Field description: specify the target resolution (width) of On-Cloud MixTranscoding<br>Recommended value: 360 px. If you only mix audio streams, please set both
|
|
771
|
+
| videoWidth | Field description: specify the target resolution (width) of On-Cloud MixTranscoding<br>Recommended value: 360 px. If you only mix audio streams, please set both <code>width</code> and <code>height</code> to 0; otherwise, there will be a black background in the live stream after mixtranscoding. |
|
|
773
772
|
|
|
774
773
|
## TRTCPublishCDNParam
|
|
775
774
|
|
|
@@ -780,8 +779,8 @@ TRTC's backend service supports publishing audio/video streams to third-party li
|
|
|
780
779
|
If you use the Tencent Cloud CSS CDN service, you don't need to care about this parameter; instead, just use the startPublish API.
|
|
781
780
|
| EnumType | DESC |
|
|
782
781
|
| --- | --- |
|
|
783
|
-
| appId | Field description:
|
|
784
|
-
| bizId | Field description:
|
|
782
|
+
| appId | Field description: <code>appId</code> of Tencent Cloud CSS<br>Recommended value: please click <code>Application Management</code> > <code>Application Information</code> in the <a href="https://console.cloud.tencent.com/trtc">TRTC console</a> and get the <code>appId</code> in <code>Relayed Live Streaming Info</code> . |
|
|
783
|
+
| bizId | Field description: <code>bizId</code> of Tencent Cloud CSS<br>Recommended value: please click <code>Application Management</code> > <code>Application Information</code> in the <a href="https://console.cloud.tencent.com/trtc">TRTC console</a> and get the <code>bizId</code> in <code>Relayed Live Streaming Info</code> . |
|
|
785
784
|
| streamId | Field description: specify the push address (in RTMP format) of this audio/video stream at the third-party live streaming service provider<br>Recommended value: default value: null,that is, the audio/video streams in the room will be pushed to the target service provider of the caller of this API. |
|
|
786
785
|
| url | Field description: specify the push address (in RTMP format) of this audio/video stream at the third-party live streaming service provider<br>Recommended value: the push URL rules vary greatly by service provider. Please enter a valid push URL according to the requirements of the target service provider. TRTC's backend server will push audio/video streams in the standard format to the third-party service provider according to the URL you enter.<br><strong>Note</strong><br>the push URL must be in RTMP format and meet the specifications of your target live streaming service provider; otherwise, the target service provider will reject the push requests from TRTC's backend service. |
|
|
787
786
|
|
|
@@ -792,8 +791,8 @@ If you use the Tencent Cloud CSS CDN service, you don't need to care about this
|
|
|
792
791
|
This parameter is used to specify the recording parameters in the audio recording API startAudioRecording.
|
|
793
792
|
| EnumType | DESC |
|
|
794
793
|
| --- | --- |
|
|
795
|
-
| filePath | Field description: storage path of the audio recording file, which is required.<br><strong>Note</strong><br>this path must be accurate to the file name and extension. The extension determines the format of the audio recording file. Currently, supported formats include PCM, WAV, and AAC.<br>For example, if you specify the path as
|
|
796
|
-
| maxDurationPerFile | Field description:
|
|
794
|
+
| filePath | Field description: storage path of the audio recording file, which is required.<br><strong>Note</strong><br>this path must be accurate to the file name and extension. The extension determines the format of the audio recording file. Currently, supported formats include PCM, WAV, and AAC.<br>For example, if you specify the path as <code>mypath/record/audio.aac</code> , it means that you want the SDK to generate an audio recording file in AAC format.Please specify a valid path with read/write permissions; otherwise, the audio recording file cannot be generated. |
|
|
795
|
+
| maxDurationPerFile | Field description: <code>maxDurationPerFile</code> is the max duration of each recorded file segments, in milliseconds, with a minimum value of 10000. The default value is 0, indicating no segmentation. |
|
|
797
796
|
| recordingContent | Field description: Audio recording content type.<br>Note: Record all local and remote audio by default. |
|
|
798
797
|
|
|
799
798
|
## TRTCLocalRecordingParams
|
|
@@ -805,10 +804,10 @@ This parameter is used to specify the recording parameters in the local media fi
|
|
|
805
804
|
The startLocalRecording API is an enhanced version of the startAudioRecording API. The former can record video files, while the latter can only record audio files.
|
|
806
805
|
| EnumType | DESC |
|
|
807
806
|
| --- | --- |
|
|
808
|
-
| filePath | Field description: address of the recording file, which is required. Please ensure that the path is valid with read/write permissions; otherwise, the recording file cannot be generated.<br><strong>Note</strong><br>this path must be accurate to the file name and extension. The extension determines the format of the recording file. Currently, only the MP4 format is supported.<br>For example, if you specify the path as
|
|
809
|
-
| interval | Field description:
|
|
810
|
-
| maxDurationPerFile | Field description:
|
|
811
|
-
| recordType | Field description: media recording type, which is
|
|
807
|
+
| filePath | Field description: address of the recording file, which is required. Please ensure that the path is valid with read/write permissions; otherwise, the recording file cannot be generated.<br><strong>Note</strong><br>this path must be accurate to the file name and extension. The extension determines the format of the recording file. Currently, only the MP4 format is supported.<br>For example, if you specify the path as <code>mypath/record/test.mp4</code> , it means that you want the SDK to generate a local video file in MP4 format.<br>Please specify a valid path with read/write permissions; otherwise, the recording file cannot be generated. |
|
|
808
|
+
| interval | Field description: <code>interval</code> is the update frequency of the recording information in milliseconds. Value range: [1000, 10000]. Default value: -1, indicating not to call back |
|
|
809
|
+
| maxDurationPerFile | Field description: <code>maxDurationPerFile</code> is the max duration of each recorded file segments, in milliseconds, with a minimum value of 10000. The default value is 0, indicating no segmentation. |
|
|
810
|
+
| recordType | Field description: media recording type, which is <code>TRTCRecordTypeBoth</code> by default, indicating to record both audio and video. |
|
|
812
811
|
|
|
813
812
|
## TRTCAudioEffectParam(Deprecated)
|
|
814
813
|
|
|
@@ -820,7 +819,7 @@ This parameter is used to specify the path and number of playback times of a sou
|
|
|
820
819
|
|
|
821
820
|
After v7.3, the sound effect API has been replaced by a new TXAudioEffectManager#startPlayMusic API.
|
|
822
821
|
|
|
823
|
-
When you specify the TXAudioMusicParam parameter of
|
|
822
|
+
When you specify the TXAudioMusicParam parameter of `startPlayMusic` , if `isShortFile` is set to `YES` , the file is a "sound effect" file.
|
|
824
823
|
| EnumType | DESC |
|
|
825
824
|
| --- | --- |
|
|
826
825
|
| effectId | Field description: sound effect ID<br>Note: the SDK supports playing multiple sound effects. IDs are used to distinguish different sound effects and control their start, end, volume, etc. |
|
|
@@ -836,10 +835,10 @@ When you specify the TXAudioMusicParam parameter of ` startPlayMusic `, if ` isS
|
|
|
836
835
|
This parameter is used for the room switch API switchRoom, which can quickly switch a user from one room to another.
|
|
837
836
|
| EnumType | DESC |
|
|
838
837
|
| --- | --- |
|
|
839
|
-
| privateMapKey | Field description: permission credential used for permission control, which is optional. If you want only users with the specified
|
|
840
|
-
| roomId | Field description: numeric room ID, which is optional. Users in the same room can see one another and make audio/video calls.<br>Recommended value: value range: 1–4294967294.<br><strong>Note</strong><br>either
|
|
841
|
-
| strRoomId | Field description: string-type room ID, which is optional. Users in the same room can see one another and make audio/video calls.<br><strong>Note</strong><br>either
|
|
842
|
-
| userSig | Field description: user signature, which is optional. It is the authentication signature corresponding to the current
|
|
838
|
+
| privateMapKey | Field description: permission credential used for permission control, which is optional. If you want only users with the specified <code>userId</code> values to enter a room, you need to use <code>privateMapKey</code> to restrict the permission.<br>Recommended value: we recommend you use this parameter only if you have high security requirements. For more information, please see <a href="https://www.tencentcloud.com/document/product/647/35157">Enabling Advanced Permission Control</a>. |
|
|
839
|
+
| roomId | Field description: numeric room ID, which is optional. Users in the same room can see one another and make audio/video calls.<br>Recommended value: value range: 1–4294967294.<br><strong>Note</strong><br>either <code>roomId</code> or <code>strRoomId</code> must be entered. If both are entered, <code>roomId</code> will be used. |
|
|
840
|
+
| strRoomId | Field description: string-type room ID, which is optional. Users in the same room can see one another and make audio/video calls.<br><strong>Note</strong><br>either <code>roomId</code> or <code>strRoomId</code> must be entered. If both are entered, <code>roomId</code> will be used. |
|
|
841
|
+
| userSig | Field description: user signature, which is optional. It is the authentication signature corresponding to the current <code>userId</code> and acts as the login password.<br>If you don't specify the newly calculated <code>userSig</code> during room switch, the SDK will continue to use the <code>userSig</code> you specified during room entry (enterRoom).<br>This requires you to ensure that the old <code>userSig</code> is still within the validity period allowed by the signature at the moment of room switch; otherwise, room switch will fail.<br>Recommended value: for the calculation method, please see <a href="https://www.tencentcloud.com/document/product/647/35166">UserSig</a>. |
|
|
843
842
|
|
|
844
843
|
## TRTCAudioFrameDelegateFormat
|
|
845
844
|
|
|
@@ -851,7 +850,7 @@ This parameter is used to set the relevant format (including sample rate and num
|
|
|
851
850
|
| channels | Field description: number of sound channels<br>Recommended value: default value: 1, which means mono channel. Valid values: 1: mono channel; 2: dual channel. |
|
|
852
851
|
| mode | Field description: audio callback data operation mode<br>Recommended value: TRTCAudioFrameOperationModeReadOnly, get audio data from callback only. The modes that can be set are TRTCAudioFrameOperationModeReadOnly, TRTCAudioFrameOperationModeReadWrite. |
|
|
853
852
|
| sampleRate | Field description: sample rate<br>Recommended value: default value: 48000 Hz. Valid values: 16000, 32000, 44100, 48000. |
|
|
854
|
-
| samplesPerCall | Field description: number of sample points<br>Recommended value: the value must be an integer multiple of
|
|
853
|
+
| samplesPerCall | Field description: number of sample points<br>Recommended value: the value must be an integer multiple of <code>sampleRate/100</code> . |
|
|
855
854
|
|
|
856
855
|
## TRTCUser
|
|
857
856
|
|
|
@@ -860,9 +859,9 @@ This parameter is used to set the relevant format (including sample rate and num
|
|
|
860
859
|
You can use this parameter together with the publishing destination parameter TRTCPublishTarget and On-Cloud MixTranscoding parameter TRTCStreamMixingConfig to transcode the streams you specify and publish the mixed stream to the destination you specify.
|
|
861
860
|
| EnumType | DESC |
|
|
862
861
|
| --- | --- |
|
|
863
|
-
| intRoomId | <strong>Description:</strong> Numeric room ID. The room ID must be of the same type as that in TRTCParams.<br><strong>Value:</strong> Value range: 1-4294967294<br><strong>Note:</strong> You cannot use both
|
|
864
|
-
| strRoomId | <strong>Description:</strong> String-type room ID. The room ID must be of the same type as that in TRTCParams.<br><strong>Note:</strong> You cannot use both
|
|
865
|
-
| userId | /<strong>Description</strong>: UTF-8-encoded user ID (required)<br><strong>Value:</strong> For example, if the ID of a user in your account system is "mike", set it to
|
|
862
|
+
| intRoomId | <strong>Description:</strong> Numeric room ID. The room ID must be of the same type as that in TRTCParams.<br><strong>Value:</strong> Value range: 1-4294967294<br><strong>Note:</strong> You cannot use both <code>intRoomId</code> and <code>strRoomId</code> . If you specify <code>strRoomId</code> , you need to set <code>intRoomId</code> to <code>0</code> . If you set both, only <code>intRoomId</code> will be used. |
|
|
863
|
+
| strRoomId | <strong>Description:</strong> String-type room ID. The room ID must be of the same type as that in TRTCParams.<br><strong>Note:</strong> You cannot use both <code>intRoomId</code> and <code>strRoomId</code> . If you specify <code>roomId</code> , you need to leave <code>strRoomId</code> empty. If you set both, only <code>intRoomId</code> will be used.<br><strong>Value:</strong> 64 bytes or shorter; supports the following character set (89 characters):<br>- Uppercase and lowercase letters (a-z and A-Z)<br>- Numbers (0-9)<br>- Space, "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "\\|", "~", "," |
|
|
864
|
+
| userId | /<strong>Description</strong>: UTF-8-encoded user ID (required)<br><strong>Value:</strong> For example, if the ID of a user in your account system is "mike", set it to <code>mike</code> . |
|
|
866
865
|
|
|
867
866
|
## TRTCPublishCdnUrl
|
|
868
867
|
|
|
@@ -871,7 +870,7 @@ You can use this parameter together with the publishing destination parameter TR
|
|
|
871
870
|
This enum type is used by the publishing destination parameter TRTCPublishTarget of the publishing API startPublishMediaStream.
|
|
872
871
|
| EnumType | DESC |
|
|
873
872
|
| --- | --- |
|
|
874
|
-
| isInternalLine | <strong>Description:</strong> Whether to publish to Tencent Cloud<br><strong>Value:</strong> The default value is
|
|
873
|
+
| isInternalLine | <strong>Description:</strong> Whether to publish to Tencent Cloud<br><strong>Value:</strong> The default value is <code>true</code> .<br><strong>Note:</strong> If the destination URL you set is provided by Tencent Cloud, set this parameter to <code>true</code> , and you will not be charged relaying fees. |
|
|
875
874
|
| rtmpUrl | <strong>Description:</strong> The destination URL (RTMP) when you publish to Tencent Cloud or a third-party CDN.<br><strong>Value:</strong> The URLs of different CDN providers may vary greatly in format. Please enter a valid URL as required by your service provider. TRTC's backend server will push audio/video streams in the standard format to the URL you provide.<br><strong>Note:</strong> The URL must be in RTMP format. It must also meet the requirements of your service provider, or your service provider may reject push requests from the TRTC backend. |
|
|
876
875
|
|
|
877
876
|
## TRTCPublishTarget
|
|
@@ -881,9 +880,9 @@ This enum type is used by the publishing destination parameter TRTCPublishTarget
|
|
|
881
880
|
This enum type is used by the publishing API startPublishMediaStream.
|
|
882
881
|
| EnumType | DESC |
|
|
883
882
|
| --- | --- |
|
|
884
|
-
| cdnUrlList | <code>
|
|
885
|
-
| mixStreamIdentity | <code>
|
|
886
|
-
| mode | <code>
|
|
883
|
+
| cdnUrlList | <code>Description:</code> The destination URLs (RTMP) when you publish to Tencent Cloud or third-party CDNs.<br><code>Note:</code> You don’t need to set this parameter if you set the publishing mode to TRTCPublishMixStreamToRoom. |
|
|
884
|
+
| mixStreamIdentity | <code>Description:</code> The information of the robot that publishes the transcoded stream to a TRTC room.<br><code>Note:</code> You need to set this parameter only if you set the publishing mode to TRTCPublishMixStreamToRoom`.<br><code>Note:</code> After you set this parameter, the stream will be pushed to the room you specify. We recommend you set it to a special user ID to distinguish the robot from the anchor who enters the room via the TRTC SDK.<br><code>Note:</code> Users whose streams are transcoded cannot subscribe to the transcoded stream.<br><code>Note:</code> If you set the subscription mode (setDefaultStreamRecvMode) to manual before room entry, you need to manage the streams to receive by yourself (normally, if you receive the transcoded stream, you need to unsubscribe from the streams that are transcoded).<br><code>Note:</code> If you set the subscription mode (setDefaultStreamRecvMode) to auto before room entry, users whose streams are not transcoded will receive the transcoded stream automatically and will unsubscribe from the users whose streams are transcoded. You call muteRemoteVideoStream and muteRemoteAudio to unsubscribe from the transcoded stream. |
|
|
885
|
+
| mode | <code>Description:</code> The publishing mode.<br><code>Value:</code> You can relay streams to a CDN, transcode streams, or publish streams to an RTC room. Select the mode that fits your needs.<br><strong>Note</strong><br>If you need to use more than one publishing mode, you can call startPublishMediaStream multiple times and set <code>TRTCPublishTarget</code> to a different value each time.You can use one mode each time you call the startPublishMediaStream) API. To modify the configuration, call updatePublishCDNStream. |
|
|
887
886
|
|
|
888
887
|
## TRTCVideoLayout
|
|
889
888
|
|
|
@@ -894,13 +893,13 @@ This enum type is used by the On-Cloud MixTranscoding parameter TRTCStreamMixing
|
|
|
894
893
|
You can use this parameter to specify the position, size, layer, and stream type of each video in the transcoded stream.
|
|
895
894
|
| EnumType | DESC |
|
|
896
895
|
| --- | --- |
|
|
897
|
-
| backgroundColor | <code>
|
|
898
|
-
| fillMode | <code>
|
|
899
|
-
| fixedVideoStreamType | <code>
|
|
900
|
-
| fixedVideoUser | <code>
|
|
901
|
-
| placeHolderImage | <code>
|
|
902
|
-
| rect | <code>
|
|
903
|
-
| zOrder | <code>
|
|
896
|
+
| backgroundColor | <code>Description:</code> The background color of the mixed stream.<br><code>Value:</code> The value must be a hex number. For example, "0x61B9F1" represents the RGB color value (97,158,241). Default value: 0x000000 (black). |
|
|
897
|
+
| fillMode | <code>Description:</code> The rendering mode.<br><code>Value:</code> The rendering mode may be fill (the image may be stretched or cropped) or fit (there may be black bars). Default value: TRTCVideoFillMode_Fill. |
|
|
898
|
+
| fixedVideoStreamType | <code>Description:</code> Whether the video is the primary stream (TRTCVideoStreamTypeBig) or substream (TRTCVideoStreamTypeSub). |
|
|
899
|
+
| fixedVideoUser | <code>Description:</code> The users whose streams are transcoded.<br><strong>Note</strong><br>If you do not specify TRTCUser ( <code>userId</code> , <code>intRoomId</code> , <code>strRoomId</code> ), the TRTC backend will automatically mix the streams of anchors who are sending audio/video in the room according to the video layout you specify. |
|
|
900
|
+
| placeHolderImage | <code>Description:</code> The URL of the placeholder image. If a user sends only audio, the image specified by the URL will be mixed during On-Cloud MixTranscoding.<br><code>Value:</code> This parameter is left empty by default, which means no placeholder image will be used.<br><strong>Note</strong><br>- You need to specify the <code>userId</code> parameter in <code>fixedVideoUser</code> .<br>- The URL can be 512 bytes long at most, and the image must not exceed 2 MB.<br>- The image can be in PNG, JPG, JPEG, or BMP format. We recommend you use a semitransparent image in PNG format. |
|
|
901
|
+
| rect | <code>Description:</code> The coordinates (in pixels) of the video. |
|
|
902
|
+
| zOrder | <code>Description:</code> The layer of the video, which must be unique. Value range: 0-15. |
|
|
904
903
|
|
|
905
904
|
## TRTCWatermark
|
|
906
905
|
|
|
@@ -909,32 +908,32 @@ You can use this parameter to specify the position, size, layer, and stream type
|
|
|
909
908
|
This enum type is used by the On-Cloud MixTranscoding parameter TRTCStreamMixingConfig of the publishing API startPublishMediaStream.
|
|
910
909
|
| EnumType | DESC |
|
|
911
910
|
| --- | --- |
|
|
912
|
-
| rect | <code>
|
|
913
|
-
| watermarkUrl | <code>
|
|
914
|
-
| zOrder | <code>
|
|
911
|
+
| rect | <code>Description:</code> The coordinates (in pixels) of the watermark. |
|
|
912
|
+
| watermarkUrl | <code>Description:</code> The URL of the watermark image. The image specified by the URL will be mixed during On-Cloud MixTranscoding.<br><strong>Note</strong><br>- The URL can be 512 bytes long at most, and the image must not exceed 2 MB.<br>- The image can be in PNG, JPG, JPEG, or BMP format. We recommend you use a semitransparent image in PNG format. |
|
|
913
|
+
| zOrder | <code>Description:</code> The layer of the watermark, which must be unique. Value range: 0-15. |
|
|
915
914
|
|
|
916
915
|
## TRTCStreamEncoderParam
|
|
917
916
|
|
|
918
917
|
**The encoding parameters.**
|
|
919
918
|
|
|
920
|
-
`
|
|
919
|
+
`Description:` This enum type is used by the publishing API startPublishMediaStream.
|
|
921
920
|
|
|
922
|
-
`
|
|
921
|
+
`Note:` This parameter is required if you set the publishing mode to `TRTCPublish_MixStream_ToCdn` or `TRTCPublish_MixStream_ToRoom` in TRTCPublishTarget.
|
|
923
922
|
|
|
924
|
-
`
|
|
923
|
+
`Note:` If you use the relay to CDN feature (the publishing mode set to `RTCPublish_BigStream_ToCdn` or `TRTCPublish_SubStream_ToCdn` ), to improve the relaying stability and playback compatibility, we also recommend you set this parameter.
|
|
925
924
|
| EnumType | DESC |
|
|
926
925
|
| --- | --- |
|
|
927
|
-
| audioEncodedChannelNum | <code>
|
|
928
|
-
| audioEncodedCodecType | <code>
|
|
929
|
-
| audioEncodedKbps | <code>
|
|
930
|
-
| audioEncodedSampleRate | <code>
|
|
931
|
-
| videoEncodedCodecType | <code>
|
|
932
|
-
| videoEncodedFPS | <code>
|
|
933
|
-
| videoEncodedGOP | <code>
|
|
934
|
-
| videoEncodedHeight | <code>
|
|
935
|
-
| videoEncodedKbps | <code>
|
|
936
|
-
| videoEncodedWidth | <code>
|
|
937
|
-
| videoSeiParams | <code>
|
|
926
|
+
| audioEncodedChannelNum | <code>Description:</code> The sound channels of the stream to publish.<br><code>Value:</code> Valid values: 1 (mono channel); 2 (dual-channel). Default: 1. |
|
|
927
|
+
| audioEncodedCodecType | <code>Description:</code> The audio codec of the stream to publish.<br><code>Value:</code> Valid values: 0 (LC-AAC); 1 (HE-AAC); 2 (HE-AACv2). Default: 0.<br><strong>Note</strong><br>- The audio sample rates supported by HE-AAC and HE-AACv2 are 48000, 44100, 32000, 24000, and 16000.<br>- When HE-AACv2 is used, the output stream can only be dual-channel. |
|
|
928
|
+
| audioEncodedKbps | <code>Description:</code> The audio bitrate (Kbps) of the stream to publish.<br><code>Value:</code> Value range: [32,192]. Default: 50. |
|
|
929
|
+
| audioEncodedSampleRate | <code>Description:</code> The audio sample rate of the stream to publish.<br><code>Value:</code> Valid values: [48000, 44100, 32000, 24000, 16000, 8000]. Default: 48000 (Hz). |
|
|
930
|
+
| videoEncodedCodecType | <code>Description:</code> The video codec of the stream to publish.<br><code>Value:</code> Valid values: 0 (H264); 1 (H265). Default: 0. |
|
|
931
|
+
| videoEncodedFPS | <code>Description:</code> The frame rate (fps) of the stream to publish.<br><code>Value:</code> Value range: (0,30]. Default: 20. |
|
|
932
|
+
| videoEncodedGOP | <code>Description:</code> The keyframe interval (GOP) of the stream to publish.<br><code>Value:</code> Value range: [1,5]. Default: 3 (seconds). |
|
|
933
|
+
| videoEncodedHeight | <code>Description:</code> The resolution (height) of the stream to publish.<br><code>Value:</code> Recommended value: 640. If you mix only audio streams, to avoid displaying a black video in the transcoded stream, set both <code>width</code> and <code>height</code> to <code>0</code> . |
|
|
934
|
+
| videoEncodedKbps | <code>Description:</code> The video bitrate (Kbps) of the stream to publish.<br><code>Value:</code> If you set this parameter to <code>0</code> , TRTC will work out a bitrate based on <code>videoWidth</code> and <code>videoHeight</code> . For details, refer to the recommended bitrates for the constants of the resolution enum type (see comment). |
|
|
935
|
+
| videoEncodedWidth | <code>Description:</code> The resolution (width) of the stream to publish.<br><code>Value:</code> Recommended value: 368. If you mix only audio streams, to avoid displaying a black video in the transcoded stream, set both <code>width</code> and <code>height</code> to <code>0</code> . |
|
|
936
|
+
| videoSeiParams | <code>Description:</code> SEI parameters. Default: null<br><code>Note:</code> the parameter is passed in the form of a JSON string. Here is an example to use it:<br>`{`<br>` "payLoadContent":"xxx",`<br>` "payloadType":5,`<br>` "payloadUuid":"1234567890abcdef1234567890abcdef",`<br>` "interval":1000,`<br>` "followIdr":false`<br>`}`<br>The currently supported fields and their meanings are as follows:<br>- payloadContent: Required. The payload content of the passthrough SEI, which cannot be empty.<br>- payloadType: Required. The type of the SEI message, with a value range of 5 or an integer within the range of [100, 254] (excluding 244, which is an internally defined timestamp SEI).<br>- payloadUuid: Required when payloadType is 5, and ignored in other cases. The value must be a 32-digit hexadecimal number.<br>- interval: Optional, default is 1000. The sending interval of the SEI, in milliseconds.<br>- followIdr: Optional, default is false. When this value is true, the SEI will be ensured to be carried when sending a key frame, otherwise it is not guaranteed. |
|
|
938
937
|
|
|
939
938
|
## TRTCStreamMixingConfig
|
|
940
939
|
|
|
@@ -945,11 +944,11 @@ This enum type is used by the publishing API startPublishMediaStream.
|
|
|
945
944
|
You can use this parameter to specify the video layout and input audio information for On-Cloud MixTranscoding.
|
|
946
945
|
| EnumType | DESC |
|
|
947
946
|
| --- | --- |
|
|
948
|
-
| audioMixUserList | <code>
|
|
949
|
-
| backgroundColor | <code>
|
|
950
|
-
| backgroundImage | <code>
|
|
951
|
-
| videoLayoutList | <code>
|
|
952
|
-
| watermarkList | <code>
|
|
947
|
+
| audioMixUserList | <code>Description:</code> The information of each audio stream to mix.<br><code>Value:</code> This parameter is an array. Each <code>TRTCUser</code> element in the array indicates the information of an audio stream.<br><strong>Note</strong><br>If you do not specify this array, the TRTC backend will automatically mix all streams of the anchors who are sending audio in the room according to the audio encode param TRTCStreamEncoderParam you specify (currently only supports up to 16 audio and video inputs). |
|
|
948
|
+
| backgroundColor | <code>Description:</code> The background color of the mixed stream.<br><code>Value:</code> The value must be a hex number. For example, "0x61B9F1" represents the RGB color value (97,158,241). Default value: 0x000000 (black). |
|
|
949
|
+
| backgroundImage | <code>Description:</code> The URL of the background image of the mixed stream. The image specified by the URL will be mixed during On-Cloud MixTranscoding.<br><code>Value:</code> This parameter is left empty by default, which means no background image will be used.<br><strong>Note</strong><br>- The URL can be 512 bytes long at most, and the image must not exceed 2 MB.<br>- The image can be in PNG, JPG, JPEG, or BMP format. We recommend you use a semitransparent image in PNG format. |
|
|
950
|
+
| videoLayoutList | <code>Description:</code> The position, size, layer, and stream type of each video in On-Cloud MixTranscoding.<br><code>Value:</code> This parameter is an array. Each <code>TRTCVideoLayout</code> element in the array indicates the information of a video in On-Cloud MixTranscoding. |
|
|
951
|
+
| watermarkList | <code>Description:</code> The position, size, and layer of each watermark image in On-Cloud MixTranscoding.<br><code>Value:</code> This parameter is an array. Each <code>TRTCWatermark</code> element in the array indicates the information of a watermark. |
|
|
953
952
|
|
|
954
953
|
## TRTCPayloadPrivateEncryptionConfig
|
|
955
954
|
|
|
@@ -958,9 +957,9 @@ You can use this parameter to specify the video layout and input audio informati
|
|
|
958
957
|
This configuration is used to set the algorithm and key for media stream private encryption.
|
|
959
958
|
| EnumType | DESC |
|
|
960
959
|
| --- | --- |
|
|
961
|
-
| encryptionAlgorithm | <code>
|
|
962
|
-
| encryptionKey | <code>
|
|
963
|
-
| encryptionSalt | <code>
|
|
960
|
+
| encryptionAlgorithm | <code>Description:</code> Encryption algorithm, the default is TRTCEncryptionAlgorithmAes128Gcm. |
|
|
961
|
+
| encryptionKey | <code>Description:</code> encryption key, string type.<br><code>Value:</code> If the encryption algorithm is TRTCEncryptionAlgorithmAes128Gcm, the key length must be 16 bytes;<br>if the encryption algorithm is TRTCEncryptionAlgorithmAes256Gcm, the key length must be 32 bytes. |
|
|
962
|
+
| encryptionSalt | <code>Description:</code> Salt, initialization vector for encryption.<br><code>Value:</code> It is necessary to ensure that the array filled in this parameter is not empty, not all 0 and the data length is 32 bytes. |
|
|
964
963
|
|
|
965
964
|
## TRTCAudioVolumeEvaluateParams
|
|
966
965
|
|
|
@@ -969,7 +968,7 @@ This configuration is used to set the algorithm and key for media stream private
|
|
|
969
968
|
This setting is used to enable vocal detection and sound spectrum calculation.
|
|
970
969
|
| EnumType | DESC |
|
|
971
970
|
| --- | --- |
|
|
972
|
-
| enablePitchCalculation | <code>
|
|
973
|
-
| enableSpectrumCalculation | <code>
|
|
974
|
-
| enableVadDetection | <code>
|
|
975
|
-
| interval | <code>
|
|
971
|
+
| enablePitchCalculation | <code>Description:</code> Whether to enable local vocal frequency calculation. |
|
|
972
|
+
| enableSpectrumCalculation | <code>Description:</code> Whether to enable sound spectrum calculation. |
|
|
973
|
+
| enableVadDetection | <code>Description:</code> Whether to enable local voice detection.<br><strong>Note</strong><br>Call before startLocalAudio. |
|
|
974
|
+
| interval | <code>Description:</code> Set the trigger interval of the onUserVoiceVolume callback, the unit is milliseconds, the minimum interval is 100ms, if it is less than or equal to 0, the callback will be closed.<br><code>Value:</code> Recommended value: 300, in milliseconds.<br><strong>Note</strong><br>When the interval is greater than 0, the volume prompt will be enabled by default, no additional setting is required. |
|