@tencent-rtc/mcp 1.2.8 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/resource/doc/chatuikit/faq/common/server.md +44 -0
- package/resource/doc/chatuikit/faq/web_sdk/faq.md +57 -0
- package/resource/doc/livekit/vue/components/co-guest-panel.md +3 -3
- package/resource/doc/livekit/vue/components/live-view.md +4 -4
- package/resource/doc/livekit/vue/{components/live-list.md → live-list-integration.md} +7 -7
- package/resource/doc/livekit/vue/{components/live-player.md → live-player-desk-integration.md} +8 -8
- package/resource/doc/livekit/vue/live-player-h5-integration.md +269 -0
- package/resource/doc/livekit/vue/workflow.md +218 -0
- package/resource/doc/native_live/android/V2TXLiveCode_api_android.md +312 -0
- package/resource/doc/native_live/android/V2TXLiveDef_api_android.md +430 -0
- package/resource/doc/native_live/android/V2TXLivePlayerObserver_api_android.md +679 -0
- package/resource/doc/native_live/android/V2TXLivePlayer_api_android.md +671 -0
- package/resource/doc/native_live/android/V2TXLivePremier_api_android.md +271 -0
- package/resource/doc/native_live/android/V2TXLivePusherObserver_api_android.md +849 -0
- package/resource/doc/native_live/android/V2TXLivePusher_api_android.md +1046 -0
- package/resource/doc/native_live/flutter/V2TXLiveCode_api_flutter.md +460 -0
- package/resource/doc/native_live/flutter/V2TXLiveDef_api_flutter.md +558 -0
- package/resource/doc/native_live/flutter/V2TXLivePlayerObserver_api_flutter.md +865 -0
- package/resource/doc/native_live/flutter/V2TXLivePlayer_api_flutter.md +657 -0
- package/resource/doc/native_live/flutter/V2TXLivePremier_api_flutter.md +437 -0
- package/resource/doc/native_live/flutter/V2TXLivePusherObserver_api_flutter.md +335 -0
- package/resource/doc/native_live/flutter/V2TXLivePusher_api_flutter.md +748 -0
- package/resource/doc/native_live/iOS/V2TXLiveCode_api_iOS.md +327 -0
- package/resource/doc/native_live/iOS/V2TXLiveDef_api_iOS.md +507 -0
- package/resource/doc/native_live/iOS/V2TXLivePlayerObserver_api_iOS.md +507 -0
- package/resource/doc/native_live/iOS/V2TXLivePlayer_api_iOS.md +659 -0
- package/resource/doc/native_live/iOS/V2TXLivePremier_api_iOS.md +284 -0
- package/resource/doc/native_live/iOS/V2TXLivePusherObserver_api_iOS.md +814 -0
- package/resource/doc/native_live/iOS/V2TXLivePusher_api_iOS.md +1000 -0
- package/resource/doc/trtc/C++/ITRTCCloud.md +4119 -0
- package/resource/doc/trtc/C++/ITRTCStatistics.md +325 -0
- package/resource/doc/trtc/C++/ITXAudioEffectManager.md +1289 -0
- package/resource/doc/trtc/C++/ITXDeviceManager.md +1028 -0
- package/resource/doc/trtc/C++/TRTCCloudCallback.md +2650 -0
- package/resource/doc/trtc/C++/TRTCTypeDef.md +3600 -0
- package/resource/doc/trtc/C++/TXLiteAVCode.md +921 -0
- package/resource/doc/trtc/android/TRTCCloud.md +3782 -0
- package/resource/doc/trtc/android/TRTCCloudDef.md +3880 -0
- package/resource/doc/trtc/android/TRTCCloudListener.md +2431 -0
- package/resource/doc/trtc/android/TRTCStatistics.md +295 -0
- package/resource/doc/trtc/android/TXAudioEffectManager.md +1289 -0
- package/resource/doc/trtc/android/TXBeautyManager.md +979 -0
- package/resource/doc/trtc/android/TXDeviceManager.md +440 -0
- package/resource/doc/trtc/android/TXLiteAVCode.md +905 -0
- package/resource/doc/trtc/iOS/TRTCCloud.md +4238 -0
- package/resource/doc/trtc/iOS/TRTCCloudDef.md +3730 -0
- package/resource/doc/trtc/iOS/TRTCCloudDelegate.md +2531 -0
- package/resource/doc/trtc/iOS/TRTCStatistics.md +295 -0
- package/resource/doc/trtc/iOS/TXAudioEffectManager.md +1100 -0
- package/resource/doc/trtc/iOS/TXBeautyManager.md +985 -0
- package/resource/doc/trtc/iOS/TXDeviceManager.md +1024 -0
- package/resource/doc/trtc/iOS/TXLiteAVCode.md +928 -0
- package/tools/definitions/get_faq_def.js +4 -0
- package/tools/definitions/get_faq_def.js.map +1 -1
- package/tools/definitions/get_native_live_api_def.js +23 -0
- package/tools/definitions/get_native_live_api_def.js.map +1 -0
- package/tools/definitions/get_trtc_native_api_def.js +16 -0
- package/tools/definitions/get_trtc_native_api_def.js.map +1 -0
- package/tools/definitions/get_web_live_uikit_component_detail_def.js +13 -8
- package/tools/definitions/get_web_live_uikit_component_detail_def.js.map +1 -1
- package/tools/definitions/get_web_live_uikit_integration_def.js +32 -0
- package/tools/definitions/get_web_live_uikit_integration_def.js.map +1 -0
- package/tools/index.js +8 -0
- package/tools/index.js.map +1 -1
- package/tools/live/get-web-live-uikit-integration.js +52 -0
- package/tools/live/get-web-live-uikit-integration.js.map +1 -0
- package/tools/native_live/get-native-live-api.js +31 -0
- package/tools/native_live/get-native-live-api.js.map +1 -0
- package/tools/trtc/get-trtc-native-api.js +31 -0
- package/tools/trtc/get-trtc-native-api.js.map +1 -0
- package/utils/generate-structured-result.js +34 -0
- package/utils/generate-structured-result.js.map +1 -0
- package/utils/handle-component-name.js +0 -8
- package/utils/handle-component-name.js.map +1 -1
- package/utils/report-cls-client.js +1 -1
- package/utils/report-es-client.js +1 -1
- /package/resource/doc/livekit/vue/{components/broadcast.md → live-pusher-integration.md} +0 -0
|
@@ -0,0 +1,430 @@
|
|
|
1
|
+
# Tencent Cloud Live Streaming SDK V2TXLiveDef Type Definitions
|
|
2
|
+
|
|
3
|
+
## Feature Overview
|
|
4
|
+
|
|
5
|
+
`V2TXLiveDef` is the primary type definition file for the Tencent Cloud Live Streaming SDK. It includes all enumerations, constants, and data structures required for live streaming push and playback.
|
|
6
|
+
|
|
7
|
+
**File Path**: `com/tencent/live2/V2TXLiveDef.java`
|
|
8
|
+
|
|
9
|
+
**Core Features**:
|
|
10
|
+
- Defines video and audio enumerations and constants
|
|
11
|
+
- Provides data structures for statistics and configuration parameters
|
|
12
|
+
- Supports configuration for cloud stream mixing and local recording
|
|
13
|
+
|
|
14
|
+
## 1. Supported Protocols
|
|
15
|
+
|
|
16
|
+
### V2TXLiveMode - Supported Protocols for Live Streaming Push
|
|
17
|
+
```java
|
|
18
|
+
public enum V2TXLiveMode {
|
|
19
|
+
/// Supported protocol: RTMP
|
|
20
|
+
TXLiveMode_RTMP,
|
|
21
|
+
|
|
22
|
+
/// Supported protocol: RTC
|
|
23
|
+
TXLiveMode_RTC;
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## 2. Video Type Definitions
|
|
28
|
+
|
|
29
|
+
### V2TXLiveVideoResolution - Video Resolution Enumeration
|
|
30
|
+
```java
|
|
31
|
+
public enum V2TXLiveVideoResolution {
|
|
32
|
+
/// 160x160, bitrate: 100–150 Kbps, frame rate: 15 fps
|
|
33
|
+
V2TXLiveVideoResolution160x160,
|
|
34
|
+
|
|
35
|
+
/// 270x270, bitrate: 200–300 Kbps, frame rate: 15 fps
|
|
36
|
+
V2TXLiveVideoResolution270x270,
|
|
37
|
+
|
|
38
|
+
/// 480x480, bitrate: 350–525 Kbps, frame rate: 15 fps
|
|
39
|
+
V2TXLiveVideoResolution480x480,
|
|
40
|
+
|
|
41
|
+
/// 320x240, bitrate: 250–375 Kbps, frame rate: 15 fps
|
|
42
|
+
V2TXLiveVideoResolution320x240,
|
|
43
|
+
|
|
44
|
+
/// 480x360, bitrate: 400–600 Kbps, frame rate: 15 fps
|
|
45
|
+
V2TXLiveVideoResolution480x360,
|
|
46
|
+
|
|
47
|
+
/// 640x480, bitrate: 600–900 Kbps, frame rate: 15 fps
|
|
48
|
+
V2TXLiveVideoResolution640x480,
|
|
49
|
+
|
|
50
|
+
/// 320x180, bitrate: 250–400 Kbps, frame rate: 15 fps
|
|
51
|
+
V2TXLiveVideoResolution320x180,
|
|
52
|
+
|
|
53
|
+
/// 480x270, bitrate: 350–550 Kbps, frame rate: 15 fps
|
|
54
|
+
V2TXLiveVideoResolution480x270,
|
|
55
|
+
|
|
56
|
+
/// 640x360, bitrate: 500–900 Kbps, frame rate: 15 fps
|
|
57
|
+
V2TXLiveVideoResolution640x360,
|
|
58
|
+
|
|
59
|
+
/// 960x540, bitrate: 800–1500 Kbps, frame rate: 15 fps
|
|
60
|
+
V2TXLiveVideoResolution960x540,
|
|
61
|
+
|
|
62
|
+
/// 1280x720, bitrate: 1000–1800 Kbps, frame rate: 15 fps
|
|
63
|
+
V2TXLiveVideoResolution1280x720,
|
|
64
|
+
|
|
65
|
+
/// 1920x1080, bitrate: 2500–3000 Kbps, frame rate: 15 fps
|
|
66
|
+
V2TXLiveVideoResolution1920x1080,
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
| Resolution | Bitrate Range | Frame Rate | Description |
|
|
71
|
+
|--------------|--------------|------------|---------------------------------------------|
|
|
72
|
+
| 160×160 | 100–150 Kbps | 15 fps | Ultra-low resolution, ideal for voice calls |
|
|
73
|
+
| 270×270 | 200–300 Kbps | 15 fps | Low resolution |
|
|
74
|
+
| 480×480 | 350–525 Kbps | 15 fps | Standard square resolution |
|
|
75
|
+
| 320×240 | 250–375 Kbps | 15 fps | 4:3 aspect ratio, standard resolution |
|
|
76
|
+
| 480×360 | 400–600 Kbps | 15 fps | 4:3 aspect ratio, medium resolution |
|
|
77
|
+
| 640×480 | 600–900 Kbps | 15 fps | SD resolution |
|
|
78
|
+
| 320×180 | 250–400 Kbps | 15 fps | 16:9 aspect ratio, low resolution |
|
|
79
|
+
| 480×270 | 350–550 Kbps | 15 fps | 16:9 aspect ratio, standard resolution |
|
|
80
|
+
| 640×360 | 500–900 Kbps | 15 fps | 16:9 aspect ratio, medium resolution |
|
|
81
|
+
| 960×540 | 800–1500 Kbps| 15 fps | HD resolution |
|
|
82
|
+
| 1280×720 | 1000–1800 Kbps| 15 fps | 720p HD |
|
|
83
|
+
| 1920×1080 | 2500–3000 Kbps| 15 fps | 1080p Full HD |
|
|
84
|
+
|
|
85
|
+
### V2TXLiveVideoResolutionMode - Video Orientation Mode
|
|
86
|
+
```java
|
|
87
|
+
public enum V2TXLiveVideoResolutionMode {
|
|
88
|
+
/// Landscape orientation
|
|
89
|
+
V2TXLiveVideoResolutionModeLandscape,
|
|
90
|
+
|
|
91
|
+
/// Portrait orientation
|
|
92
|
+
V2TXLiveVideoResolutionModePortrait,
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### V2TXLiveVideoEncoderParam - Video Encoder Parameter Configuration
|
|
97
|
+
```java
|
|
98
|
+
public final static class V2TXLiveVideoEncoderParam {
|
|
99
|
+
public V2TXLiveVideoResolution videoResolution; // Video resolution
|
|
100
|
+
public V2TXLiveVideoResolutionMode videoResolutionMode; // Orientation mode
|
|
101
|
+
public int videoFps; // Capture frame rate
|
|
102
|
+
public int videoBitrate; // Target video bitrate
|
|
103
|
+
public int minVideoBitrate; // Minimum video bitrate
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
**Recommended Settings**:
|
|
108
|
+
- **Frame Rate**: Use 15 fps or 20 fps. Frame rates below 5 fps will result in noticeable stuttering, while rates above 20 fps may waste bandwidth.
|
|
109
|
+
- **Adaptive Bitrate**: Set both `videoBitrate` and `minVideoBitrate` to define the bitrate adjustment range.
|
|
110
|
+
|
|
111
|
+
### V2TXLiveMirrorType - Local Camera Mirror Mode
|
|
112
|
+
```java
|
|
113
|
+
public enum V2TXLiveMirrorType {
|
|
114
|
+
/// System default: front camera mirrored, rear camera not mirrored
|
|
115
|
+
V2TXLiveMirrorTypeAuto,
|
|
116
|
+
|
|
117
|
+
/// Both front and rear cameras mirrored
|
|
118
|
+
V2TXLiveMirrorTypeEnable,
|
|
119
|
+
|
|
120
|
+
/// Both front and rear cameras not mirrored
|
|
121
|
+
V2TXLiveMirrorTypeDisable,
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### V2TXLiveFillMode - Video Fill Mode
|
|
126
|
+
```java
|
|
127
|
+
public enum V2TXLiveFillMode {
|
|
128
|
+
/// Image fills the view, cropping excess; some content may be lost
|
|
129
|
+
V2TXLiveFillModeFill,
|
|
130
|
+
|
|
131
|
+
/// Image's longer side fits the view, shorter side padded with black; full content retained
|
|
132
|
+
V2TXLiveFillModeFit,
|
|
133
|
+
|
|
134
|
+
/// Image stretched to fill view; aspect ratio may not be preserved
|
|
135
|
+
V2TXLiveFillModeScaleFill
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### V2TXLiveRotation - Video Rotation Angle
|
|
140
|
+
```java
|
|
141
|
+
public enum V2TXLiveRotation {
|
|
142
|
+
/// No rotation
|
|
143
|
+
V2TXLiveRotation0,
|
|
144
|
+
|
|
145
|
+
/// 90° clockwise rotation
|
|
146
|
+
V2TXLiveRotation90,
|
|
147
|
+
|
|
148
|
+
/// 180° clockwise rotation
|
|
149
|
+
V2TXLiveRotation180,
|
|
150
|
+
|
|
151
|
+
/// 270° clockwise rotation
|
|
152
|
+
V2TXLiveRotation270,
|
|
153
|
+
}
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### V2TXLivePixelFormat - Video Frame Pixel Format
|
|
157
|
+
```java
|
|
158
|
+
public enum V2TXLivePixelFormat {
|
|
159
|
+
/// Unknown format
|
|
160
|
+
V2TXLivePixelFormatUnknown,
|
|
161
|
+
|
|
162
|
+
/// YUV420P I420 format
|
|
163
|
+
V2TXLivePixelFormatI420,
|
|
164
|
+
|
|
165
|
+
/// OpenGL 2D texture format
|
|
166
|
+
V2TXLivePixelFormatTexture2D,
|
|
167
|
+
}
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### V2TXLiveBufferType - Video Data Buffer Type
|
|
171
|
+
```java
|
|
172
|
+
public enum V2TXLiveBufferType {
|
|
173
|
+
/// Unknown type
|
|
174
|
+
V2TXLiveBufferTypeUnknown,
|
|
175
|
+
|
|
176
|
+
/// DirectBuffer, stores I420 and other buffers, used at the native layer
|
|
177
|
+
V2TXLiveBufferTypeByteBuffer,
|
|
178
|
+
|
|
179
|
+
/// byte[], stores I420 and other buffers, used at the Java layer
|
|
180
|
+
V2TXLiveBufferTypeByteArray,
|
|
181
|
+
|
|
182
|
+
/// Operates directly on texture ID for optimal performance and minimal quality loss
|
|
183
|
+
V2TXLiveBufferTypeTexture,
|
|
184
|
+
}
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### V2TXLiveTexture - Video Texture Wrapper
|
|
188
|
+
```java
|
|
189
|
+
public final static class V2TXLiveTexture {
|
|
190
|
+
public int textureId; // Video texture ID
|
|
191
|
+
public javax.microedition.khronos.egl.EGLContext eglContext10; // OpenGL EGLContext (v1.0)
|
|
192
|
+
public android.opengl.EGLContext eglContext14; // Android EGLContext (v1.4)
|
|
193
|
+
}
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### V2TXLiveVideoFrame - Video Frame Information
|
|
197
|
+
```java
|
|
198
|
+
public final static class V2TXLiveVideoFrame {
|
|
199
|
+
public V2TXLivePixelFormat pixelFormat; // Pixel format
|
|
200
|
+
public V2TXLiveBufferType bufferType; // Buffer type
|
|
201
|
+
public V2TXLiveTexture texture; // Texture wrapper
|
|
202
|
+
public byte[] data; // Video data
|
|
203
|
+
public ByteBuffer buffer; // Video data buffer
|
|
204
|
+
public int width; // Frame width
|
|
205
|
+
public int height; // Frame height
|
|
206
|
+
public int rotation; // Rotation angle
|
|
207
|
+
}
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
## 3. Audio Type Definitions
|
|
211
|
+
|
|
212
|
+
### V2TXLiveAudioQuality - Audio Quality Settings
|
|
213
|
+
```java
|
|
214
|
+
public enum V2TXLiveAudioQuality {
|
|
215
|
+
/// Speech: 16kHz sample rate, mono, 16 Kbps, suitable for voice calls
|
|
216
|
+
V2TXLiveAudioQualitySpeech,
|
|
217
|
+
|
|
218
|
+
/// Default: 48kHz sample rate, mono, 50 Kbps, SDK default
|
|
219
|
+
V2TXLiveAudioQualityDefault,
|
|
220
|
+
|
|
221
|
+
/// Music: 48kHz sample rate, stereo, full band, 128 Kbps, for high-fidelity music
|
|
222
|
+
V2TXLiveAudioQualityMusic,
|
|
223
|
+
}
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
### V2TXLiveAudioFrame - Audio Frame Data
|
|
227
|
+
```java
|
|
228
|
+
public final static class V2TXLiveAudioFrame {
|
|
229
|
+
public byte[] data; // Audio data
|
|
230
|
+
public int sampleRate; // Sample rate (default: 48000 Hz)
|
|
231
|
+
public int channel; // Audio channel count (default: 1, mono)
|
|
232
|
+
public long timestamp; // Timestamp (ms)
|
|
233
|
+
}
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
### V2TXLiveAudioFrameOperationMode - Audio Callback Data Access Mode
|
|
237
|
+
```java
|
|
238
|
+
public enum V2TXLiveAudioFrameOperationMode {
|
|
239
|
+
/// Read/write mode: access and modify callback audio data (default)
|
|
240
|
+
V2TXLiveAudioFrameOperationModeReadWrite,
|
|
241
|
+
|
|
242
|
+
/// Read-only mode: access callback audio data only
|
|
243
|
+
V2TXLiveAudioFrameOperationModeReadOnly,
|
|
244
|
+
}
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
### V2TXLiveAudioFrameObserverFormat - Audio Frame Callback Format
|
|
248
|
+
```java
|
|
249
|
+
public final static class V2TXLiveAudioFrameObserverFormat {
|
|
250
|
+
public int sampleRate; // Sample rate (default: 48000 Hz)
|
|
251
|
+
public int channel; // Audio channel count (default: 1)
|
|
252
|
+
public int samplesPerCall; // Samples per callback
|
|
253
|
+
public V2TXLiveAudioFrameOperationMode mode; // Data access mode
|
|
254
|
+
}
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
## 4. Statistics Data Definitions
|
|
258
|
+
|
|
259
|
+
### V2TXLivePusherStatistics - Pusher Statistics
|
|
260
|
+
```java
|
|
261
|
+
public final static class V2TXLivePusherStatistics {
|
|
262
|
+
public int appCpu; // App CPU usage (%)
|
|
263
|
+
public int systemCpu; // System CPU usage (%)
|
|
264
|
+
public int width; // Video width
|
|
265
|
+
public int height; // Video height
|
|
266
|
+
public int fps; // Frame rate (fps)
|
|
267
|
+
public int videoBitrate; // Video bitrate (Kbps)
|
|
268
|
+
public int audioBitrate; // Audio bitrate (Kbps)
|
|
269
|
+
public int rtt; // SDK to cloud Round-Trip Time (RTT) (ms)
|
|
270
|
+
public int netSpeed; // Uplink speed (Kbps)
|
|
271
|
+
}
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
### V2TXLivePlayerStatistics - Player Statistics
|
|
275
|
+
```java
|
|
276
|
+
public final static class V2TXLivePlayerStatistics {
|
|
277
|
+
public int appCpu; // App CPU usage (%)
|
|
278
|
+
public int systemCpu; // System CPU usage (%)
|
|
279
|
+
public int width; // Video width
|
|
280
|
+
public int height; // Video height
|
|
281
|
+
public int fps; // Frame rate (fps)
|
|
282
|
+
public int videoBitrate; // Video bitrate (Kbps)
|
|
283
|
+
public int audioBitrate; // Audio bitrate (Kbps)
|
|
284
|
+
public int audioPacketLoss; // Audio packet loss rate (%)
|
|
285
|
+
public int videoPacketLoss; // Video packet loss rate (%)
|
|
286
|
+
public int jitterBufferDelay; // Playback delay (ms)
|
|
287
|
+
public int audioTotalBlockTime; // Total audio playback stuttering time (ms)
|
|
288
|
+
public int audioBlockRate; // Audio playback stuttering rate (%)
|
|
289
|
+
public int videoTotalBlockTime; // Total video playback stuttering time (ms)
|
|
290
|
+
public int videoBlockRate; // Video playback stuttering rate (%)
|
|
291
|
+
public int rtt; // Round-Trip Time (RTT) (ms)
|
|
292
|
+
public int netSpeed; // Download speed (Kbps)
|
|
293
|
+
}
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
## 5. Connection Status Enumerations
|
|
297
|
+
|
|
298
|
+
### V2TXLivePushStatus - Live Stream Connection Status
|
|
299
|
+
```java
|
|
300
|
+
public enum V2TXLivePushStatus {
|
|
301
|
+
/// Disconnected from server
|
|
302
|
+
V2TXLivePushStatusDisconnected,
|
|
303
|
+
|
|
304
|
+
/// Connecting to server
|
|
305
|
+
V2TXLivePushStatusConnecting,
|
|
306
|
+
|
|
307
|
+
/// Connected to server
|
|
308
|
+
V2TXLivePushStatusConnectSuccess,
|
|
309
|
+
|
|
310
|
+
/// Reconnecting to server
|
|
311
|
+
V2TXLivePushStatusReconnecting,
|
|
312
|
+
}
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
## 6. Cloud Stream Mixing Configuration
|
|
316
|
+
|
|
317
|
+
### V2TXLiveMixInputType - Stream Mixing Input Type
|
|
318
|
+
```java
|
|
319
|
+
public enum V2TXLiveMixInputType {
|
|
320
|
+
/// Mix audio and video
|
|
321
|
+
V2TXLiveMixInputTypeAudioVideo,
|
|
322
|
+
|
|
323
|
+
/// Mix video only
|
|
324
|
+
V2TXLiveMixInputTypePureVideo,
|
|
325
|
+
|
|
326
|
+
/// Mix audio only
|
|
327
|
+
V2TXLiveMixInputTypePureAudio,
|
|
328
|
+
}
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
### V2TXLiveMixStream - Cloud Stream Mixing Sub-Screen Layout
|
|
332
|
+
```java
|
|
333
|
+
public static class V2TXLiveMixStream {
|
|
334
|
+
public String userId; // userId participating in cloud stream mixing
|
|
335
|
+
public String streamId; // Push streamId
|
|
336
|
+
public int x; // X coordinate (absolute pixels)
|
|
337
|
+
public int y; // Y coordinate (absolute pixels)
|
|
338
|
+
public int width; // Layer width (absolute pixels)
|
|
339
|
+
public int height; // Layer height (absolute pixels)
|
|
340
|
+
public int zOrder; // Layer z-order (1–15, must be unique)
|
|
341
|
+
public V2TXLiveMixInputType inputType; // Input type
|
|
342
|
+
}
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
### V2TXLiveTranscodingConfig - Cloud Stream Mixing MixTranscoding Configuration
|
|
346
|
+
```java
|
|
347
|
+
public final static class V2TXLiveTranscodingConfig {
|
|
348
|
+
public int videoWidth; // Output video width after transcoding
|
|
349
|
+
public int videoHeight; // Output video height after transcoding
|
|
350
|
+
public int videoBitrate; // Output video bitrate after transcoding (Kbps)
|
|
351
|
+
public int videoFramerate; // Output video frame rate after transcoding (fps)
|
|
352
|
+
public int videoGOP; // Keyframe interval (seconds)
|
|
353
|
+
public int backgroundColor; // Mixed screen background color
|
|
354
|
+
public String backgroundImage; // Mixed screen background image
|
|
355
|
+
public int audioSampleRate; // Output audio sample rate after transcoding
|
|
356
|
+
public int audioBitrate; // Output audio bitrate after transcoding (Kbps)
|
|
357
|
+
public int audioChannels; // Output audio channel count after transcoding
|
|
358
|
+
public ArrayList<V2TXLiveMixStream> mixStreams; // Sub-screen layout information
|
|
359
|
+
public String outputStreamId; // Output stream ID for CDN
|
|
360
|
+
}
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
## 7. Local Recording Configuration
|
|
364
|
+
|
|
365
|
+
### V2TXLiveRecordMode - Local Recording Mode
|
|
366
|
+
```java
|
|
367
|
+
public enum V2TXLiveRecordMode {
|
|
368
|
+
/// Record both audio and video
|
|
369
|
+
V2TXLiveRecordModeBoth,
|
|
370
|
+
}
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
### V2TXLiveLocalRecordingParams - Local Recording Parameters
|
|
374
|
+
```java
|
|
375
|
+
public final static class V2TXLiveLocalRecordingParams {
|
|
376
|
+
public String filePath; // Recording file path (required)
|
|
377
|
+
public V2TXLiveRecordMode recordMode; // Recording mode
|
|
378
|
+
public int interval; // Update interval for recording info (ms)
|
|
379
|
+
}
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
## 8. Log Configuration
|
|
383
|
+
|
|
384
|
+
### V2TXLiveLogLevel - Log Level Enumeration
|
|
385
|
+
```java
|
|
386
|
+
public static final class V2TXLiveLogLevel {
|
|
387
|
+
public static final int V2TXLiveLogLevelAll = 0; // Output all log levels
|
|
388
|
+
public static final int V2TXLiveLogLevelDebug = 1; // Output DEBUG and above
|
|
389
|
+
public static final int V2TXLiveLogLevelInfo = 2; // Output INFO and above
|
|
390
|
+
public static final int V2TXLiveLogLevelWarning = 3; // Output WARNING and above
|
|
391
|
+
public static final int V2TXLiveLogLevelError = 4; // Output ERROR and above
|
|
392
|
+
public static final int V2TXLiveLogLevelFatal = 5; // Output only FATAL
|
|
393
|
+
public static final int V2TXLiveLogLevelNULL = 6; // Disable all SDK logs
|
|
394
|
+
}
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
### V2TXLiveLogConfig - Log Configuration
|
|
398
|
+
```java
|
|
399
|
+
public final static class V2TXLiveLogConfig {
|
|
400
|
+
public int logLevel; // Log level
|
|
401
|
+
public boolean enableObserver; // Enable log observer callback
|
|
402
|
+
public boolean enableConsole; // Print logs to console
|
|
403
|
+
public boolean enableLogFile; // Enable local log files
|
|
404
|
+
public String logPath; // Local log directory
|
|
405
|
+
}
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
## 9. Additional Configurations
|
|
409
|
+
|
|
410
|
+
### V2TXLiveSocks5ProxyConfig - SOCKS5 Proxy Configuration
|
|
411
|
+
```java
|
|
412
|
+
public final static class V2TXLiveSocks5ProxyConfig {
|
|
413
|
+
public boolean supportHttps = true; // Enable HTTPS support
|
|
414
|
+
public boolean supportTcp = true; // Enable TCP support
|
|
415
|
+
public boolean supportUdp = true; // Enable UDP support
|
|
416
|
+
}
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
### V2TXLiveStreamInfo - Adaptive Stream Switching Info
|
|
420
|
+
```java
|
|
421
|
+
public final static class V2TXLiveStreamInfo {
|
|
422
|
+
public int width; // Video width
|
|
423
|
+
public int height; // Video height
|
|
424
|
+
public int bitrate; // Bitrate (bps)
|
|
425
|
+
public float framerate; // Frame rate
|
|
426
|
+
public String url; // Stream URL
|
|
427
|
+
}
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
This document details all type definitions in `V2TXLiveDef.java` and serves as a comprehensive API reference for developing with Tencent Cloud Live Streaming.
|