@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,271 @@
|
|
|
1
|
+
# Tencent Cloud Live Streaming SDK V2TXLivePremier API Documentation
|
|
2
|
+
|
|
3
|
+
## Feature Overview
|
|
4
|
+
|
|
5
|
+
`V2TXLivePremier` is the advanced interface for the Tencent Cloud Live Streaming (CSS) SDK, offering global configuration and management for the SDK.
|
|
6
|
+
|
|
7
|
+
**File Path**: `com/tencent/live2/V2TXLivePremier.java`
|
|
8
|
+
**Platform Support**: Android
|
|
9
|
+
**Feature Scope**: SDK initialization, license management, environment configuration
|
|
10
|
+
|
|
11
|
+
## 📋 Table of Contents
|
|
12
|
+
|
|
13
|
+
### 1. [V2TXLivePremier APIs](#v2txlivepremier接口)
|
|
14
|
+
### 2. [V2TXLivePremierObserver Callback Interface](#v2txlivepremierobserver回调接口)
|
|
15
|
+
|
|
16
|
+
## 1. V2TXLivePremier APIs
|
|
17
|
+
|
|
18
|
+
### getSDKVersionStr() - Retrieve SDK Version
|
|
19
|
+
```java
|
|
20
|
+
public static String getSDKVersionStr()
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**Return Value**: Returns the SDK version as a string, for example: "10.7.0.12345"
|
|
24
|
+
|
|
25
|
+
**When to Call**: Can be called at any time
|
|
26
|
+
|
|
27
|
+
**Typical Use Cases**:
|
|
28
|
+
- Checking version compatibility
|
|
29
|
+
- Providing version information for troubleshooting
|
|
30
|
+
- Collecting statistics and monitoring
|
|
31
|
+
|
|
32
|
+
**Example**:
|
|
33
|
+
```java
|
|
34
|
+
String version = V2TXLivePremier.getSDKVersionStr();
|
|
35
|
+
Log.i(TAG, "Current SDK version: " + version);
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### setObserver() - Set Global Callback Interface
|
|
39
|
+
```java
|
|
40
|
+
public static void setObserver(V2TXLivePremierObserver observer)
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**Parameters**:
|
|
44
|
+
- `observer`: An object that implements the V2TXLivePremierObserver interface
|
|
45
|
+
|
|
46
|
+
**When to Call**: Set this during app startup; applies globally
|
|
47
|
+
|
|
48
|
+
**Notes**:
|
|
49
|
+
- Set the observer once at app startup
|
|
50
|
+
- The observer instance must remain valid for the entire app lifecycle
|
|
51
|
+
|
|
52
|
+
### setLogConfig() - Configure Logging
|
|
53
|
+
```java
|
|
54
|
+
public static void setLogConfig(V2TXLiveDef.V2TXLiveLogConfig config)
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**Parameters**:
|
|
58
|
+
- `config`: Log configuration object, including log level, storage path, and other settings
|
|
59
|
+
|
|
60
|
+
**When to Call**: Set during app startup; applies globally
|
|
61
|
+
|
|
62
|
+
**Typical Use Cases**:
|
|
63
|
+
- Enable detailed logs for debugging
|
|
64
|
+
- Reduce log output in production
|
|
65
|
+
- Customize the log storage path
|
|
66
|
+
|
|
67
|
+
**Example**:
|
|
68
|
+
```java
|
|
69
|
+
V2TXLiveLogConfig logConfig = new V2TXLiveDef.V2TXLiveLogConfig();
|
|
70
|
+
logConfig.enableConsole = true;
|
|
71
|
+
logConfig.enableLogFile = true;
|
|
72
|
+
logConfig.enableObserver = true;
|
|
73
|
+
logConfig.logLevel = V2TXLiveLogLevel.V2TXLiveLogLevelAll;
|
|
74
|
+
V2TXLivePremier.setObserver(new V2TXLivePremier.V2TXLivePremierObserver() {
|
|
75
|
+
@Override
|
|
76
|
+
public void onLog(int level, String log) {
|
|
77
|
+
// doSomething
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### setEnvironment() - Set SDK Access Environment
|
|
83
|
+
```java
|
|
84
|
+
public static void setEnvironment(String env)
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**Parameters**:
|
|
88
|
+
- `env`: Environment identifier. Supported values:
|
|
89
|
+
- `"default"`: Default environment; the SDK automatically selects the optimal global access point
|
|
90
|
+
- `"GDPR"`: GDPR environment; audio and video data will not pass through servers in Mainland China
|
|
91
|
+
|
|
92
|
+
**Note**: Only use this API if you have specific requirements
|
|
93
|
+
|
|
94
|
+
### setLicence() - Set SDK License
|
|
95
|
+
|
|
96
|
+
```java
|
|
97
|
+
public static void setLicence(Context context, String url, String key)
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**Parameters**:
|
|
101
|
+
- `context`: Android context
|
|
102
|
+
- `url`: License URL
|
|
103
|
+
- `key`: License key
|
|
104
|
+
|
|
105
|
+
**When to Call**: Must be called during app startup and before starting any streaming or publishing
|
|
106
|
+
|
|
107
|
+
**Documentation**: https://cloud.tencent.com/document/product/454/34750
|
|
108
|
+
|
|
109
|
+
**Example**:
|
|
110
|
+
```java
|
|
111
|
+
public class MyApplication extends Application {
|
|
112
|
+
|
|
113
|
+
@Override
|
|
114
|
+
public void onCreate() {
|
|
115
|
+
super.onCreate();
|
|
116
|
+
V2TXLivePremier.setObserver(new V2TXLivePremierObserver() {
|
|
117
|
+
@Override
|
|
118
|
+
public void onLicenceLoaded(int result, String reason) {
|
|
119
|
+
if (result == 0) {
|
|
120
|
+
Log.i(TAG, "License loaded successfully, " + reason);
|
|
121
|
+
} else if (result == -4) {
|
|
122
|
+
Log.e(TAG, "License package name mismatch, " + reason);
|
|
123
|
+
} else if (result == -11) {
|
|
124
|
+
Log.e(TAG, "License expired, " + reason);
|
|
125
|
+
} else {
|
|
126
|
+
Log.e(TAG, "Other license error, " + reason);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
V2TXLivePremier.setLicence(this, "url", "key");
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### setSocks5Proxy() - Configure Socks5 Proxy
|
|
136
|
+
|
|
137
|
+
```java
|
|
138
|
+
public static void setSocks5Proxy(String host, int port, String username, String password, V2TXLiveDef.V2TXLiveSocks5ProxyConfig config)
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
**Parameters**:
|
|
142
|
+
- `host`: Socks5 proxy server address
|
|
143
|
+
- `port`: Socks5 proxy server port
|
|
144
|
+
- `username`: Proxy server username
|
|
145
|
+
- `password`: Proxy server password
|
|
146
|
+
- `config`: Socks5 proxy configuration
|
|
147
|
+
|
|
148
|
+
**When to Call**: Set during app startup
|
|
149
|
+
|
|
150
|
+
### enableAudioCaptureObserver() - Enable or Disable Audio Capture Callback
|
|
151
|
+
```java
|
|
152
|
+
public static void enableAudioCaptureObserver(boolean enable, V2TXLiveDef.V2TXLiveAudioFrameObserverFormat format)
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
**Parameters**:
|
|
156
|
+
- `enable`: Enable or disable the callback (default: false)
|
|
157
|
+
- `format`: Audio frame callback format
|
|
158
|
+
|
|
159
|
+
**When to Call**: Must be called before `V2TXLivePusher#startPush`
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
### enableAudioPlayoutObserver() - Enable or Disable Final Audio Playback Callback
|
|
164
|
+
```java
|
|
165
|
+
public static void enableAudioPlayoutObserver(boolean enable, V2TXLiveDef.V2TXLiveAudioFrameObserverFormat format)
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
**Parameters**:
|
|
169
|
+
- `enable`: Enable or disable the callback (default: false)
|
|
170
|
+
- `format`: Audio frame callback format
|
|
171
|
+
|
|
172
|
+
**Technical Details**:
|
|
173
|
+
- Audio frame duration is fixed at 0.02s
|
|
174
|
+
- PCM format audio data
|
|
175
|
+
- Callback provides mixed audio data for playback
|
|
176
|
+
|
|
177
|
+
### enableVoiceEarMonitorObserver() - Enable or Disable Ear Monitor Audio Callback
|
|
178
|
+
```java
|
|
179
|
+
public static void enableVoiceEarMonitorObserver(boolean enable)
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
**Parameters**:
|
|
183
|
+
- `enable`: Enable or disable the callback (default: false)
|
|
184
|
+
|
|
185
|
+
### setUserId() - Set User ID
|
|
186
|
+
```java
|
|
187
|
+
public static void setUserId(String userId)
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
**Parameters**:
|
|
191
|
+
- `userId`: User or device ID managed by your application logic
|
|
192
|
+
|
|
193
|
+
**When to Call**: Set during app startup
|
|
194
|
+
|
|
195
|
+
### callExperimentalAPI() - Invoke Experimental API
|
|
196
|
+
```java
|
|
197
|
+
public static int callExperimentalAPI(String jsonStr)
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
**Parameters**:
|
|
201
|
+
- `jsonStr`: JSON string describing the API and its parameters
|
|
202
|
+
|
|
203
|
+
**Return Values**:
|
|
204
|
+
- `V2TXLIVE_OK`: Success
|
|
205
|
+
- `V2TXLIVE_ERROR_INVALID_PARAMETER`: Invalid parameter
|
|
206
|
+
|
|
207
|
+
## 2. V2TXLivePremierObserver Callback Interface
|
|
208
|
+
|
|
209
|
+
### onLog() - Custom Log Callback
|
|
210
|
+
```java
|
|
211
|
+
public void onLog(int level, String log)
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
**Parameters**:
|
|
215
|
+
- `level`: Log level
|
|
216
|
+
- `log`: Log message
|
|
217
|
+
|
|
218
|
+
**Typical Use Cases**:
|
|
219
|
+
- Custom log processing
|
|
220
|
+
- Redirect logs to your own logging system
|
|
221
|
+
- Log filtering and formatting
|
|
222
|
+
|
|
223
|
+
### onLicenceLoaded() - License Load Callback
|
|
224
|
+
```java
|
|
225
|
+
public void onLicenceLoaded(int result, String reason)
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
**Parameters**:
|
|
229
|
+
- `result`: Result code (0 for success, negative values indicate failure)
|
|
230
|
+
- `reason`: Reason for failure
|
|
231
|
+
|
|
232
|
+
### onCaptureAudioFrame() - Local Microphone Audio Callback
|
|
233
|
+
```java
|
|
234
|
+
public void onCaptureAudioFrame(V2TXLiveDef.V2TXLiveAudioFrame frame)
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
**Parameters**:
|
|
238
|
+
- `frame`: Audio data frame
|
|
239
|
+
|
|
240
|
+
**Important Notes**:
|
|
241
|
+
- Avoid time-consuming operations in this callback
|
|
242
|
+
- Audio data can be modified
|
|
243
|
+
- Frame duration is fixed at 0.02s
|
|
244
|
+
- Does not include background music, sound effects, or other pre-processing
|
|
245
|
+
- Ultra-low latency
|
|
246
|
+
|
|
247
|
+
### onPlayoutAudioFrame() - Mixed Audio Playback Callback
|
|
248
|
+
```java
|
|
249
|
+
public void onPlayoutAudioFrame(V2TXLiveDef.V2TXLiveAudioFrame frame)
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
**Parameters**:
|
|
253
|
+
- `frame`: PCM format audio data frame
|
|
254
|
+
|
|
255
|
+
**Important Notes**:
|
|
256
|
+
- Frame duration is fixed at 0.02s
|
|
257
|
+
- Data is readable and writable; ensure timely processing
|
|
258
|
+
- Does not include ear monitor audio data
|
|
259
|
+
|
|
260
|
+
### onVoiceEarMonitorAudioFrame() - Ear Monitor Audio Callback
|
|
261
|
+
|
|
262
|
+
```java
|
|
263
|
+
public void onVoiceEarMonitorAudioFrame(V2TXLiveDef.V2TXLiveAudioFrame frame)
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
**Parameters**:
|
|
267
|
+
- `frame`: PCM format audio data frame
|
|
268
|
+
|
|
269
|
+
**Important Notes**:
|
|
270
|
+
- Frame duration may vary
|
|
271
|
+
- Data is readable and writable; ensure timely processing
|