@tencent-rtc/mcp 1.6.4 → 1.6.6
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/knowledge/chunker.js +83 -54
- package/knowledge/path-meta.js +179 -26
- package/knowledge/search/exact-lookup.js +168 -10
- 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 +247 -61
- 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/chat/urls/sdk/android.md +3 -3
- package/resource/knowledge/chat/urls/sdk/flutter.md +3 -3
- package/resource/knowledge/chat/urls/sdk/ios.md +3 -3
- package/resource/knowledge/chat/urls/sdk/web.md +3 -3
- 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.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/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
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
|
|
73
73
|
**Video resolution.**
|
|
74
74
|
|
|
75
|
-
Here, only the landscape resolution (e.g., 640x360) is defined. If the portrait resolution (e.g., 360x640) needs to be used,
|
|
75
|
+
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.
|
|
76
76
|
|
|
77
77
|
|Enum|Value|DESC|
|
|
78
78
|
|---------|---------|---------|
|
|
@@ -101,12 +101,12 @@ Here, only the landscape resolution (e.g., 640x360) is defined. If the portrait
|
|
|
101
101
|
|
|
102
102
|
**Video aspect ratio mode.**
|
|
103
103
|
|
|
104
|
-
Only the landscape resolution (e.g., 640x360) is defined in
|
|
104
|
+
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` .
|
|
105
105
|
|
|
106
106
|
|Enum|Value|DESC|
|
|
107
107
|
|---------|---------|---------|
|
|
108
|
-
|TRTCVideoResolutionModeLandscape|0|Landscape resolution, such as
|
|
109
|
-
|TRTCVideoResolutionModePortrait|1|Portrait resolution, such as
|
|
108
|
+
|TRTCVideoResolutionModeLandscape|0|Landscape resolution, such as `TRTCVideoResolution_640_360 + TRTCVideoResolutionModeLandscape = 640x360` .|
|
|
109
|
+
|TRTCVideoResolutionModePortrait|1|Portrait resolution, such as `TRTCVideoResolution_640_360 + TRTCVideoResolutionModePortrait = 360x640` .|
|
|
110
110
|
|
|
111
111
|
## TRTCVideoStreamType
|
|
112
112
|
|
|
@@ -121,7 +121,6 @@ TRTC provides three different video streams, including:
|
|
|
121
121
|
|
|
122
122
|
> **Note**
|
|
123
123
|
>
|
|
124
|
-
|
|
125
124
|
> 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.
|
|
126
125
|
>
|
|
127
126
|
|
|
@@ -197,7 +196,7 @@ For custom capturing and rendering features, you need to use the following enume
|
|
|
197
196
|
|Enum|Value|DESC|
|
|
198
197
|
|---------|---------|---------|
|
|
199
198
|
|TRTCVideoBufferType_Unknown|0|Undefined transfer method|
|
|
200
|
-
|TRTCVideoBufferType_Buffer|1|Use memory buffer to transfer video data. iOS:
|
|
199
|
+
|TRTCVideoBufferType_Buffer|1|Use memory buffer to transfer video data. iOS: `PixelBuffer` ; Android: `Direct Buffer` for JNI layer; Windows: memory data block.|
|
|
201
200
|
|TRTCVideoBufferType_Texture|3|Use OpenGL texture to transfer video data|
|
|
202
201
|
|TRTCVideoBufferType_TextureD3D11|4|Use D3D11 texture to transfer video data|
|
|
203
202
|
|
|
@@ -233,24 +232,24 @@ The SDK can take screenshots from the following two data sources and save them a
|
|
|
233
232
|
**Use cases.**
|
|
234
233
|
|
|
235
234
|
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:
|
|
236
|
-
- Live streaming scenario (LIVE): including
|
|
235
|
+
- Live streaming scenario (LIVE): including `LIVE` (audio + video) and `VoiceChatRoom` (pure audio).
|
|
237
236
|
|
|
238
237
|
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.
|
|
239
|
-
- Real-Time scenario (RTC): including
|
|
238
|
+
- Real-Time scenario (RTC): including `VideoCall` (audio + video) and `AudioCall` (pure audio).
|
|
240
239
|
|
|
241
240
|
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.
|
|
242
241
|
| Enum | Value | DESC |
|
|
243
242
|
| --- | --- | --- |
|
|
244
243
|
| 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. |
|
|
245
|
-
| 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
|
|
246
|
-
| TRTCAppSceneAudioCall | 2 | Audio call scenario, where the
|
|
247
|
-
| 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
|
|
244
|
+
| 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. |
|
|
245
|
+
| 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. |
|
|
246
|
+
| 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. |
|
|
248
247
|
|
|
249
248
|
## TRTCRoleType
|
|
250
249
|
|
|
251
250
|
**Role.**
|
|
252
251
|
|
|
253
|
-
Role is applicable only to live streaming scenarios (`
|
|
252
|
+
Role is applicable only to live streaming scenarios ( `TRTCAppSceneLIVE` and `TRTCAppSceneVoiceChatRoom` ). Users are divided into two roles:
|
|
254
253
|
- 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.
|
|
255
254
|
|
|
256
255
|
- 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.
|
|
@@ -284,7 +283,7 @@ TRTC has two control modes in weak network environments: "ensuring clarity" and
|
|
|
284
283
|
|
|
285
284
|
**Network quality.**
|
|
286
285
|
|
|
287
|
-
TRTC evaluates the current network quality once every two seconds. The evaluation results are divided into six levels:
|
|
286
|
+
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.
|
|
288
287
|
|
|
289
288
|
|Enum|Value|DESC|
|
|
290
289
|
|---------|---------|---------|
|
|
@@ -317,11 +316,11 @@ This enumerated type is used in the audio status changed API onRemoteAudioStatus
|
|
|
317
316
|
|Enum|Value|DESC|
|
|
318
317
|
|---------|---------|---------|
|
|
319
318
|
|TRTCAVStatusChangeReasonInternal|0|Default value|
|
|
320
|
-
|TRTCAVStatusChangeReasonBufferingBegin|1|The stream enters the
|
|
321
|
-
|TRTCAVStatusChangeReasonBufferingEnd|2|The stream enters the
|
|
322
|
-
|TRTCAVStatusChangeReasonLocalStarted|3|As a start-related API was directly called locally, the stream enters the
|
|
323
|
-
|TRTCAVStatusChangeReasonLocalStopped|4|As a stop-related API was directly called locally, the stream enters the
|
|
324
|
-
|TRTCAVStatusChangeReasonRemoteStarted|5|As the remote user started (or resumed) publishing the audio or video stream, the stream enters the
|
|
319
|
+
|TRTCAVStatusChangeReasonBufferingBegin|1|The stream enters the `Loading` state due to network congestion|
|
|
320
|
+
|TRTCAVStatusChangeReasonBufferingEnd|2|The stream enters the `Playing` state after network recovery|
|
|
321
|
+
|TRTCAVStatusChangeReasonLocalStarted|3|As a start-related API was directly called locally, the stream enters the `Playing` state|
|
|
322
|
+
|TRTCAVStatusChangeReasonLocalStopped|4|As a stop-related API was directly called locally, the stream enters the `Stopped` state|
|
|
323
|
+
|TRTCAVStatusChangeReasonRemoteStarted|5|As the remote user started (or resumed) publishing the audio or video stream, the stream enters the `Loading` or `Playing` state|
|
|
325
324
|
|TRTCAVStatusChangeReasonRemoteStopped|6|As the remote user stopped (or paused) publishing the audio or video stream, the stream enters the "Stopped" state|
|
|
326
325
|
|
|
327
326
|
## TRTCAudioQuality
|
|
@@ -333,7 +332,7 @@ TRTC provides three well-tuned modes to meet the differentiated requirements for
|
|
|
333
332
|
|
|
334
333
|
- 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.
|
|
335
334
|
|
|
336
|
-
- Default mode (Default): it is between
|
|
335
|
+
- 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.
|
|
337
336
|
|
|
338
337
|
|Enum|Value|DESC|
|
|
339
338
|
|---------|---------|---------|
|
|
@@ -388,7 +387,7 @@ TRTC provides two modes of operation for audio callback data.
|
|
|
388
387
|
|
|
389
388
|
**Log level.**
|
|
390
389
|
|
|
391
|
-
Different log levels indicate different levels of details and number of logs. We recommend you set the log level to
|
|
390
|
+
Different log levels indicate different levels of details and number of logs. We recommend you set the log level to `TRTCLogLevelInfo` generally.
|
|
392
391
|
|
|
393
392
|
|Enum|Value|DESC|
|
|
394
393
|
|---------|---------|---------|
|
|
@@ -419,10 +418,10 @@ TRTC's On-Cloud MixTranscoding service can mix multiple audio/video streams in t
|
|
|
419
418
|
| Enum | Value | DESC |
|
|
420
419
|
| --- | --- | --- |
|
|
421
420
|
| TRTCTranscodingConfigMode_Unknown | 0 | Undefined |
|
|
422
|
-
| 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 ITRTCCloudCallback and constantly adjust the
|
|
423
|
-
| 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
|
|
424
|
-
| 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
|
|
425
|
-
| 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
|
|
421
|
+
| 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 ITRTCCloudCallback and constantly adjust the <code>mixUsers</code> parameter according to the audio/video status of each user with mic on in the current room. |
|
|
422
|
+
| 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. |
|
|
423
|
+
| 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 ITRTCCloudCallback 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. |
|
|
424
|
+
| 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. |
|
|
426
425
|
|
|
427
426
|
## TRTCRecordType
|
|
428
427
|
|
|
@@ -441,11 +440,11 @@ This enumerated type is used in the local media recording API startLocalRecordin
|
|
|
441
440
|
**Stream mix input type.**
|
|
442
441
|
| Enum | Value | DESC |
|
|
443
442
|
| --- | --- | --- |
|
|
444
|
-
| 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
|
|
443
|
+
| 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 |
|
|
445
444
|
| TRTCMixInputTypeAudioVideo | 1 | Mix both audio and video |
|
|
446
445
|
| TRTCMixInputTypePureVideo | 2 | Mix video only |
|
|
447
446
|
| TRTCMixInputTypePureAudio | 3 | Mix audio only |
|
|
448
|
-
| TRTCMixInputTypeWatermark | 4 | Mix watermark<br>In this case, you don't need to specify the
|
|
447
|
+
| 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. |
|
|
449
448
|
|
|
450
449
|
## TRTCWaterMarkSrcType
|
|
451
450
|
|
|
@@ -484,7 +483,7 @@ You can specify one of the following publishing modes to use:
|
|
|
484
483
|
| 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). |
|
|
485
484
|
| 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). |
|
|
486
485
|
| 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). |
|
|
487
|
-
| 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
|
|
486
|
+
| 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. |
|
|
488
487
|
|
|
489
488
|
## TRTCEncryptionAlgorithm
|
|
490
489
|
|
|
@@ -525,23 +524,23 @@ Begin from v11.7 version,It only takes effect when the camera capture scene in
|
|
|
525
524
|
|
|
526
525
|
**Room entry parameters.**
|
|
527
526
|
|
|
528
|
-
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
|
|
527
|
+
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` .
|
|
529
528
|
|
|
530
|
-
For historical reasons, TRTC supports two types of room IDs:
|
|
529
|
+
For historical reasons, TRTC supports two types of room IDs: `roomId` and `strRoomId` .
|
|
531
530
|
|
|
532
|
-
Note: do not mix
|
|
531
|
+
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.
|
|
533
532
|
| EnumType | DESC |
|
|
534
533
|
| --- | --- |
|
|
535
534
|
| businessInfo | 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. |
|
|
536
|
-
| privateMapKey | Field description: permission credential used for permission control, which is optional. If you want only users with the specified
|
|
535
|
+
| 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>. |
|
|
537
536
|
| 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). |
|
|
538
|
-
| 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
|
|
539
|
-
| sdkAppId | Field description: application ID, which is required. Tencent Cloud generates bills based on
|
|
540
|
-
| strRoomId | Field description: string-type room ID. Users (userId) in the same room can see one another and make audio/video calls.<br>@note
|
|
541
|
-
| streamId | Field description: specified
|
|
542
|
-
| 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
|
|
543
|
-
| userId | Field description: user ID, which is required. It is the
|
|
544
|
-
| userSig | Field description: user signature, which is required. It is the authentication signature corresponding to the current
|
|
537
|
+
| 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. |
|
|
538
|
+
| 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. |
|
|
539
|
+
| 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 ",". |
|
|
540
|
+
| 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>. |
|
|
541
|
+
| 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". |
|
|
542
|
+
| 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". |
|
|
543
|
+
| 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>. |
|
|
545
544
|
|
|
546
545
|
## TRTCVideoEncParam
|
|
547
546
|
|
|
@@ -551,11 +550,11 @@ These settings determine the quality of image viewed by remote users as well as
|
|
|
551
550
|
| EnumType | DESC |
|
|
552
551
|
| --- | --- |
|
|
553
552
|
| 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: false. 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. |
|
|
554
|
-
| minVideoBitrate | Field description: minimum video bitrate. The SDK will reduce the bitrate to as low as the value specified by
|
|
555
|
-
| resMode | Field description: resolution mode (landscape/portrait)<br>Recommended value: for mobile platforms (iOS and Android),
|
|
556
|
-
| 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
|
|
553
|
+
| 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. |
|
|
554
|
+
| 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. |
|
|
555
|
+
| 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. |
|
|
557
556
|
| 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. |
|
|
558
|
-
| 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
|
|
557
|
+
| 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. |
|
|
559
558
|
|
|
560
559
|
## TRTCNetworkQosParam
|
|
561
560
|
|
|
@@ -599,7 +598,7 @@ This indicates the audio volume value. You can use it to display the volume of e
|
|
|
599
598
|
| pitch | The local user's vocal frequency (unit: Hz), the value range is [0 - 4000]. For remote users, this value is always 0. |
|
|
600
599
|
| 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. |
|
|
601
600
|
| spectrumDataLength | The length of recorded audio spectrum data, which is 256. |
|
|
602
|
-
| userId | <code>
|
|
601
|
+
| userId | <code>userId</code> of the speaker. An empty value indicates the local user. |
|
|
603
602
|
| vad | Vad result of the local user. 0: not speech 1: speech. |
|
|
604
603
|
| volume | Volume of the speaker. Value range: 0–100. |
|
|
605
604
|
|
|
@@ -610,8 +609,8 @@ This indicates the audio volume value. You can use it to display the volume of e
|
|
|
610
609
|
You can test the network speed through the startSpeedTest: interface before the user enters the room (this API cannot be called during a call).
|
|
611
610
|
| EnumType | DESC |
|
|
612
611
|
| --- | --- |
|
|
613
|
-
| 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
|
|
614
|
-
| 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
|
|
612
|
+
| 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]. |
|
|
613
|
+
| 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]. |
|
|
615
614
|
| scene | Speed test scene. |
|
|
616
615
|
| sdkAppId | Application identification, please refer to the relevant instructions in TRTCParams. |
|
|
617
616
|
| userId | User identification, please refer to the relevant instructions in TRTCParams. |
|
|
@@ -651,16 +650,16 @@ The startSpeedTest: API can be used to test the network speed before a user ente
|
|
|
651
650
|
|
|
652
651
|
**Video frame information.**
|
|
653
652
|
|
|
654
|
-
`
|
|
653
|
+
`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.
|
|
655
654
|
| EnumType | DESC |
|
|
656
655
|
| --- | --- |
|
|
657
656
|
| bufferType | Field description: video data structure type |
|
|
658
|
-
| data | Field description: video data when
|
|
657
|
+
| data | Field description: video data when <code>bufferType</code> is TRTCVideoBufferType_Buffer, which carries the memory data blocks for the C++ layer. |
|
|
659
658
|
| height | Field description: video height<br>Recommended value: please enter the height of the video data passed in. |
|
|
660
659
|
| length | Field description: video data length in bytes. For I420, length = width * height * 3 / 2; for BGRA32, length = width * height * 4. |
|
|
661
660
|
| rotation | Field description: clockwise rotation angle of video pixels |
|
|
662
|
-
| texture | Field description: video data when
|
|
663
|
-
| 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
|
|
661
|
+
| texture | Field description: video data when <code>bufferType</code> is TRTCVideoBufferType_Texture, which carries the texture data used for OpenGL rendering. |
|
|
662
|
+
| 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. |
|
|
664
663
|
| videoFormat | Field description: video pixel format |
|
|
665
664
|
| width | Field description: video width<br>Recommended value: please enter the width of the video data passed in. |
|
|
666
665
|
|
|
@@ -683,14 +682,14 @@ The startSpeedTest: API can be used to test the network speed before a user ente
|
|
|
683
682
|
|
|
684
683
|
**Description information of each video image in On-Cloud MixTranscoding.**
|
|
685
684
|
|
|
686
|
-
`
|
|
685
|
+
`TRTCMixUser` is used to specify the location, size, layer, and stream type of each video image in On-Cloud MixTranscoding.
|
|
687
686
|
| EnumType | DESC |
|
|
688
687
|
| --- | --- |
|
|
689
|
-
| 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
|
|
690
|
-
| 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
|
|
691
|
-
| pureAudio | Field description: specify whether this stream mixes audio only<br>Recommended value: default value: false<br><strong>Note</strong><br>this field has been disused. We recommend you use the new field
|
|
688
|
+
| 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. |
|
|
689
|
+
| 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. |
|
|
690
|
+
| pureAudio | Field description: specify whether this stream mixes audio only<br>Recommended value: default value: false<br><strong>Note</strong><br>this field has been disused. We recommend you use the new field <code>inputType</code> introduced in v8.5. |
|
|
692
691
|
| rect | Field description: specify the coordinate area of this video image in px |
|
|
693
|
-
| 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
|
|
692
|
+
| 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. |
|
|
694
693
|
| roomId | Field description: ID of the room where this audio/video stream is located (an empty value indicates the local room ID) |
|
|
695
694
|
| soundLevel | Field description: specify the target volumn level of On-Cloud MixTranscoding. (value range: 0-100)<br>Recommended value: default value: 100. |
|
|
696
695
|
| streamType | Field description: specify whether this video image is the primary stream image (TRTCVideoStreamTypeBig) or substream image (TRTCVideoStreamTypeSub). |
|
|
@@ -704,24 +703,24 @@ The startSpeedTest: API can be used to test the network speed before a user ente
|
|
|
704
703
|
These parameters are used to specify the layout position information of each video image and the encoding parameters of mixtranscoding during On-Cloud MixTranscoding.
|
|
705
704
|
| EnumType | DESC |
|
|
706
705
|
| --- | --- |
|
|
707
|
-
| appId | Field description:
|
|
706
|
+
| 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. |
|
|
708
707
|
| audioBitrate | Field description: specify the target audio bitrate of On-Cloud MixTranscoding<br>Recommended value: default value: 64 Kbps. Value range: [32,192]. |
|
|
709
708
|
| 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. |
|
|
710
709
|
| 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. |
|
|
711
710
|
| 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. |
|
|
712
711
|
| 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). |
|
|
713
712
|
| 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. |
|
|
714
|
-
| bizId | Field description:
|
|
715
|
-
| mixUsersArray | 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
|
|
716
|
-
| mixUsersArraySize | Field description: number of elements in the
|
|
713
|
+
| 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. |
|
|
714
|
+
| mixUsersArray | 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. |
|
|
715
|
+
| mixUsersArraySize | Field description: number of elements in the <code>mixUsersArray</code> array |
|
|
717
716
|
| mode | Field description: layout mode<br>Recommended value: please choose a value according to your business needs. The preset mode has better applicability. |
|
|
718
|
-
| 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
|
|
719
|
-
| 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
|
|
717
|
+
| 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). |
|
|
718
|
+
| 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). |
|
|
720
719
|
| 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]. |
|
|
721
720
|
| 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]. |
|
|
722
|
-
| 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
|
|
721
|
+
| 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. |
|
|
723
722
|
| 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. |
|
|
724
|
-
| 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
|
|
723
|
+
| 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. |
|
|
725
724
|
|
|
726
725
|
## TRTCPublishCDNParam
|
|
727
726
|
|
|
@@ -732,8 +731,8 @@ TRTC's backend service supports publishing audio/video streams to third-party li
|
|
|
732
731
|
If you use the Tencent Cloud CSS CDN service, you don't need to care about this parameter; instead, just use the startPublish API.
|
|
733
732
|
| EnumType | DESC |
|
|
734
733
|
| --- | --- |
|
|
735
|
-
| appId | Field description:
|
|
736
|
-
| bizId | Field description:
|
|
734
|
+
| 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> . |
|
|
735
|
+
| 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> . |
|
|
737
736
|
| 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. |
|
|
738
737
|
| 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. |
|
|
739
738
|
|
|
@@ -744,8 +743,8 @@ If you use the Tencent Cloud CSS CDN service, you don't need to care about this
|
|
|
744
743
|
This parameter is used to specify the recording parameters in the audio recording API startAudioRecording.
|
|
745
744
|
| EnumType | DESC |
|
|
746
745
|
| --- | --- |
|
|
747
|
-
| 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
|
|
748
|
-
| maxDurationPerFile | Field description:
|
|
746
|
+
| 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. |
|
|
747
|
+
| 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. |
|
|
749
748
|
| recordingContent | Field description: Audio recording content type.<br>Note: Record all local and remote audio by default. |
|
|
750
749
|
|
|
751
750
|
## TRTCLocalRecordingParams
|
|
@@ -757,10 +756,10 @@ This parameter is used to specify the recording parameters in the local media fi
|
|
|
757
756
|
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.
|
|
758
757
|
| EnumType | DESC |
|
|
759
758
|
| --- | --- |
|
|
760
|
-
| 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
|
|
761
|
-
| interval | Field description:
|
|
762
|
-
| maxDurationPerFile | Field description:
|
|
763
|
-
| recordType | Field description: media recording type, which is
|
|
759
|
+
| 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. |
|
|
760
|
+
| 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 |
|
|
761
|
+
| 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. |
|
|
762
|
+
| recordType | Field description: media recording type, which is <code>TRTCRecordTypeBoth</code> by default, indicating to record both audio and video. |
|
|
764
763
|
|
|
765
764
|
## TRTCAudioEffectParam(Deprecated)
|
|
766
765
|
|
|
@@ -772,7 +771,7 @@ This parameter is used to specify the path and number of playback times of a sou
|
|
|
772
771
|
|
|
773
772
|
After v7.3, the sound effect API has been replaced by a new TXAudioEffectManager#startPlayMusic API.
|
|
774
773
|
|
|
775
|
-
When you specify the TXAudioMusicParam parameter of
|
|
774
|
+
When you specify the TXAudioMusicParam parameter of `startPlayMusic` , if `isShortFile` is set to `true` , the file is a "sound effect" file.
|
|
776
775
|
| EnumType | DESC |
|
|
777
776
|
| --- | --- |
|
|
778
777
|
| 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. |
|
|
@@ -788,10 +787,10 @@ When you specify the TXAudioMusicParam parameter of ` startPlayMusic `, if ` isS
|
|
|
788
787
|
This parameter is used for the room switch API switchRoom, which can quickly switch a user from one room to another.
|
|
789
788
|
| EnumType | DESC |
|
|
790
789
|
| --- | --- |
|
|
791
|
-
| privateMapKey | Field description: permission credential used for permission control, which is optional. If you want only users with the specified
|
|
792
|
-
| 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
|
|
793
|
-
| 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
|
|
794
|
-
| userSig | Field description: user signature, which is optional. It is the authentication signature corresponding to the current
|
|
790
|
+
| 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>. |
|
|
791
|
+
| 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. |
|
|
792
|
+
| 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. |
|
|
793
|
+
| 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>. |
|
|
795
794
|
|
|
796
795
|
## TRTCAudioFrameDelegateFormat
|
|
797
796
|
|
|
@@ -803,7 +802,7 @@ This parameter is used to set the relevant format (including sample rate and num
|
|
|
803
802
|
| channel | Field description: number of sound channels<br>Recommended value: default value: 1, which means mono channel. Valid values: 1: mono channel; 2: dual channel. |
|
|
804
803
|
| 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. |
|
|
805
804
|
| sampleRate | Field description: sample rate<br>Recommended value: default value: 48000 Hz. Valid values: 16000, 32000, 44100, 48000. |
|
|
806
|
-
| samplesPerCall | Field description: number of sample points<br>Recommended value: the value must be an integer multiple of
|
|
805
|
+
| samplesPerCall | Field description: number of sample points<br>Recommended value: the value must be an integer multiple of <code>sampleRate/100</code> . |
|
|
807
806
|
|
|
808
807
|
## TRTCUser
|
|
809
808
|
|
|
@@ -812,9 +811,9 @@ This parameter is used to set the relevant format (including sample rate and num
|
|
|
812
811
|
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.
|
|
813
812
|
| EnumType | DESC |
|
|
814
813
|
| --- | --- |
|
|
815
|
-
| 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
|
|
816
|
-
| 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
|
|
817
|
-
| 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
|
|
814
|
+
| 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. |
|
|
815
|
+
| 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, "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "\\|", "~", "," |
|
|
816
|
+
| 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> . |
|
|
818
817
|
|
|
819
818
|
## TRTCPublishCdnUrl
|
|
820
819
|
|
|
@@ -823,7 +822,7 @@ You can use this parameter together with the publishing destination parameter TR
|
|
|
823
822
|
This enum type is used by the publishing destination parameter TRTCPublishTarget of the publishing API startPublishMediaStream.
|
|
824
823
|
| EnumType | DESC |
|
|
825
824
|
| --- | --- |
|
|
826
|
-
| isInternalLine | <strong>Description:</strong> Whether to publish to Tencent Cloud<br><strong>Value:</strong> The default value is
|
|
825
|
+
| 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. |
|
|
827
826
|
| 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. |
|
|
828
827
|
|
|
829
828
|
## TRTCPublishTarget
|
|
@@ -833,10 +832,10 @@ This enum type is used by the publishing destination parameter TRTCPublishTarget
|
|
|
833
832
|
This enum type is used by the publishing API startPublishMediaStream.
|
|
834
833
|
| EnumType | DESC |
|
|
835
834
|
| --- | --- |
|
|
836
|
-
| cdnUrlList | <code>
|
|
837
|
-
| cdnUrlListSize | <code>
|
|
838
|
-
| mixStreamIdentity | <code>
|
|
839
|
-
| mode | <code>
|
|
835
|
+
| 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. |
|
|
836
|
+
| cdnUrlListSize | <code>Description:</code> The length of the <code>cdnUrlList</code> array.<br><code>Note:</code> You don’t need to set this parameter if you set the publishing mode to TRTCPublishMixStreamToRoom. |
|
|
837
|
+
| 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. |
|
|
838
|
+
| 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. |
|
|
840
839
|
|
|
841
840
|
## TRTCVideoLayout
|
|
842
841
|
|
|
@@ -847,13 +846,13 @@ This enum type is used by the On-Cloud MixTranscoding parameter TRTCStreamMixing
|
|
|
847
846
|
You can use this parameter to specify the position, size, layer, and stream type of each video in the transcoded stream.
|
|
848
847
|
| EnumType | DESC |
|
|
849
848
|
| --- | --- |
|
|
850
|
-
| backgroundColor | <code>
|
|
851
|
-
| fillMode | <code>
|
|
852
|
-
| fixedVideoStreamType | <code>
|
|
853
|
-
| fixedVideoUser | <code>
|
|
854
|
-
| placeHolderImage | <code>
|
|
855
|
-
| rect | <code>
|
|
856
|
-
| zOrder | <code>
|
|
849
|
+
| 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). |
|
|
850
|
+
| 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. |
|
|
851
|
+
| fixedVideoStreamType | <code>Description:</code> Whether the video is the primary stream (TRTCVideoStreamTypeBig) or substream (TRTCVideoStreamTypeSub). |
|
|
852
|
+
| 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. |
|
|
853
|
+
| 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. |
|
|
854
|
+
| rect | <code>Description:</code> The coordinates (in pixels) of the video. |
|
|
855
|
+
| zOrder | <code>Description:</code> The layer of the video, which must be unique. Value range: 0-15. |
|
|
857
856
|
|
|
858
857
|
## TRTCWatermark
|
|
859
858
|
|
|
@@ -862,32 +861,32 @@ You can use this parameter to specify the position, size, layer, and stream type
|
|
|
862
861
|
This enum type is used by the On-Cloud MixTranscoding parameter TRTCStreamMixingConfig of the publishing API startPublishMediaStream.
|
|
863
862
|
| EnumType | DESC |
|
|
864
863
|
| --- | --- |
|
|
865
|
-
| rect | <code>
|
|
866
|
-
| watermarkUrl | <code>
|
|
867
|
-
| zOrder | <code>
|
|
864
|
+
| rect | <code>Description:</code> The coordinates (in pixels) of the watermark. |
|
|
865
|
+
| 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. |
|
|
866
|
+
| zOrder | <code>Description:</code> The layer of the watermark, which must be unique. Value range: 0-15. |
|
|
868
867
|
|
|
869
868
|
## TRTCStreamEncoderParam
|
|
870
869
|
|
|
871
870
|
**The encoding parameters.**
|
|
872
871
|
|
|
873
|
-
`
|
|
872
|
+
`Description:` This enum type is used by the publishing API startPublishMediaStream.
|
|
874
873
|
|
|
875
|
-
`
|
|
874
|
+
`Note:` This parameter is required if you set the publishing mode to `TRTCPublish_MixStream_ToCdn` or `TRTCPublish_MixStream_ToRoom` in TRTCPublishTarget.
|
|
876
875
|
|
|
877
|
-
`
|
|
876
|
+
`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.
|
|
878
877
|
| EnumType | DESC |
|
|
879
878
|
| --- | --- |
|
|
880
|
-
| audioEncodedChannelNum | <code>
|
|
881
|
-
| audioEncodedCodecType | <code>
|
|
882
|
-
| audioEncodedKbps | <code>
|
|
883
|
-
| audioEncodedSampleRate | <code>
|
|
884
|
-
| videoEncodedCodecType | <code>
|
|
885
|
-
| videoEncodedFPS | <code>
|
|
886
|
-
| videoEncodedGOP | <code>
|
|
887
|
-
| videoEncodedHeight | <code>
|
|
888
|
-
| videoEncodedKbps | <code>
|
|
889
|
-
| videoEncodedWidth | <code>
|
|
890
|
-
| videoSeiParams | <code>
|
|
879
|
+
| 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. |
|
|
880
|
+
| 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. |
|
|
881
|
+
| audioEncodedKbps | <code>Description:</code> The audio bitrate (Kbps) of the stream to publish.<br><code>Value:</code> Value range: [32,192]. Default: 50. |
|
|
882
|
+
| 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). |
|
|
883
|
+
| videoEncodedCodecType | <code>Description:</code> The video codec of the stream to publish.<br><code>Value:</code> Valid values: 0 (H264); 1 (H265). Default: 0. |
|
|
884
|
+
| videoEncodedFPS | <code>Description:</code> The frame rate (fps) of the stream to publish.<br><code>Value:</code> Value range: (0,30]. Default: 20. |
|
|
885
|
+
| videoEncodedGOP | <code>Description:</code> The keyframe interval (GOP) of the stream to publish.<br><code>Value:</code> Value range: [1,5]. Default: 3 (seconds). |
|
|
886
|
+
| 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> . |
|
|
887
|
+
| 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). |
|
|
888
|
+
| 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> . |
|
|
889
|
+
| 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. |
|
|
891
890
|
|
|
892
891
|
## TRTCStreamMixingConfig
|
|
893
892
|
|
|
@@ -898,14 +897,14 @@ This enum type is used by the publishing API startPublishMediaStream.
|
|
|
898
897
|
You can use this parameter to specify the video layout and input audio information for On-Cloud MixTranscoding.
|
|
899
898
|
| EnumType | DESC |
|
|
900
899
|
| --- | --- |
|
|
901
|
-
| audioMixUserList | <code>
|
|
902
|
-
| audioMixUserListSize | <strong>Description:</strong> The length of the
|
|
903
|
-
| backgroundColor | <code>
|
|
904
|
-
| backgroundImage | <code>
|
|
905
|
-
| videoLayoutList | <code>
|
|
906
|
-
| videoLayoutListSize | <strong>Description:</strong> The length of the
|
|
907
|
-
| watermarkList | <code>
|
|
908
|
-
| watermarkListSize | <code>
|
|
900
|
+
| 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). |
|
|
901
|
+
| audioMixUserListSize | <strong>Description:</strong> The length of the <code>audioMixUserList</code> array. |
|
|
902
|
+
| 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). |
|
|
903
|
+
| 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. |
|
|
904
|
+
| 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. |
|
|
905
|
+
| videoLayoutListSize | <strong>Description:</strong> The length of the <code>videoLayoutList</code> array. |
|
|
906
|
+
| 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. |
|
|
907
|
+
| watermarkListSize | <code>Description:</code> The length of the <code>watermarkList</code> array. |
|
|
909
908
|
|
|
910
909
|
## TRTCPayloadPrivateEncryptionConfig
|
|
911
910
|
|
|
@@ -914,9 +913,9 @@ You can use this parameter to specify the video layout and input audio informati
|
|
|
914
913
|
This configuration is used to set the algorithm and key for media stream private encryption.
|
|
915
914
|
| EnumType | DESC |
|
|
916
915
|
| --- | --- |
|
|
917
|
-
| encryptionAlgorithm | <code>
|
|
918
|
-
| encryptionKey | <code>
|
|
919
|
-
| encryptionSalt[32] | <code>
|
|
916
|
+
| encryptionAlgorithm | <code>Description:</code> Encryption algorithm, the default is TRTCEncryptionAlgorithmAes128Gcm. |
|
|
917
|
+
| 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. |
|
|
918
|
+
| encryptionSalt[32] | <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. |
|
|
920
919
|
|
|
921
920
|
## TRTCAudioVolumeEvaluateParams
|
|
922
921
|
|
|
@@ -925,7 +924,7 @@ This configuration is used to set the algorithm and key for media stream private
|
|
|
925
924
|
This setting is used to enable vocal detection and sound spectrum calculation.
|
|
926
925
|
| EnumType | DESC |
|
|
927
926
|
| --- | --- |
|
|
928
|
-
| enablePitchCalculation | <code>
|
|
929
|
-
| enableSpectrumCalculation | <code>
|
|
930
|
-
| enableVadDetection | <code>
|
|
931
|
-
| interval | <code>
|
|
927
|
+
| enablePitchCalculation | <code>Description:</code> Whether to enable local vocal frequency calculation. |
|
|
928
|
+
| enableSpectrumCalculation | <code>Description:</code> Whether to enable sound spectrum calculation. |
|
|
929
|
+
| enableVadDetection | <code>Description:</code> Whether to enable local voice detection.<br><strong>Note</strong><br>Call before startLocalAudio. |
|
|
930
|
+
| 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. |
|