@volcengine/react-native-live-push 1.0.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.
Files changed (54) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +2 -0
  3. package/android/build.gradle +92 -0
  4. package/android/gradle.properties +5 -0
  5. package/android/src/main/AndroidManifest.xml +16 -0
  6. package/android/src/main/AndroidManifestNew.xml +16 -0
  7. package/android/src/main/java/com/volcengine/velive/rn/push/ExternalSourceHelper.java +58 -0
  8. package/android/src/main/java/com/volcengine/velive/rn/push/NativeVariableManager.java +19 -0
  9. package/android/src/main/java/com/volcengine/velive/rn/push/ScreenCaptureHelper.java +73 -0
  10. package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushModule.java +182 -0
  11. package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushModuleSpec.java +16 -0
  12. package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushPackage.java +27 -0
  13. package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushView.java +45 -0
  14. package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushViewManager.java +87 -0
  15. package/ios/VeLivePushSDK.h +24 -0
  16. package/ios/VeLivePushSDK.m +109 -0
  17. package/ios/VeLivePushView.h +24 -0
  18. package/ios/VeLivePushView.m +74 -0
  19. package/ios/VeLivePushViewManager.m +59 -0
  20. package/lib/commonjs/index.js +24238 -0
  21. package/lib/module/index.js +24186 -0
  22. package/lib/typescript/android/index.d.ts +44 -0
  23. package/lib/typescript/codegen/android/api.d.ts +1408 -0
  24. package/lib/typescript/codegen/android/callback.d.ts +265 -0
  25. package/lib/typescript/codegen/android/errorcode.d.ts +50 -0
  26. package/lib/typescript/codegen/android/index.d.ts +5 -0
  27. package/lib/typescript/codegen/android/keytype.d.ts +1069 -0
  28. package/lib/typescript/codegen/android/types.d.ts +32 -0
  29. package/lib/typescript/codegen/ios/api.d.ts +1133 -0
  30. package/lib/typescript/codegen/ios/callback.d.ts +251 -0
  31. package/lib/typescript/codegen/ios/errorcode.d.ts +104 -0
  32. package/lib/typescript/codegen/ios/index.d.ts +5 -0
  33. package/lib/typescript/codegen/ios/keytype.d.ts +934 -0
  34. package/lib/typescript/codegen/ios/types.d.ts +35 -0
  35. package/lib/typescript/codegen/pack/api.d.ts +1923 -0
  36. package/lib/typescript/codegen/pack/callback.d.ts +545 -0
  37. package/lib/typescript/codegen/pack/errorcode.d.ts +174 -0
  38. package/lib/typescript/codegen/pack/index.d.ts +5 -0
  39. package/lib/typescript/codegen/pack/keytype.d.ts +1953 -0
  40. package/lib/typescript/codegen/pack/types.d.ts +1 -0
  41. package/lib/typescript/codegen/type-shim.d.ts +6 -0
  42. package/lib/typescript/component.d.ts +8 -0
  43. package/lib/typescript/core/api.d.ts +2 -0
  44. package/lib/typescript/core/callback.d.ts +2 -0
  45. package/lib/typescript/core/env.d.ts +29 -0
  46. package/lib/typescript/core/errorcode.d.ts +2 -0
  47. package/lib/typescript/core/index.d.ts +6 -0
  48. package/lib/typescript/core/keytype.d.ts +7 -0
  49. package/lib/typescript/core/pusher.d.ts +16 -0
  50. package/lib/typescript/index.d.ts +2 -0
  51. package/lib/typescript/ios/extends.d.ts +41 -0
  52. package/lib/typescript/runtime.d.ts +1 -0
  53. package/package.json +31 -0
  54. package/react-native-velive-push.podspec +45 -0
@@ -0,0 +1,1069 @@
1
+ import { int, double, String, ArrayList, float, long } from './types';
2
+ export declare class VeLiveVideoEncoderConfiguration {
3
+ /** {zh}
4
+ * @detail api
5
+ * @brief 获取推流视频分辨率。
6
+ * @return <br>
7
+ * 推流视频分辨率 {@link #VeLiveVideoResolution VeLiveVideoResolution}。
8
+ */
9
+ getResolution(): VeLiveVideoResolution;
10
+ /** {zh}
11
+ * @detail api
12
+ * @brief 设置推流视频分辨率。
13
+ * @param resolution 推流视频分辨率,默认值为 VeLiveVideoResolution720P,详情请参见 {@link #VeLiveVideoResolution VeLiveVideoResolution}
14
+ * @return <br>
15
+ * 推流视频编码参数配置对象,详情请参见 {@link #VeLiveVideoEncoderConfiguration VeLiveVideoEncoderConfiguration}。
16
+ */
17
+ setResolution(resolution: VeLiveVideoResolution): VeLiveVideoEncoderConfiguration;
18
+ /** {zh}
19
+ * @detail api
20
+ * @brief 获取推流视频编码格式。
21
+ * @return <br>
22
+ * 推流视频编码格式,详情请参见 {@link #VeLiveVideoCodec VeLiveVideoCodec}。
23
+ */
24
+ getCodec(): VeLiveVideoCodec;
25
+ /** {zh}
26
+ * @detail api
27
+ * @brief 设置推流视频编码格式。
28
+ * @return 推流视频编码参数,详见 [VeLiveVideoEncoderConfiguration](147521#velivevideoencoderconfiguration)。
29
+ * @param codec <br>推流视频编码格式,详情请参见 [VeLiveVideoCodec](147521#VeLiveVideoCodec) 。
30
+ */
31
+ setCodec(codec: VeLiveVideoCodec): VeLiveVideoEncoderConfiguration;
32
+ /** {zh}
33
+ * @detail api
34
+ * @brief 获取推流视频编码码率。
35
+ * @return <br>
36
+ * 推流视频编码码率。
37
+ */
38
+ getBitrate(): int;
39
+ /** {zh}
40
+ * @detail api
41
+ * @brief 设置推流视频编码码率。
42
+ * @param bitrate 推流视频编码码率,单位为 kbps,默认值由 `resolution` 参数值决定。
43
+ * @return <br>
44
+ * 推流视频编码参数配置对象,详情请参见 {@link #VeLiveVideoEncoderConfiguration VeLiveVideoEncoderConfiguration}。
45
+ */
46
+ setBitrate(bitrate: int): VeLiveVideoEncoderConfiguration;
47
+ /** {zh}
48
+ * @detail api
49
+ * @brief 获取推流视频编码最小码率。
50
+ * @return <br>
51
+ * 推流视频编码最小码率。
52
+ */
53
+ getMinBitrate(): int;
54
+ /** {zh}
55
+ * @detail api
56
+ * @brief 设置推流视频编码最小码率。
57
+ * @param minBitrate 推流视频编码最小码率,单位为 kbps,默认值由 `resolution` 参数值决定;如果开启自适应码率,推流 SDK 根据网络情况进行编码码率自适应调整的最小码率
58
+ * @return <br>
59
+ * 推流视频编码参数配置对象,详情请参见 {@link #VeLiveVideoEncoderConfiguration VeLiveVideoEncoderConfiguration}。
60
+ */
61
+ setMinBitrate(minBitrate: int): VeLiveVideoEncoderConfiguration;
62
+ /** {zh}
63
+ * @detail api
64
+ * @brief 获取推流视频编码最大码率。
65
+ * @return <br>
66
+ * 推流视频编码最大码率。
67
+ */
68
+ getMaxBitrate(): int;
69
+ /** {zh}
70
+ * @detail api
71
+ * @brief 设置推流视频编码最大码率。
72
+ * @return <br>
73
+ * 推流视频编码参数配置对象,详情请参见 {@link #VeLiveVideoEncoderConfiguration VeLiveVideoEncoderConfiguration}。
74
+ * @param maxBitrate 推流视频编码最大码率,单位为 kbps,默认值由 `resolution` 参数值决定;如果开启自适应码率,推流 SDK 根据网络情况进行编码码率自适应调整的最大码率。
75
+ */
76
+ setMaxBitrate(maxBitrate: int): VeLiveVideoEncoderConfiguration;
77
+ /** {zh}
78
+ * @detail api
79
+ * @brief 获取推流视频编码 GOP。
80
+ * @return <br>
81
+ * 推流视频编码 GOP。
82
+ */
83
+ getGopSize(): int;
84
+ /** {zh}
85
+ * @detail api
86
+ * @brief 设置推流视频编码 GOP。
87
+ * @param gopSize 视频 GOP 大小,单位为 s,默认值为 2
88
+ * @return <br>
89
+ * 推流视频编码参数配置对象,详情请参见 {@link #VeLiveVideoEncoderConfiguration VeLiveVideoEncoderConfiguration}。
90
+ */
91
+ setGopSize(gopSize: int): VeLiveVideoEncoderConfiguration;
92
+ /** {zh}
93
+ * @detail api
94
+ * @brief 获取推流视频编码帧率。
95
+ * @return <br>
96
+ * 推流视频编码帧率。
97
+ */
98
+ getFps(): int;
99
+ /** {zh}
100
+ * @detail api
101
+ * @brief 设置推流视频编码帧率。
102
+ * @param fps 视频编码帧率,单位为 fps,默认值为 15
103
+ * @return <br>
104
+ * 推流视频编码参数配置对象,详情请参见 {@link #VeLiveVideoEncoderConfiguration VeLiveVideoEncoderConfiguration}。
105
+ */
106
+ setFps(fps: int): VeLiveVideoEncoderConfiguration;
107
+ /** {zh}
108
+ * @detail api
109
+ * @brief 获取是否开启 B 帧。
110
+ * @return <br>
111
+ * 是否开启B帧。<br>
112
+ * - true:B 帧开启;
113
+ * - false:B 帧关闭。
114
+ */
115
+ isEnableBFrame(): boolean;
116
+ /** {zh}
117
+ * @detail api
118
+ * @brief 设置推流视频编码开启 B 帧。
119
+ * @param enableBFrame 是否开启 B 帧。默认为 false。 <br>
120
+ * - true:开启;
121
+ * - false:关闭。
122
+ * @return <br>
123
+ * 推流视频编码参数配置对象,详情请参见 {@link #VeLiveVideoEncoderConfiguration VeLiveVideoEncoderConfiguration}。
124
+ */
125
+ setEnableBFrame(enableBFrame: boolean): VeLiveVideoEncoderConfiguration;
126
+ /** {zh}
127
+ * @detail api
128
+ * @brief 获取是否开启硬件编码。
129
+ * @return <br>
130
+ * 是否开启硬件编码。<br>
131
+ * - true:开启;
132
+ * - false:关闭。
133
+ */
134
+ isEnableAccelerate(): boolean;
135
+ /** {zh}
136
+ * @detail api
137
+ * @brief 设置推流视频编码开启硬件编码。
138
+ * @param enableAccelerate 是否开启硬件编码。默认值为 true。 <br>
139
+ * - true:开启;
140
+ * - false:关闭。
141
+ * @return <br>
142
+ * 推流视频编码参数配置对象,详情请参见 {@link #VeLiveVideoEncoderConfiguration VeLiveVideoEncoderConfiguration}。
143
+ */
144
+ setEnableAccelerate(enableAccelerate: boolean): VeLiveVideoEncoderConfiguration;
145
+ }
146
+ export declare enum VeLiveAudioCodec {
147
+ /** {zh}
148
+ * @brief FDKAAC 编码。
149
+ */
150
+ VeLiveAudioCodecFdkAAC = 0,
151
+ /** {zh}
152
+ * @brief Mediacodec AAC 编码。
153
+ */
154
+ VeLiveAudioCodecMediaCodecAAC = 1,
155
+ /** {zh}
156
+ * @brief FFMPEG AAC 编码。
157
+ */
158
+ VeLiveAudioCodecFFmpegAAC = 2
159
+ }
160
+ export declare enum VeLiveVideoCodec {
161
+ /** {zh}
162
+ * @brief 使用 H.264 视频编码。
163
+ */
164
+ VeLiveVideoCodecH264 = 0,
165
+ /** {zh}
166
+ * @brief 使用火山引擎自研 ByteVC1 视频编码。
167
+ */
168
+ VeLiveVideoCodecByteVC1 = 1
169
+ }
170
+ export declare class VeLivePusherStatistics {
171
+ /** {zh}
172
+ * @brief 视频编码宽度,单位为 px。
173
+ */
174
+ encodeWidth: int;
175
+ /** {zh}
176
+ * @brief 视频编码高度,单位为 px。
177
+ */
178
+ encodeHeight: int;
179
+ /** {zh}
180
+ * @brief 视频采集宽度,单位为 px。
181
+ */
182
+ captureWidth: int;
183
+ /** {zh}
184
+ * @brief 视频采集高度,单位为 px。
185
+ */
186
+ captureHeight: int;
187
+ /** {zh}
188
+ * @brief 视频采集帧率,单位为 fps。
189
+ */
190
+ captureFps: double;
191
+ /** {zh}
192
+ * @brief 视频编码帧率,单位为 fps。
193
+ */
194
+ encodeFps: double;
195
+ /** {zh}
196
+ * @brief 视频发送帧率,可用展示实时帧率,单位为 fps。
197
+ */
198
+ transportFps: double;
199
+ /** {zh}
200
+ * @brief 视频推流帧率,即您通过 [setVideoEncoderConfiguration](147517#VeLivePusher-setvideoencoderconfiguration) 方法设置的帧率,单位为 fps。
201
+ */
202
+ fps: int;
203
+ /** {zh}
204
+ * @brief 视频推流码率,即您通过 [setVideoEncoderConfiguration](147517#VeLivePusher-setvideoencoderconfiguration) 方法设置的码率,单位为 kbps。
205
+ */
206
+ videoBitrate: int;
207
+ /** {zh}
208
+ * @brief 视频推流最小码率,即您通过 [setVideoEncoderConfiguration](147517#VeLivePusher-setvideoencoderconfiguration) 方法设置的最小码率,单位为 kbps。
209
+ */
210
+ minVideoBitrate: int;
211
+ /** {zh}
212
+ * @brief 视频推流最大码率,即您通过 [setVideoEncoderConfiguration](147517#VeLivePusher-setvideoencoderconfiguration) 方法设置的最大码率,单位为 kbps。
213
+ */
214
+ maxVideoBitrate: int;
215
+ /** {zh}
216
+ * @brief 视频编码码率,单位为 kbps。
217
+ */
218
+ encodeVideoBitrate: double;
219
+ /** {zh}
220
+ * @brief 视频发送码率,可用于展示实时码率,单位为 kbps。
221
+ */
222
+ transportVideoBitrate: double;
223
+ /** {zh}
224
+ * @brief 音频编码码率,单位为 kbps。
225
+ */
226
+ encodeAudioBitrate: double;
227
+ /** {zh}
228
+ * @brief 推流地址。
229
+ */
230
+ url: String;
231
+ /** {zh}
232
+ * @brief 视频编码格式。
233
+ */
234
+ codec: String;
235
+ }
236
+ export declare enum VeLivePusherRenderMode {
237
+ /** {zh}
238
+ * @brief 视频帧自适应画布。视频帧非等比缩放,直至画布被填满。在此过程中,视频帧的长宽比例可能会发生变化。
239
+ */
240
+ VeLivePusherRenderModeFill = 0,
241
+ /** {zh}
242
+ * @brief 视频帧内容全部显示优先。视频尺寸等比缩放,优先保证视频内容全部显示。当视频尺寸与显示窗口尺寸不一致时,会把窗口未被填满的区域填充成背景颜色。
243
+ */
244
+ VeLivePusherRenderModeFit = 1,
245
+ /** {zh}
246
+ * @brief 视窗填满优先。视频帧等比缩放,直至视窗被视频填满。如果视频帧长宽比例与视窗不同,视频帧的多出部分将无法显示。
247
+ */
248
+ VeLivePusherRenderModeHidden = 2
249
+ }
250
+ export declare enum VeLiveVideoEffectLicenseType {
251
+ /** {zh}
252
+ * @brief 离线认证视频特效许可证。
253
+ */
254
+ VeLiveVideoEffectLicenseTypeOffLine = 0,
255
+ /** {zh}
256
+ * @brief 在线认证视频特效许可证。
257
+ */
258
+ VeLiveVideoEffectLicenseTypeOnLine = 1
259
+ }
260
+ export declare enum VeLiveAudioBufferType {
261
+ /** {zh}
262
+ * @brief 未知的音频数据类型。
263
+ */
264
+ VeLiveAudioBufferTypeUnknown = 0,
265
+ /** {zh}
266
+ * @brief ByteBuffer 音频数据类型。
267
+ */
268
+ VeLiveAudioBufferTypeByteBuffer = 1
269
+ }
270
+ export declare enum VeLiveAudioChannel {
271
+ /** {zh}
272
+ * @brief 单声道,适用于语音通信,节省带宽。
273
+ */
274
+ VeLiveAudioChannelMono = 0,
275
+ /** {zh}
276
+ * @brief 立体声,适用于音乐播放,提供更丰富的音频体验。
277
+ */
278
+ VeLiveAudioChannelStereo = 1
279
+ }
280
+ export declare enum VeLiveFirstFrameType {
281
+ /** {zh}
282
+ * @brief 视频/音频采集首帧,采集首帧是从音频设备或视频设备(如麦克风、摄像头)获取的第一帧数据。
283
+ */
284
+ VeLiveFirstCaptureFrame = 0,
285
+ /** {zh}
286
+ * @brief 视频渲染首帧,渲染首帧是在渲染过程中在屏幕上显示的第一帧视频数据。
287
+ */
288
+ VeLiveFirstRenderFrame = 1,
289
+ /** {zh}
290
+ * @brief 视频/音频编码完成首帧,编码完成首帧是编码为某种特定格式的第一帧数据。
291
+ */
292
+ VeLiveFirstEncodedFrame = 2,
293
+ /** {zh}
294
+ * @brief 视频/音频发送首帧,发送首帧是在发送过程中,通过网络传输的第一帧数据。
295
+ */
296
+ VeLiveFirstSendFrame = 3
297
+ }
298
+ export declare enum VeLiveVideoFluencyLevel {
299
+ /** {zh}
300
+ * @brief 流畅,帧率能达到预设的目标帧率
301
+ */
302
+ VeLiveVideoFluencyLevelSmooth = 0,
303
+ /** {zh}
304
+ * @brief 一般卡顿,帧率比预设的目标帧率低 1fps~3fps
305
+ */
306
+ VeLiveVideoFluencyLevelSluggish = 1,
307
+ /** {zh}
308
+ * @brief 严重卡顿,帧率比预设的目标帧率低 4fps 以上
309
+ */
310
+ VeLiveVideoFluencyLevelBlocked = 2
311
+ }
312
+ export declare enum VeLiveVideoCaptureType {
313
+ /** {zh}
314
+ * @brief 使用前置摄像头进行视频采集。
315
+ */
316
+ VeLiveVideoCaptureFrontCamera = 0,
317
+ /** {zh}
318
+ * @brief 使用后置摄像头进行视频采集。
319
+ */
320
+ VeLiveVideoCaptureBackCamera = 1,
321
+ /** {zh}
322
+ * @brief 使用设备的双摄进行视频采集。
323
+ */
324
+ VeLiveVideoCaptureDualCamera = 2,
325
+ /** {zh}
326
+ * @brief 使用屏幕采集。
327
+ */
328
+ VeLiveVideoCaptureScreen = 3,
329
+ /** {zh}
330
+ * @brief 使用外部设备或源进行视频采集。
331
+ */
332
+ VeLiveVideoCaptureExternal = 4,
333
+ /** {zh}
334
+ * @brief 使用指定的静态图片作为视频源。
335
+ */
336
+ VeLiveVideoCaptureCustomImage = 5,
337
+ /** {zh}
338
+ * @brief 使用最近采集的一帧图像重复作为视频源。
339
+ */
340
+ VeLiveVideoCaptureLastFrame = 6,
341
+ /** {zh}
342
+ * @brief 使用黑色帧作为视频源,一般用于调试或特殊需求。
343
+ */
344
+ VeLiveVideoCaptureDummyFrame = 7
345
+ }
346
+ export declare enum VeLiveVideoProfile {
347
+ /** {zh}
348
+ * @brief 未知的视频配置类型。
349
+ */
350
+ VeLiveVideoProfileUnknown = 0,
351
+ /** {zh}
352
+ * @brief H.264 编码配置,使用 Baseline 级别。
353
+ */
354
+ VeLiveVideoProfileH264Baseline = 1,
355
+ /** {zh}
356
+ * @brief H.264 编码配置,使用 Main 级别。
357
+ */
358
+ VeLiveVideoProfileH264Main = 2,
359
+ /** {zh}
360
+ * @brief H.264 编码配置,使用 High 级别。
361
+ */
362
+ VeLiveVideoProfileH264High = 3,
363
+ /** {zh}
364
+ * @brief ByteVC1 编码配置,使用 Main 级别。
365
+ */
366
+ VeLiveVideoProfileByteVC1Main = 4
367
+ }
368
+ export declare enum VeLiveVideoRotation {
369
+ /** {zh}
370
+ * @brief 不旋转。
371
+ */
372
+ VeLiveVideoRotation0 = 0,
373
+ /** {zh}
374
+ * @brief 顺时针旋转 90 度。
375
+ */
376
+ VeLiveVideoRotation90 = 1,
377
+ /** {zh}
378
+ * @brief 顺时针旋转 180 度。
379
+ */
380
+ VeLiveVideoRotation180 = 2,
381
+ /** {zh}
382
+ * @brief 顺时针旋转 270 度。
383
+ */
384
+ VeLiveVideoRotation270 = 3
385
+ }
386
+ export declare enum VeLiveVideoFrameSource {
387
+ /** {zh}
388
+ * @brief 采集到的原始视频帧。这是从设备的摄像头或其他视频输入源获取的视频帧。
389
+ */
390
+ VeLiveVideoFrameSourceCapture = 1,
391
+ /** {zh}
392
+ * @brief 编码前的视频帧。这是通过各种处理(例如滤镜、旋转等)后,准备进行编码的视频帧。
393
+ */
394
+ VeLiveVideoFrameSourcePreEncode = "1 << 1"
395
+ }
396
+ export declare enum VeLiveAudioProfile {
397
+ /** {zh}
398
+ * @brief LC-AAC 编码方式。
399
+ */
400
+ VeLiveAudioAACProfileLC = 0,
401
+ /** {zh}
402
+ * @brief HEv1-AAC 编码方式。
403
+ */
404
+ VeLiveAudioAACProfileHEv1 = 1,
405
+ /** {zh}
406
+ * @brief HEv2-AAC 编码方式。
407
+ */
408
+ VeLiveAudioAACProfileHEv2 = 2
409
+ }
410
+ export declare enum VeLiveVideoBufferType {
411
+ /** {zh}
412
+ * @brief 未知视频数据类型,当未指定输入视频数据的格式时,会默认为此类型。
413
+ */
414
+ VeLiveVideoBufferTypeUnknown = 0,
415
+ /** {zh}
416
+ * @brief 视频数据类型为 OpenGL 纹理。
417
+ */
418
+ VeLiveVideoBufferTypeTexture = 1,
419
+ /** {zh}
420
+ * @brief 视频数据类型为 ByteBuffer 类型。
421
+ */
422
+ VeLiveVideoBufferTypeByteBuffer = 2,
423
+ /** {zh}
424
+ * @brief 视频数据类型为 ByteArray 类型。
425
+ */
426
+ VeLiveVideoBufferTypeByteArray = 3
427
+ }
428
+ export declare class VeLiveAudioCaptureConfiguration {
429
+ /** {zh}
430
+ * @detail api
431
+ * @brief 获取采集音频采样率。
432
+ * @return <br>
433
+ * 音频采样率,详情请参见 {@link #VeLiveAudioSampleRate VeLiveAudioSampleRate}。
434
+ */
435
+ getSampleRate(): VeLiveAudioSampleRate;
436
+ /** {zh}
437
+ * @detail api
438
+ * @brief 设置采集音频采样率。
439
+ * @return <br>推流音频采集参数配置对象,详情请参见 [VeLiveAudioCaptureConfiguration](#VeLiveAudioCaptureConfiguration)
440
+ * @param sampleRate 音频采样率,默认值为 VeLiveAudioSampleRate44100,详情请参见 [VeLiveAudioSampleRate](147521#VeLiveAudioSampleRate)。
441
+ */
442
+ setSampleRate(sampleRate: VeLiveAudioSampleRate): VeLiveAudioCaptureConfiguration;
443
+ /** {zh}
444
+ * @detail api
445
+ * @brief 获取采集音频声道数。
446
+ * @return <br>
447
+ * 音频声道数,详情请参见 {@link #VeLiveAudioChannel VeLiveAudioChannel}。
448
+ */
449
+ getChannel(): VeLiveAudioChannel;
450
+ /** {zh}
451
+ * @detail api
452
+ * @brief 设置采集音频声道数。
453
+ * @return <br>推流音频采集参数配置对象,详情请参见 [VeLiveAudioCaptureConfiguration](#VeLiveAudioCaptureConfiguration)。
454
+ * @param channel 音频声道数,默认值为 VeLiveAudioChannelStereo,详情请参见 {@link #VeLiveAudioChannel VeLiveAudioChannel}
455
+ */
456
+ setChannel(channel: VeLiveAudioChannel): VeLiveAudioCaptureConfiguration;
457
+ }
458
+ export declare class VeLiveStreamMixDescription {
459
+ /** {zh}
460
+ * @brief 视频混流布局设置的数组,其中每个元素代表一路视频流的布局。详情请参见 {@link #VeLiveMixVideoLayout VeLiveMixVideoLayout}。
461
+ */
462
+ mixVideoStreams: ArrayList<VeLiveMixVideoLayout>;
463
+ /** {zh}
464
+ * @brief 音频混流设置的数组,其中每个元素代表一路音频流的。详情请参见 [VeLiveMixAudioLayout](#VeLiveMixAudioLayout)。
465
+ */
466
+ mixAudioStreams: ArrayList<VeLiveMixAudioLayout>;
467
+ /** {zh}
468
+ * @brief 视频混流画布的背景色设置,采用 #RRGGBB 格式。
469
+ */
470
+ backgroundColor: String;
471
+ }
472
+ export declare enum VeLiveAudioSampleRate {
473
+ /** {zh}
474
+ * @brief 8k 采样。
475
+ */
476
+ VeLiveAudioSampleRate8000 = 0,
477
+ /** {zh}
478
+ * @brief 16k 采样。
479
+ */
480
+ VeLiveAudioSampleRate16000 = 1,
481
+ /** {zh}
482
+ * @brief 32k 采样。
483
+ */
484
+ VeLiveAudioSampleRate32000 = 2,
485
+ /** {zh}
486
+ * @brief 44.1k 采样。
487
+ */
488
+ VeLiveAudioSampleRate44100 = 3,
489
+ /** {zh}
490
+ * @brief 48k 采样。
491
+ */
492
+ VeLiveAudioSampleRate48000 = 4
493
+ }
494
+ export declare enum VeLiveAudioPowerLevel {
495
+ /** {zh}
496
+ * @brief 无声,音量 ≤1db。
497
+ */
498
+ VeLiveAudioPowerLevelSilent = 0,
499
+ /** {zh}
500
+ * @brief 安静,音量 15db 以下。
501
+ */
502
+ VeLiveAudioPowerLevelQuiet = 1,
503
+ /** {zh}
504
+ * @brief 轻声,接近耳语音量,音量为 16db~30db 之间。
505
+ */
506
+ VeLiveAudioPowerLevelLight = 2,
507
+ /** {zh}
508
+ * @brief 正常,音量适宜,类似正常对话的音量,音量为 30db~60db 之间。
509
+ */
510
+ VeLiveAudioPowerLevelNormal = 3,
511
+ /** {zh}
512
+ * @brief 较大,音量较高,类似咖啡馆、餐厅的环境噪音,音量为 61db~85db 之间。
513
+ */
514
+ VeLiveAudioPowerLevelLoud = 4,
515
+ /** {zh}
516
+ * @brief 吵闹,音量极高,类似于繁忙的街道或者是音乐会现场,音量超过 85db。
517
+ */
518
+ VeLiveAudioPowerLevelNoise = 5
519
+ }
520
+ export declare class VeLiveVideoCaptureConfiguration {
521
+ /** {zh}
522
+ * @detail api
523
+ * @brief 获取采集视频宽度。
524
+ * @return <br>
525
+ * 采集视频宽度。
526
+ */
527
+ getWidth(): int;
528
+ /** {zh}
529
+ * @detail api
530
+ * @brief 设置采集视频宽度。
531
+ * @return <br>推流视频采集参数配置对象,详情请参见 [VeLiveVideoCaptureConfiguration](#VeLiveVideoCaptureConfiguration)。
532
+ * @param width 采集视频宽度,默认值为 720。
533
+ */
534
+ setWidth(width: int): VeLiveVideoCaptureConfiguration;
535
+ /** {zh}
536
+ * @detail api
537
+ * @brief 获取采集视频高度。
538
+ * @return <br>
539
+ * 采集视频高度。
540
+ */
541
+ getHeight(): int;
542
+ /** {zh}
543
+ * @detail api
544
+ * @brief 设置采集视频高度。
545
+ * @return <br>推流视频采集参数配置对象,详情请参见 [VeLiveVideoCaptureConfiguration](#VeLiveVideoCaptureConfiguration)。
546
+ * @param height 采集视频高度,默认值为 1280。
547
+ */
548
+ setHeight(height: int): VeLiveVideoCaptureConfiguration;
549
+ /** {zh}
550
+ * @detail api
551
+ * @brief 获取采集视频帧率。
552
+ * @return <br>
553
+ * 采集视频帧率。
554
+ */
555
+ getFps(): int;
556
+ /** {zh}
557
+ * @detail api
558
+ * @brief 设置采集视频帧率。
559
+ * @return <br>推流视频采集参数配置对象,详情请参见 [VeLiveVideoCaptureConfiguration](#VeLiveVideoCaptureConfiguration)。
560
+ * @param fps 采集视频帧率,默认值为 15。
561
+ */
562
+ setFps(fps: int): VeLiveVideoCaptureConfiguration;
563
+ }
564
+ export declare enum VeLivePixelFormat {
565
+ /** {zh}
566
+ * @brief 未知格式。
567
+ */
568
+ VeLivePixelFormatUnknown = 0,
569
+ /** {zh}
570
+ * @brief I420 格式。
571
+ */
572
+ VeLivePixelFormatI420 = 1,
573
+ /** {zh}
574
+ * @brief NV12 格式。
575
+ */
576
+ VeLivePixelFormatNV12 = 2,
577
+ /** {zh}
578
+ * @brief NV21 格式。
579
+ */
580
+ VeLivePixelFormatNV21 = 3,
581
+ /** {zh}
582
+ * @brief 2D 纹理格式。
583
+ */
584
+ VeLivePixelFormat2DTexture = 4,
585
+ /** {zh}
586
+ * @brief OES 纹理格式。
587
+ */
588
+ VeLivePixelFormatOesTexture = 5
589
+ }
590
+ export declare enum VeLivePusherStatus {
591
+ /** {zh}
592
+ * @brief 初始状态。
593
+ */
594
+ VeLivePushStatusNone = 0,
595
+ /** {zh}
596
+ * @brief 正在连接服务器。
597
+ */
598
+ VeLivePushStatusConnecting = 1,
599
+ /** {zh}
600
+ * @brief 连接服务器成功。
601
+ */
602
+ VeLivePushStatusConnectSuccess = 2,
603
+ /** {zh}
604
+ * @brief 重连服务器中。
605
+ */
606
+ VeLivePushStatusReconnecting = 3,
607
+ /** {zh}
608
+ * @brief 推流连接被终止。
609
+ */
610
+ VeLivePushStatusConnectStop = 4,
611
+ /** {zh}
612
+ * @brief 推流连接失败。
613
+ */
614
+ VeLivePushStatusConnectError = 5,
615
+ /** {zh}
616
+ * @brief 与服务器断开连接。
617
+ */
618
+ VeLivePushStatusDisconnected = 6
619
+ }
620
+ export declare enum VeLiveVideoResolution {
621
+ /** {zh}
622
+ * @brief 360P 分辨率。档位详细配置如下所示。
623
+ * - 横屏分辨率:640x360
624
+ * - 竖屏分辨率:360x640
625
+ * - 帧率:15fps
626
+ * - 目标码率:500kbps
627
+ * - 最小码率:250kbps
628
+ * - 最大码率:800kbps
629
+ */
630
+ VeLiveVideoResolution360P = "VeLiveVideoResolution360P",
631
+ /** {zh}
632
+ * @brief 480P 分辨率。档位详细配置如下所示。
633
+ * - 横屏分辨率:864x480
634
+ * - 竖屏分辨率:480x864
635
+ * - 帧率:15fps
636
+ * - 目标码率:800kbps
637
+ * - 最小码率:320kbps
638
+ * - 最大码率:1266kbps
639
+ */
640
+ VeLiveVideoResolution480P = "VeLiveVideoResolution480P",
641
+ /** {zh}
642
+ * @brief 540P 分辨率。档位详细配置如下所示。
643
+ * - 横屏 960x540
644
+ * - 竖屏 540x960
645
+ * - 帧率:15fps
646
+ * - 目标码率:1000kbps
647
+ * - 最小码率:500kbps
648
+ * - 最大码率:1520kbps
649
+ */
650
+ VeLiveVideoResolution540P = "VeLiveVideoResolution540P",
651
+ /** {zh}
652
+ * @brief 720P 分辨率。档位详细配置如下所示。
653
+ * - 横屏 1280x720
654
+ * - 竖屏 720x1280
655
+ * - 帧率:15fps
656
+ * - 目标码率:1200kbps
657
+ * - 最小码率:800kbps
658
+ * - 最大码率:1900kbps
659
+ */
660
+ VeLiveVideoResolution720P = "VeLiveVideoResolution720P",
661
+ /** {zh}
662
+ * @brief 1080P 分辨率。档位详细配置如下所示。
663
+ * - 横屏 1920x1080
664
+ * - 竖屏 1080x1920
665
+ * - 帧率:20 fps
666
+ * - 目标码率:2500kbps
667
+ * - 最小码率:1000kbps
668
+ * - 最大码率:3800kbps
669
+ */
670
+ VeLiveVideoResolution1080P = "VeLiveVideoResolution1080P"
671
+ }
672
+ export declare enum VeLiveNetworkQuality {
673
+ /** {zh}
674
+ * @brief 未查询到网络状态。
675
+ */
676
+ VeLiveNetworkQualityUnknown = 0,
677
+ /** {zh}
678
+ * @brief 网络差。
679
+ */
680
+ VeLiveNetworkQualityBad = 1,
681
+ /** {zh}
682
+ * @brief 网络一般。
683
+ */
684
+ VeLiveNetworkQualityPoor = 2,
685
+ /** {zh}
686
+ * @brief 网络状态佳。
687
+ */
688
+ VeLiveNetworkQualityGood = 3
689
+ }
690
+ export declare enum VeLivePusherLogLevel {
691
+ /** {zh}
692
+ * @brief 输出 VERBOSE、DEBUG、INFO、WARNING 和 ERROR 级别的日志。
693
+ */
694
+ VeLiveLogLevelVerbose = 0,
695
+ /** {zh}
696
+ * @brief 输出 DEBUG、INFO、WARNING 和 ERROR 级别的日志。
697
+ */
698
+ VeLiveLogLevelDebug = 1,
699
+ /** {zh}
700
+ * @brief 输出 INFO、WARNING 和 ERROR 级别的日志。
701
+ */
702
+ VeLiveLogLevelInfo = 2,
703
+ /** {zh}
704
+ * @brief 输出 WARNING 和 ERROR 级别的日志。
705
+ */
706
+ VeLiveLogLevelWarn = 3,
707
+ /** {zh}
708
+ * @brief 输出 ERROR 级别的日志。
709
+ */
710
+ VeLiveLogLevelError = 4,
711
+ /** {zh}
712
+ * @brief 关闭日志。
713
+ */
714
+ VeLiveLogLevelNone = 5
715
+ }
716
+ export declare enum VeLiveAudioBitDepth {
717
+ /** {zh}
718
+ * @brief 16bit 位深度。
719
+ */
720
+ VeLiveAudioBitDepth16 = 0
721
+ }
722
+ export declare class VeLiveMixAudioLayout {
723
+ /** {zh}
724
+ * @brief 音频流 ID,唯一标识,用于区分不同的音频流。
725
+ */
726
+ streamId: int;
727
+ /** {zh}
728
+ * @detail api
729
+ * @brief 混流音频的音量,范围为 [0.0,4.0]。当您将 [VeLiveAudioMixType](147521#VeLiveAudioMixType) 设置为 `VeLiveAudioMixPlayAndPush` 时,该变量同时控制混流音频在拉流端和本地的播放音量。
730
+ */
731
+ volume: float;
732
+ /** {zh}
733
+ * @detail api
734
+ * @brief 更新音频混流设置。
735
+ * @param other 新的音频混流设置,详情请参见 [VeLiveMixAudioLayout](#VeLiveMixAudioLayout)。
736
+ */
737
+ update(other: VeLiveMixAudioLayout): void;
738
+ }
739
+ export declare enum VeLiveOrientation {
740
+ /** {zh}
741
+ * @brief 横屏模式。
742
+ */
743
+ VeLiveOrientationLandscape = 0,
744
+ /** {zh}
745
+ * @brief 竖屏模式。
746
+ */
747
+ VeLiveOrientationPortrait = 1
748
+ }
749
+ export declare enum VeLiveVideoMirrorType {
750
+ /** {zh}
751
+ * @brief 对采集画面的镜像控制。开启时,预览和推流画面都会呈现为镜像状态。
752
+ */
753
+ VeLiveVideoMirrorCapture = 0,
754
+ /** {zh}
755
+ * @brief 对预览画面的镜像控制。开启时,只有主播预览画面呈现镜像状态。
756
+ */
757
+ VeLiveVideoMirrorPreview = 1,
758
+ /** {zh}
759
+ * @brief 对编码前画面的镜像控制。开启时,主播推流画面呈现镜像状态。
760
+ */
761
+ VeLiveVideoMirrorPushStream = 2
762
+ }
763
+ export declare class VeLivePusherLogConfig {
764
+ /** {zh}
765
+ * @brief 日志文件保存路径。
766
+ */
767
+ logPath: String;
768
+ /** {zh}
769
+ * @brief 日志文件整体最大尺寸,单位为 M,默认值为 100。
770
+ */
771
+ maxLogSizeM: int;
772
+ /** {zh}
773
+ * @brief 单个日志文件最大尺寸,单位为 M,默认值为 2。
774
+ */
775
+ singleLogSizeM: int;
776
+ /** {zh}
777
+ * @brief 日志文件有效期,单位为 s,默认值为 604,800,即 7 天。
778
+ */
779
+ logExpireTimeS: long;
780
+ /** {zh}
781
+ * @brief 是否开启线程轮询,默认值为 `1` <br>
782
+ * - `0`:关闭;
783
+ * - `1`:开启。
784
+ */
785
+ enableThreadLoop: int;
786
+ /** {zh}
787
+ * @brief 日志是否打印到控制台输出,默认为不打印。
788
+ */
789
+ enableStdout: int;
790
+ /** {zh}
791
+ * @brief 日志是否打印到文件输出,默认为打印。
792
+ */
793
+ enableLogFile: int;
794
+ /** {zh}
795
+ * @brief 日志级别,默认值为 `kVolcLogLevelWarning`。
796
+ */
797
+ logLevel: int;
798
+ /** {zh}
799
+ * @brief 日志刷新频率,单位为 ms,默认值为 120,000,即 2 分钟。
800
+ */
801
+ intervalMs: long;
802
+ /** {zh}
803
+ * @brief 日志上报路径。
804
+ */
805
+ queryUrl: String;
806
+ /** {zh}
807
+ * @brief 设备唯一 ID。
808
+ */
809
+ device_id: String;
810
+ /** {zh}
811
+ * @brief HTTP 请求超时时间。取值范围:大于 0。
812
+ */
813
+ httpTimeoutMS: int;
814
+ /** {zh}
815
+ * @brief 文件上传超时时间。取值范围:大于 0。
816
+ */
817
+ httpUploadFileTimeoutMS: int;
818
+ }
819
+ export declare class VeLiveFileRecorderConfiguration {
820
+ /** {zh}
821
+ * @detail api
822
+ * @brief 获取录制视频宽度。
823
+ * @return <br>
824
+ * 录制视频宽度。
825
+ */
826
+ getWidth(): int;
827
+ /** {zh}
828
+ * @detail api
829
+ * @brief 设置录制视频宽度。
830
+ * @return <br>推流本地文件录制配置对象,详情请参见 [VeLiveFileRecorderConfiguration](#VeLiveFileRecorderConfiguration)。
831
+ * @param width 录制视频宽度,默认值为 360
832
+ */
833
+ setWidth(width: int): VeLiveFileRecorderConfiguration;
834
+ /** {zh}
835
+ * @detail api
836
+ * @brief 获取录制视频高度。
837
+ * @return <br>
838
+ * 录制视频高度。
839
+ */
840
+ getHeight(): int;
841
+ /** {zh}
842
+ * @detail api
843
+ * @brief 设置录制视频高度。
844
+ * @return <br>推流本地文件录制配置对象,详情请参见 [VeLiveFileRecorderConfiguration](#VeLiveFileRecorderConfiguration)。
845
+ * @param height 录制视频宽度,默认值为 640。
846
+ */
847
+ setHeight(height: int): VeLiveFileRecorderConfiguration;
848
+ /** {zh}
849
+ * @detail api
850
+ * @brief 获取录制视频帧率。
851
+ * @return <br>
852
+ * 录制视频帧率。
853
+ */
854
+ getFps(): int;
855
+ /** {zh}
856
+ * @detail api
857
+ * @brief 设置录制视频帧率。
858
+ * @return <br>推流本地文件录制配置对象,详情请参见 [VeLiveFileRecorderConfiguration](#VeLiveFileRecorderConfiguration)。
859
+ * @param fps 录制视频帧率,默认值为 15。
860
+ */
861
+ setFps(fps: int): VeLiveFileRecorderConfiguration;
862
+ /** {zh}
863
+ * @detail api
864
+ * @brief 获取录制视频码率。
865
+ * @return <br>
866
+ * 录制视频码率。
867
+ */
868
+ getBitrate(): int;
869
+ /** {zh}
870
+ * @detail api
871
+ * @brief 设置录制视频码率。
872
+ * @return <br>推流本地文件录制配置对象,详情请参见 [VeLiveFileRecorderConfiguration](#VeLiveFileRecorderConfiguration)。
873
+ * @param bitrate 录制视频码率,单位为 kbps,默认值为 2000。
874
+ */
875
+ setBitrate(bitrate: int): VeLiveFileRecorderConfiguration;
876
+ }
877
+ export declare class VeLiveMixVideoLayout {
878
+ /** {zh}
879
+ * @brief 视频流 ID,唯一标识,用于区分不同的视频流。
880
+ */
881
+ streamId: int;
882
+ /** {zh}
883
+ * @brief 视频流对应区域左上角的横坐标,该坐标是相对整体画面的归一化比例,取值的范围为 [0.0,1.0]。
884
+ */
885
+ x: float;
886
+ /** {zh}
887
+ * @brief 视频流对应区域左上角的纵坐标,该坐标是相对整体画面的归一化比例,取值的范围为 [0.0,1.0]。
888
+ */
889
+ y: float;
890
+ /** {zh}
891
+ * @brief 视频流对应区域宽度,该宽度是相对整体画面的归一化比例,取值的范围为 [0.0,1.0]。
892
+ */
893
+ width: float;
894
+ /** {zh}
895
+ * @brief 视频流对应区域高度,该高度是相对整体画面的归一化比例,取值的范围为 [0.0,1.0]。
896
+ */
897
+ height: float;
898
+ /** {zh}
899
+ * @brief 视频流在混流中的透明度,取值范围为 [0.0,1.0],取值 0.0 表示全透明,取值 1.0 表示不透明。
900
+ */
901
+ alpha: float;
902
+ /** {zh}
903
+ * @brief 视频流在混流中的层级。取值范围为 [0,100],取值 0 表示最底层,取值越大,层级越高。
904
+ */
905
+ zOrder: int;
906
+ /** {zh}
907
+ * @brief 视频流的渲染模式。详情请参见 {@link #VeLivePusherRenderMode VeLivePusherRenderMode}。
908
+ */
909
+ renderMode: VeLivePusherRenderMode;
910
+ /** {zh}
911
+ * @detail api
912
+ * @brief 更新视频混流设置。
913
+ * @param other 新的视频混流设置,详情请参见 [VeLiveMixVideoLayout](147521#VeLiveMixVideoLayout)。
914
+ */
915
+ update(other: VeLiveMixVideoLayout): void;
916
+ }
917
+ export declare class VeLiveVideoEffectLicenseConfiguration {
918
+ /** {zh}
919
+ * @detail api
920
+ * @brief 初始化配置为本地验证模式。
921
+ * @return <br>返回 VeLiveVideoEffectLicenseConfiguration 类的实例,该实例使用指定的本地路径进行许可证验证。
922
+ * @param path 视频特效许可证的本地缓存路径。可通过 [getPath](#VeLiveVideoEffectLicenseConfiguration-getpath) 获取。
923
+ */
924
+ static create_String(path: String): VeLiveVideoEffectLicenseConfiguration;
925
+ /** {zh}
926
+ * @detail api
927
+ * @brief 初始化配置为在线验证模式。
928
+ * @return <br>返回 VeLiveVideoEffectLicenseConfiguration 类的实例,该实例使用指定的 key、secret 和 url 进行在线许可证验证。
929
+ * @param key 视频特效许可证的在线认证 key。可通过 [getKey](#VeLiveVideoEffectLicenseConfiguration-getkey) 获取。
930
+ * @param secret 视频特效许可证的在线认证 secret。可通过 [getSecret](#VeLiveVideoEffectLicenseConfiguration-getsecret) 获取。
931
+ * @param url 视频特效许可证的在线认证地址,如果传入 `null`,可通过 [getUrl](147521#VeLiveVideoEffectLicenseConfiguration-geturl) 获取在线认证地址。
932
+ */
933
+ static create_String$String$String(key: String, secret: String, url: String): VeLiveVideoEffectLicenseConfiguration;
934
+ /** {zh}
935
+ * @detail api
936
+ * @brief 获取视频特效许可证类型。
937
+ * @return <br>
938
+ * 视频特效许可证类型,许可证类型请参见 {@link #VeLiveVideoEffectLicenseType VeLiveVideoEffectLicenseType}。
939
+ */
940
+ getType(): VeLiveVideoEffectLicenseType;
941
+ /** {zh}
942
+ * @detail api
943
+ * @brief 获取视频特效许可证的本地路径。当 {@link #VeLiveVideoEffectLicenseType VeLiveVideoEffectLicenseType} 为 `VeLiveVideoEffectLicenseTypeOffLine` 时,返回许可证文件的本地路径。
944
+ * @return <br>
945
+ * 视频特效许可证的本地路径。
946
+ */
947
+ getPath(): String;
948
+ /** {zh}
949
+ * @detail api
950
+ * @brief 获取视频特效许可证的在线认证 key。当 {@link #VeLiveVideoEffectLicenseType VeLiveVideoEffectLicenseType} 为 `VeLiveVideoEffectLicenseTypeOnLine` 时,返回在线认证的 key。
951
+ * @return <br>
952
+ * 视频特效许可证的在线认证 key。
953
+ */
954
+ getKey(): String;
955
+ /** {zh}
956
+ * @detail api
957
+ * @brief 获取视频特效许可证的在线认证 secret。当 {@link #VeLiveVideoEffectLicenseType VeLiveVideoEffectLicenseType} 为 `VeLiveVideoEffectLicenseTypeOnLine` 时,返回在线认证的 secret。
958
+ * @return <br>
959
+ * 视频特效许可证的在线认证 secret。
960
+ */
961
+ getSecret(): String;
962
+ /** {zh}
963
+ * @detail api
964
+ * @brief 获取视频特效许可证的在线认证地址。当 {@link #VeLiveVideoEffectLicenseType VeLiveVideoEffectLicenseType} 为 `VeLiveVideoEffectLicenseTypeOnLine` 时,返回在线认证地址。
965
+ * @return <br>
966
+ * 视频特效许可证的在线认证地址。
967
+ */
968
+ getUrl(): String;
969
+ }
970
+ export declare enum VeLiveAudioFrameSource {
971
+ /** {zh}
972
+ * @brief 采集到的原始音频帧。这是从设备的麦克风或其他音频输入源获取的音频帧。
973
+ */
974
+ VeLiveAudioFrameSourceCapture = 1,
975
+ /** {zh}
976
+ * @brief 编码前的音频帧。这是通过各种处理(例如噪音消除、回声消除等)后,准备进行编码的音频帧。
977
+ */
978
+ VeLiveAudioFrameSourcePreEncode = "1 << 1"
979
+ }
980
+ export declare class VeLiveAudioEncoderConfiguration {
981
+ /** {zh}
982
+ * @detail api
983
+ * @brief 获取推流音频编码码率。
984
+ * @return <br>
985
+ * 推流音频编码码率。
986
+ */
987
+ getBitrate(): int;
988
+ /** {zh}
989
+ * @detail api
990
+ * @brief 设置推流音频编码码率。
991
+ * @return <br>推流音频编码参数配置对象,详情请参见 [VeLiveAudioEncoderConfiguration](#VeLiveAudioEncoderConfiguration)。
992
+ * @param bitrate 推流音频编码码率,单位为 kbps,默认值为 64。
993
+ */
994
+ setBitrate(bitrate: int): VeLiveAudioEncoderConfiguration;
995
+ /** {zh}
996
+ * @detail api
997
+ * @brief 获取推流音频采样率。
998
+ * @return <br>
999
+ * 推流音频采样率。详情请参见 {@link #VeLiveAudioSampleRate VeLiveAudioSampleRate}。
1000
+ */
1001
+ getSampleRate(): VeLiveAudioSampleRate;
1002
+ /** {zh}
1003
+ * @detail api
1004
+ * @brief 设置推流音频采样率。
1005
+ * @return <br>推流音频编码参数配置对象,详情请参见 [VeLiveAudioEncoderConfiguration](#VeLiveAudioEncoderConfiguration)。
1006
+ * @param sampleRate 推流音频采样率,默认值为 VeLiveAudioSampleRate44100,详情请参见 [VeLiveAudioSampleRate](147521#VeLiveAudioSampleRate)。
1007
+ */
1008
+ setSampleRate(sampleRate: VeLiveAudioSampleRate): VeLiveAudioEncoderConfiguration;
1009
+ /** {zh}
1010
+ * @detail api
1011
+ * @brief 获取推流音频声道。
1012
+ * @return <br>
1013
+ * 推流音频声道。详情请参见 {@link #VeLiveAudioChannel VeLiveAudioChannel}。
1014
+ */
1015
+ getChannel(): VeLiveAudioChannel;
1016
+ /** {zh}
1017
+ * @detail api
1018
+ * @brief 设置推流音频声道。
1019
+ * @return <br>推流音频编码参数配置对象,详情请参见 [VeLiveAudioEncoderConfiguration](#VeLiveAudioEncoderConfiguration)。
1020
+ * @param channel 推流音频声道,默认值为 VeLiveAudioChannelStereo,详情请参见 [VeLiveAudioChannel](147521#VeLiveAudioChannel)。
1021
+ */
1022
+ setChannel(channel: VeLiveAudioChannel): VeLiveAudioEncoderConfiguration;
1023
+ /** {zh}
1024
+ * @detail api
1025
+ * @brief 获取推流音频编码类型。
1026
+ * @return <br>
1027
+ * 推流音频编码类型。详情请参见 {@link #VeLiveAudioProfile VeLiveAudioProfile}。
1028
+ */
1029
+ getProfile(): VeLiveAudioProfile;
1030
+ /** {zh}
1031
+ * @detail api
1032
+ * @brief 设置推流音频编码类型。
1033
+ * @return <br>推流音频编码参数配置对象,详情请参见 [VeLiveAudioEncoderConfiguration](#VeLiveAudioEncoderConfiguration)。
1034
+ * @param profile 推流音频编码类型,默认值为 VeLiveAudioAACProfileLC,详情请参见 [VeLiveAudioProfile](147521#VeLiveAudioProfile)。
1035
+ */
1036
+ setProfile(profile: VeLiveAudioProfile): VeLiveAudioEncoderConfiguration;
1037
+ }
1038
+ export declare enum VeLiveAudioMixType {
1039
+ /** {zh}
1040
+ * @brief 拉流端可以听到混音效果,本地无法听到。
1041
+ */
1042
+ VeLiveAudioMixPush = 0,
1043
+ /** {zh}
1044
+ * @brief 拉流端和本地都可以听到混音效果。
1045
+ */
1046
+ VeLiveAudioMixPlayAndPush = 1
1047
+ }
1048
+ export declare enum VeLiveAudioCaptureType {
1049
+ /** {zh}
1050
+ * @brief 使用默认麦克风设备进行音频采集。
1051
+ */
1052
+ VeLiveAudioCaptureMicrophone = 0,
1053
+ /** {zh}
1054
+ * @brief 使用语音通话模式进行音频采集,此模式下会启动硬件的 3A 功能,即自动增益控制、自动频率控制和自动噪声抑制。
1055
+ */
1056
+ VeLiveAudioCaptureVoiceCommunication = 1,
1057
+ /** {zh}
1058
+ * @brief 使用录屏直播无障碍音频模式进行音频采集。
1059
+ */
1060
+ VeLiveAudioCaptureVoiceRecognition = 2,
1061
+ /** {zh}
1062
+ * @brief 使用外部设备或源进行音频采集。
1063
+ */
1064
+ VeLiveAudioCaptureExternal = 3,
1065
+ /** {zh}
1066
+ * @brief 使用静音帧作为音频源。
1067
+ */
1068
+ VeLiveAudioCaptureMuteFrame = 4
1069
+ }