@byteplus/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 +372 -0
  24. package/lib/typescript/codegen/android/callback.d.ts +91 -0
  25. package/lib/typescript/codegen/android/errorcode.d.ts +26 -0
  26. package/lib/typescript/codegen/android/index.d.ts +5 -0
  27. package/lib/typescript/codegen/android/keytype.d.ts +469 -0
  28. package/lib/typescript/codegen/android/types.d.ts +32 -0
  29. package/lib/typescript/codegen/ios/api.d.ts +257 -0
  30. package/lib/typescript/codegen/ios/callback.d.ts +88 -0
  31. package/lib/typescript/codegen/ios/errorcode.d.ts +54 -0
  32. package/lib/typescript/codegen/ios/index.d.ts +5 -0
  33. package/lib/typescript/codegen/ios/keytype.d.ts +488 -0
  34. package/lib/typescript/codegen/ios/types.d.ts +35 -0
  35. package/lib/typescript/codegen/pack/api.d.ts +1933 -0
  36. package/lib/typescript/codegen/pack/callback.d.ts +542 -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 +1952 -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,1933 @@
1
+ import { VeLiveVideoBufferType, VeLivePixelFormat, VeLiveVideoRotation, VeLiveVideoEffectLicenseConfiguration, VeLivePusherRenderMode, VeLiveVideoMirrorType, VeLiveVideoCaptureType, VeLiveAudioCaptureType, VeLiveVideoEncoderConfiguration, VeLiveAudioEncoderConfiguration, VeLiveFileRecorderConfiguration, VeLiveOrientation, VeLiveVideoEncodeFrame, VeLivePusherLogLevel, VeLiveStreamMixDescription, VeLiveAudioBufferType, VeLiveAudioSampleRate, VeLiveAudioChannel, VeLiveVideoCaptureConfiguration, VeLiveAudioCaptureConfiguration } from './keytype';
2
+ import * as $p_a from '../android/index';
3
+ import * as $p_i from '../ios/index';
4
+ import { VeLivePusherObserver, VeLivePusherStatisticsObserver, VeLiveFileRecordingListener, VeLiveVideoFrameFilter, VeLiveAudioFrameFilter, VeLiveVideoFrameListener, VeLiveAudioFrameListener, VeLiveSnapshotListener, VeLiveMediaPlayerListener, VeLiveMediaPlayerFrameListener } from './callback';
5
+ import { View } from './types';
6
+
7
+ /** {en}
8
+ * @detail api
9
+ * @list overview
10
+ * @brief The information of a video frame.
11
+ */
12
+ export declare class VeLiveVideoFrame {
13
+ protected _instance: any;
14
+ protected __init(...args: any[]): void;
15
+ protected __new_instance(...args: any[]): $p_a.VeLiveVideoFrame | $p_i.VeLiveVideoFrame;
16
+ get width(): number;
17
+ set width(value: number);
18
+ get height(): number;
19
+ set height(value: number);
20
+ /**
21
+ * @platform android
22
+ */
23
+ get android_ptsUs(): number;
24
+ set android_ptsUs(value: number);
25
+ get textureId(): number;
26
+ set textureId(value: number);
27
+ get data(): any;
28
+ set data(value: any);
29
+
30
+ /** {en}
31
+ * @platform android
32
+ * @detail api
33
+ * @group 方法
34
+ * @brief Increases the reference count of the `VeLiveVideoFrame` object. Call this method to increase the reference count by 1 if you need to continue using the `VeLiveVideoFrame` object.
35
+ */
36
+ android_retain(): void;
37
+
38
+ /** {en}
39
+ * @detail api
40
+ * @group 方法
41
+ * @brief Releases the reference to the `VeLiveVideoFrame` object. Call this method to reduce the reference count by 1 when you no longer need to use the `VeLiveVideoFrame` object. When the reference count is reduced to 0, it means there is no reference to the object, and the object can be safely released or destroyed.
42
+ */
43
+ release(): void;
44
+
45
+ /** {en}
46
+ * @detail api
47
+ * @group 方法
48
+ * @brief Gets the data type of the video.
49
+ * @return <br>
50
+ * The data type of the video. See VeLiveVideoBufferType {@link #VeLiveVideoBufferType} for details.
51
+ */
52
+ getBufferType(): VeLiveVideoBufferType;
53
+
54
+ /** {en}
55
+ * @detail api
56
+ * @group 方法
57
+ * @brief Sets the data type of the video.
58
+ * @param bufferType The data type of the video. See VeLiveVideoBufferType {@link #VeLiveVideoBufferType} for details.
59
+ * @return <br>
60
+ * The video frame object. See VeLiveVideoFrame {@link #VeLiveVideoFrame} for details.
61
+ */
62
+ setBufferType(bufferType: VeLiveVideoBufferType): VeLiveVideoFrame;
63
+
64
+ /** {en}
65
+ * @detail api
66
+ * @group 方法
67
+ * @brief Gets the pixel format.
68
+ * @return <br>
69
+ * The pixel format. See VeLivePixelFormat {@link #VeLivePixelFormat} for details.
70
+ */
71
+ getPixelFormat(): VeLivePixelFormat;
72
+
73
+ /** {en}
74
+ * @detail api
75
+ * @group 方法
76
+ * @brief Sets the pixel format.
77
+ * @param pixelFormat The pixel format. See VeLivePixelFormat {@link #VeLivePixelFormat} for details.
78
+ * @return <br>
79
+ * The video frame object. See VeLiveVideoFrame {@link #VeLiveVideoFrame} for details.
80
+ */
81
+ setPixelFormat(pixelFormat: VeLivePixelFormat): VeLiveVideoFrame;
82
+
83
+ /** {en}
84
+ * @detail api
85
+ * @group 方法
86
+ * @brief Gets the rotation angle in a clockwise direction.
87
+ * @return <br>
88
+ * The rotation angle in a clockwise direction. See VeLiveVideoRotation {@link #VeLiveVideoRotation} for details.
89
+ */
90
+ getRotation(): VeLiveVideoRotation;
91
+
92
+ /** {en}
93
+ * @detail api
94
+ * @group 方法
95
+ * @brief Sets the rotation angle in a clockwise direction.
96
+ * @param rotation The rotation angle in a clockwise direction. See VeLiveVideoRotation {@link #VeLiveVideoRotation} for details.
97
+ * @return <br>
98
+ * The video frame object. See VeLiveVideoFrame {@link #VeLiveVideoFrame} for details.
99
+ */
100
+ setRotation(rotation: VeLiveVideoRotation): VeLiveVideoFrame;
101
+
102
+ /** {en}
103
+ * @detail api
104
+ * @group 方法
105
+ * @brief Gets the width of the video frame.
106
+ * @return <br>
107
+ * The width of the video frame.
108
+ */
109
+ getWidth(): number;
110
+
111
+ /** {en}
112
+ * @detail api
113
+ * @group 方法
114
+ * @brief Gets the height of the video frame.
115
+ * @return <br>
116
+ * The height of the video frame.
117
+ */
118
+ getHeight(): number;
119
+
120
+ /** {en}
121
+ * @platform android
122
+ * @detail api
123
+ * @group 方法
124
+ * @brief Gets the width of the rotated video frame.
125
+ * @return <br>
126
+ * The width of the rotated video frame.
127
+ */
128
+ android_getRotatedWidth(): number;
129
+
130
+ /** {en}
131
+ * @platform android
132
+ * @detail api
133
+ * @group 方法
134
+ * @brief Gets the height of the rotated video frame.
135
+ * @return <br>
136
+ * The height of the rotated video frame.
137
+ */
138
+ android_getRotatedHeight(): number;
139
+
140
+ /** {en}
141
+ * @detail api
142
+ * @group 方法
143
+ * @brief Gets the timestamp of the video frame.
144
+ * @return <br>
145
+ * The timestamp of the video frame, in μs.
146
+ */
147
+ getPts(): number;
148
+
149
+ /** {en}
150
+ * @detail api
151
+ * @group 方法
152
+ * @brief Gets the texture ID.
153
+ * @return <br>
154
+ * The texture ID.
155
+ */
156
+ getTextureId(): number;
157
+
158
+ /** {en}
159
+ * @platform android
160
+ * @detail api
161
+ * @group 方法
162
+ * @brief Gets the texture matrix.
163
+ * @return <br>
164
+ * The texture matrix.
165
+ */
166
+ android_getTextureMatrix(): $p_a.Matrix;
167
+
168
+ /** {en}
169
+ * @platform android
170
+ * @detail api
171
+ * @group 方法
172
+ * @brief Gets the video data in the format of ByteBuffer.
173
+ * @return <br>
174
+ * The video data in the format of ByteBuffer.
175
+ */
176
+ android_getBuffer(): unknown;
177
+
178
+ /** {en}
179
+ * @detail api
180
+ * @group 方法
181
+ * @brief Gets the video data in the format of byte [].
182
+ * @return <br>
183
+ * The video data in the format of byte [].
184
+ */
185
+ getData(): ArrayBuffer;
186
+
187
+ /** {en}
188
+ * @platform android
189
+ * @detail api
190
+ * @group 方法
191
+ * @brief Gets the internal release callback.
192
+ * @return <br>
193
+ * The internal release callback.
194
+ */
195
+ android_getReleaseCallback(): $p_a.Runnable;
196
+
197
+ /** {en}
198
+ * @platform android
199
+ * @detail api
200
+ * @group 方法
201
+ * @brief Sets the internal release callback.
202
+ * @param releaseCallback The internal release callback.
203
+ * @return <br>
204
+ * The video frame object. See VeLiveVideoFrame {@link #VeLiveVideoFrame} for details.
205
+ */
206
+ android_setReleaseCallback(releaseCallback: $p_a.Runnable): VeLiveVideoFrame;
207
+ }
208
+
209
+ /** {en}
210
+ * @detail api
211
+ * @list overview
212
+ * @brief The camera manager.
213
+ */
214
+ export declare class VeLiveCameraDevice {
215
+ protected _instance: any;
216
+ protected __init(...args: any[]): void;
217
+ protected __new_instance(...args: any[]): $p_a.VeLiveCameraDevice | $p_i.VeLiveCameraDevice;
218
+
219
+ /** {en}
220
+ * @platform android
221
+ * @hidden
222
+ */
223
+ get android_CAMERA_DEVICE_CODE_OK(): $p_a.int;
224
+ set android_CAMERA_DEVICE_CODE_OK(value: $p_a.int);
225
+
226
+ /** {en}
227
+ * @platform android
228
+ * @hidden
229
+ */
230
+ get android_CAMERA_DEVICE_CODE_NOT_LIVE(): $p_a.int;
231
+ set android_CAMERA_DEVICE_CODE_NOT_LIVE(value: $p_a.int);
232
+
233
+ /** {en}
234
+ * @platform android
235
+ * @hidden
236
+ */
237
+ get android_CAMERA_DEVICE_CODE_NOT_SUPPORT(): $p_a.int;
238
+ set android_CAMERA_DEVICE_CODE_NOT_SUPPORT(value: $p_a.int);
239
+
240
+ /** {en}
241
+ * @platform android
242
+ * @hidden
243
+ */
244
+ get android_CAMERA_DEVICE_CODE_PARAM_ILLEGAL(): $p_a.int;
245
+ set android_CAMERA_DEVICE_CODE_PARAM_ILLEGAL(value: $p_a.int);
246
+
247
+ /** {en}
248
+ * @platform android
249
+ * @hidden
250
+ */
251
+ get android_CAMERA_DEVICE_CODE_ERROR_BASE(): $p_a.int;
252
+ set android_CAMERA_DEVICE_CODE_ERROR_BASE(value: $p_a.int);
253
+
254
+ /** {en}
255
+ * @detail api
256
+ * @group 方法
257
+ * @brief Sets camera parameters.
258
+ * @param parameter The camera parameter object, which specifies the camera parameters.
259
+ * @notes <br>
260
+ * Call this method after calling startVideoCapture {@link #startVideoCapture} to start camera capture.
261
+ * @order 64
262
+ */
263
+ setParameter(parameter: Parameter): void;
264
+
265
+ /** {en}
266
+ * @detail api
267
+ * @group 方法
268
+ * @brief Gets camera parameters.
269
+ * @return <br>
270
+ * The value of the camera parameter. The data type is determined by the parameter name you set when calling the method.
271
+ * @notes <br>Call this method after calling [startVideoCapture](#VeLivePusher-startvideocapture) to start camera capture.
272
+ * @order 65
273
+ */
274
+ getParameter(): Parameter;
275
+
276
+ /** {en}
277
+ * @platform android
278
+ * @detail api
279
+ * @group 方法
280
+ * @brief Gets the frame rate range supported by the camera.
281
+ * @return <br>
282
+ * The frame rate range supported by the camera.
283
+ * @notes <br>Call this method after calling [startVideoCapture](#VeLivePusher-startvideocapture) to start camera capture.
284
+ * @order 66
285
+ */
286
+ android_getRealFpsRange(): $p_a.int[];
287
+
288
+ /** {en}
289
+ * @detail api
290
+ * @group 方法
291
+ * @brief Enables or disables the flashlight.
292
+ * @return <br>
293
+ * - 0: Success;
294
+ * - ≠ 0: Failure.
295
+ * @notes <br>Call this method after calling [startVideoCapture](#VeLivePusher-startvideocapture) to start camera capture.
296
+ * @order 67
297
+ * @param enable Whether to enable the flashlight. <br>
298
+ * - true: Enable;
299
+ * - false: (Default) Disable.
300
+ */
301
+ enableTorch(enable: boolean): number;
302
+
303
+ /** {en}
304
+ * @detail api
305
+ * @group 方法
306
+ * @brief Sets the zoom factor of the camera.
307
+ * @return <br>
308
+ * - 0: Success;
309
+ * - ≠ 0: Failure.
310
+ * @notes <br>Call this method after calling [startVideoCapture](#VeLivePusher-startvideocapture) to start camera capture.
311
+ * @order 68
312
+ * @param ratio The zoom factor. The SDK uses the original size by default. The range of the zoom factor is [[getMinZoomRatio](#VeLiveCameraDevice-getminzoomratio),[getMaxZoomRatio](#VeLiveCameraDevice-getmaxzoomratio)].
313
+ */
314
+ setZoomRatio(ratio: number): number;
315
+
316
+ /** {en}
317
+ * @detail api
318
+ * @group 方法
319
+ * @brief Gets the current zoom factor of the camera.
320
+ * @return <br>
321
+ * - ≤ 0: The camera does not support zooming;
322
+ * - \\\\> 0: The zoom factor.
323
+ * @notes <br>Call this method after calling [startVideoCapture](#VeLivePusher-startvideocapture) to start camera capture.
324
+ * @order 68
325
+ */
326
+ getCurrentZoomRatio(): number;
327
+
328
+ /** {en}
329
+ * @detail api
330
+ * @group 方法
331
+ * @brief Gets the maximum zoom factor of the camera.
332
+ * @return <br>
333
+ * - ≤ 0: The camera does not support zooming;
334
+ * - \\\\> 0: The maximum zoom factor.
335
+ * @notes <br>Call this method after calling [startVideoCapture](#VeLivePusher-startvideocapture) to start camera capture.
336
+ * @order 69
337
+ */
338
+ getMaxZoomRatio(): number;
339
+
340
+ /** {en}
341
+ * @detail api
342
+ * @group 方法
343
+ * @brief Gets the minimum zoom factor of the camera.
344
+ * @return <br>
345
+ * - ≤ 0: The camera does not support zooming;
346
+ * - \\\\> 0: The minimum zoom factor.
347
+ * @notes <br>Call this method after calling [startVideoCapture](#VeLivePusher-startvideocapture) to start camera capture.
348
+ * @order 70
349
+ */
350
+ getMinZoomRatio(): number;
351
+
352
+ /** {en}
353
+ * @detail api
354
+ * @group 方法
355
+ * @brief Checks whether autofocus is supported.
356
+ * @return <br>
357
+ * - true: Supported;
358
+ * - false: Not supported.
359
+ * @notes <br>Call this method after calling [startVideoCapture](#VeLivePusher-startvideocapture) to start camera capture.
360
+ * @order 71
361
+ */
362
+ isAutoFocusEnabled(): boolean;
363
+
364
+ /** {en}
365
+ * @detail api
366
+ * @group 方法
367
+ * @brief Enables or disables autofocus.
368
+ * @return <br>
369
+ * - 0: Success;
370
+ * - ≠ 0: Failure.
371
+ * @notes <br>Call this method after calling [startVideoCapture](#VeLivePusher-startvideocapture) to start camera capture.
372
+ * @order 72
373
+ * @param enable Whether to enable autofocus.
374
+ * - true: (Default) Enable;
375
+ * - false: Disable.
376
+ */
377
+ enableAutoFocus(enable: boolean): number;
378
+
379
+ /** {en}
380
+ * @detail api
381
+ * @group 方法
382
+ * @brief Sets the focus position of the camera.
383
+ * @return <br>
384
+ * - 0: Success;
385
+ * - ≠ 0: Failure.
386
+ * @notes <br>Call this method after calling [startVideoCapture](#VeLivePusher-startvideocapture) to start camera capture.
387
+ * @order 73
388
+ * @param viewW The width of the current view.
389
+ * @param viewH The height of the current view.
390
+ * @param x The horizontal coordinate of the focus point from the upper left corner of the current view.
391
+ * @param y The vertical coordinate of the focus point from the upper left corner of the current view.
392
+ */
393
+ setFocusPosition(viewW: number, viewH: number, x: number, y: number): number;
394
+
395
+ /** {en}
396
+ * @detail api
397
+ * @group 方法
398
+ * @brief Checks if manual exposure setting is available for the currently used camera.
399
+ * @return - YES: Available.
400
+ * - NO: Unavailable.
401
+ * @notes You must call [startVideoCapture](#VeLivePusher-startvideocapture) to start SDK internal video capturing before calling this API.
402
+ * @order 74
403
+ */
404
+ isExposurePositionSupported(): boolean;
405
+
406
+ /** {en}
407
+ * @return - =0: Success.
408
+ * - ≠0: Failure.
409
+ * @detail api
410
+ * @group 方法
411
+ * @brief Sets the manual exposure position for the currently used camera.
412
+ * @notes - You must call [startVideoCapture](#VeLivePusher-startvideocapture) to start SDK internal video capturing, and use SDK internal rendering before calling this API.
413
+ * - The camera exposure point setting will be invalid after calling [stopVideoCapture](#VeLivePusher-stopvideocapture) to stop internal capturing.
414
+ * @order 75
415
+ * @param viewW The width of the current view.
416
+ * @param viewH The height of the current view.
417
+ * @param x The horizontal coordinate of the focus point from the upper left corner of the current view.
418
+ * @param y The vertical coordinate of the focus point from the upper left corner of the current view.
419
+ */
420
+ setExposurePosition(viewW: number, viewH: number, x: number, y: number): number;
421
+
422
+ /** {en}
423
+ * @return - ≤0: The camera does not support exposure;
424
+ * - \\>0: The minimum exposure compensation.
425
+ * @detail api
426
+ * @group 方法
427
+ * @brief Gets the minimum exposure compensation of the camera.
428
+ * @notes Call this method after calling [startVideoCapture](#VeLivePusher-startvideocapture) to start camera capture.
429
+ * @order 76
430
+ */
431
+ getMinExposureCompensation(): number;
432
+
433
+ /** {en}
434
+ * @return - ≤0: The camera does not support exposure;
435
+ * - \\>0: The maximum exposure compensation.
436
+ * @detail api
437
+ * @group 方法
438
+ * @brief Gets the maximum exposure compensation of the camera.
439
+ * @notes Call this method after calling [startVideoCapture](#VeLivePusher-startvideocapture) to start camera capture.
440
+ * @order 77
441
+ */
442
+ getMaxExposureCompensation(): number;
443
+
444
+ /** {en}
445
+ * @return - =0: Success.
446
+ * - ≠0: Failure.
447
+ * @detail api
448
+ * @group 方法
449
+ * @brief Sets the exposure compensation for the currently used camera.
450
+ * @notes <br>
451
+ * - You must call [startVideoCapture](#VeLivePusher-startvideocapture) to start SDK internal video capturing, and use SDK internal rendering before calling this API.
452
+ * - The camera exposure compensation setting will be invalid after calling [stopVideoCapture](#VeLivePusher-stopvideocapture) to stop internal capturing.
453
+ * @order 78
454
+ * @param value The range of the exposure compensation is [[getMinExposureCompensation](#VeLiveCameraDevice-getminexposurecompensation),[getMaxExposureCompensation](#VeLiveCameraDevice-getmaxexposurecompensation)], Default to 0, which means no exposure compensation.
455
+ */
456
+ setExposureCompensation(value: number): number;
457
+
458
+ /** {en}
459
+ * @platform ios
460
+ * @detail api
461
+ * @group 方法
462
+ * @brief Checks whether flashlight is supported.
463
+ * @return <br>
464
+ * - YES: Supported;
465
+ * - NO: Not supported.
466
+ * @notes <br>Call this method after calling {@link #VeLivePusher#startVideoCapture startVideoCapture:} to start camera capture.
467
+ * @order 49
468
+ */
469
+ ios_isTorchSupported(): boolean;
470
+ }
471
+
472
+ /** {en}
473
+ * @detail api
474
+ * @list overview
475
+ * @brief The special effects manager. With the special effects manager, you can do the following:
476
+ * - Set beauty AR
477
+ * - Set special effects
478
+ * - Set materials
479
+ * - Set stickers
480
+ * - Set filters
481
+ */
482
+ export declare class VeLiveVideoEffectManager {
483
+ protected _instance: any;
484
+ protected __init(...args: any[]): void;
485
+ protected __new_instance(...args: any[]): $p_a.VeLiveVideoEffectManager | $p_i.VeLiveVideoEffectManager;
486
+
487
+ /** {en}
488
+ * @detail api
489
+ * @group 方法
490
+ * @brief Initializes the special effects manager.
491
+ * @return <br>
492
+ * - 0: Success;
493
+ * - -1: Failure.
494
+ * @order 89
495
+ * @param config The special effects configurations. See VeLiveVideoEffectLicenseConfiguration for details.
496
+ */
497
+ setupWithConfig(config: VeLiveVideoEffectLicenseConfiguration): number;
498
+
499
+ /** {en}
500
+ * @detail api
501
+ * @group 方法
502
+ * @brief Updates the special effects license. This method is effective only if you authenticate the license online.
503
+ * @param callback The result callback.
504
+ * @notes <br>
505
+ * - Call this method after you set the video effects license by calling setupWithConfig {@link #setupWithConfig};
506
+ * - This method is an asynchronous operation.
507
+ * @order 90
508
+ */
509
+ updateLicense(callback: (result: number, message: string) => void): void;
510
+
511
+ /** {en}
512
+ * @detail api
513
+ * @group 方法
514
+ * @brief Creates or destroys the special effects engine.
515
+ * @return <br>
516
+ * - 0: Success;
517
+ * - -1: Failure.
518
+ * @notes <br>
519
+ * - Call this method after calling [setupWithConfig](broadcast-sdk-for-android-api#VeLiveVideoEffectManager-setupwithconfig) and [setAlgorithmModelPath](broadcast-sdk-for-android-api#VeLiveVideoEffectManager-setalgorithmmodelpath) ;
520
+ * - This method does not enable or disable video special effects. Call [setComposeNodes](broadcast-sdk-for-android-api#VeLiveVideoEffectManager-setcomposenodes) after calling this method to enable video special effects;
521
+ * - In most cases, the special effects engine will be destroyed when the effects manager is destroyed. However, if you have high performance requirements, you can call this method to manually destroy the special effects engine when you are not using special effects-related features;
522
+ * - Creating or destroying the special effects engine repeatedly can result in increased processing time.
523
+ * @order 92
524
+ * @param enable Whether to create or destroy the special effects engine.
525
+ * - true: Create;
526
+ * - false: (Default) Destroy.
527
+ * @param callback [VeLiveVideoEffectCallback](broadcast-sdk-for-android-callback\\#VeLiveVideoEffectCallback), the listener for special effect events.
528
+ */
529
+ setEnable(enable: boolean, callback: (result: number, msg: string) => void): void;
530
+
531
+ /** {en}
532
+ * @platform android
533
+ * @detail api
534
+ * @group 方法
535
+ * @brief Sets the path to the algorithm model package of the special effects.
536
+ * @param path The path to the algorithm model package of the special effects.
537
+ * @return <br>
538
+ * - 0: Success;
539
+ * - -1: Failure.
540
+ * @notes <br>
541
+ * Call this method after you set the special effects license by calling setupWithConfig {@link #setupWithConfig}.
542
+ * @order 91
543
+ */
544
+ android_setAlgorithmModelPath(path: string): number;
545
+
546
+ /** {en}
547
+ * @detail api
548
+ * @group 方法
549
+ * @brief Sets the special effects you want to apply to the video. You can choose effects from ComposeMakeup.bundle.
550
+ * @param nodes The paths to the special effects resource.
551
+ * @return <br>
552
+ * - 0: Success;
553
+ * - -1: Failure.
554
+ * @notes <br>
555
+ * - Call this method after calling setEnable {@link #VeLiveVideoEffectManager #setEnable};
556
+ * - If you make multiple calls to this method, only the last call takes effect;
557
+ * - To add more effects to the existing effects settings, call appendComposeNodes {@link #VeLiveVideoEffectManager#appendComposeNodes}.
558
+ * @order 93
559
+ */
560
+ setComposeNodes(nodes: string[]): number;
561
+
562
+ /** {en}
563
+ * @detail api
564
+ * @group 方法
565
+ * @brief Adds one or more effects to the existing effects settings that you have configured by calling setComposeNodes {@link #VeLiveVideoEffectManager#setComposeNodes}.
566
+ * @param nodes The paths to the special effects resource.
567
+ * @return <br>
568
+ * - 0: Success;
569
+ * - -1: Failure.
570
+ * @notes <br>
571
+ * - Call this method after calling setEnable {@link #VeLiveVideoEffectManager #setEnable}.
572
+ * @order 94
573
+ */
574
+ appendComposeNodes(nodes: string[]): number;
575
+
576
+ /** {en}
577
+ * @detail api
578
+ * @group 方法
579
+ * @brief Removes one or more special effects resource set by the {@link #VeLiveVideoEffectManager#setComposeNodes setComposeNodes} or {@link #VeLiveVideoEffectManager#appendComposeNodes appendComposeNodes} methods.
580
+ * @param nodes The paths to the special effects resource.
581
+ * @return <br>
582
+ * - 0: Success;
583
+ * - -1: Failure.
584
+ * @notes <br>
585
+ * - Call this method after calling setEnable {@link #VeLiveVideoEffectManager #setEnable}.
586
+ * @order 94
587
+ */
588
+ removeComposeNodes(nodes: string[]): number;
589
+
590
+ /** {en}
591
+ * @detail api
592
+ * @group 方法
593
+ * @brief Sets the intensity of a special effect.
594
+ * @param node The path to the special effects resource.
595
+ * @param key The key of the resource.
596
+ * @param intensity The intensity of the effect. The value range is [0.0, 1.0].
597
+ * @return <br>
598
+ * - 0: Success;
599
+ * - -1: Failure.
600
+ * @notes <br>
601
+ * - Call this method after calling setComposeNodes {@link #VeLiveVideoEffectManager#setComposeNodes} or appendComposeNodes {@link #VeLiveVideoEffectManager#appendComposeNodes};
602
+ * - This method is only applicable to special effects that contain the three parameters mentioned above. For effects that do not have the intensity parameter, such as stickers, the method does not have any effect.
603
+ * @order 95
604
+ */
605
+ updateComposerNodeIntensity(node: string, key: string, intensity: number): number;
606
+
607
+ /** {en}
608
+ * @detail api
609
+ * @group 方法
610
+ * @brief Sets the color filter.
611
+ * @param path The absolute path to the filter resource.
612
+ * @return <br>
613
+ * - 0: Success;
614
+ * - -1: Failure.
615
+ * @notes <br>
616
+ * Call this method after calling setEnable {@link #VeLiveVideoEffectManager #setEnable}.
617
+ * @order 96
618
+ */
619
+ setFilter(path: string): number;
620
+
621
+ /** {en}
622
+ * @detail api
623
+ * @group 方法
624
+ * @brief Sets the intensity of the color filter.
625
+ * @return <br>
626
+ * - 0: Success;
627
+ * - -1: Failure.
628
+ * @notes <br>Call this method after calling setFilter.
629
+ * @order 97
630
+ * @param intensity The intensity. The value range is [0.0, 1.0].
631
+ */
632
+ updateFilterIntensity(intensity: number): number;
633
+
634
+ /** {en}
635
+ * @detail api
636
+ * @group 方法
637
+ * @brief Sets the sticker.
638
+ * @param path The absolute path to the sticker resource.
639
+ * @return <br>
640
+ * - 0: Success;
641
+ * - -1: Failure.
642
+ * @notes <br>
643
+ * Call this method after calling setEnable {@link #VeLiveVideoEffectManager #setEnable}.
644
+ * @order 98
645
+ */
646
+ setSticker(path: string): number;
647
+
648
+ /** {en}
649
+ * @detail api
650
+ * @group 方法
651
+ * @brief Advanced settings for special effects.
652
+ * @param callback A callback function that takes a handle as an argument.
653
+ * @param isGLThread Whether the callback is called in the GL thread.
654
+ * @param isAsync Whether the callback is executed synchronously.
655
+ * @notes <br>
656
+ * Call the method after calling setEnable {@link #VeLiveVideoEffectManager #setEnable}. Do not perform frequent synchronization operations in the main thread.
657
+ * @order 99
658
+ */
659
+ setAdvancedFeature(callback: (handle: void) => void, isGLThread: boolean, isAsync: boolean): void;
660
+
661
+ /** {en}
662
+ * @platform ios
663
+ * @detail api
664
+ * @group 方法
665
+ * @brief Sets the path to the algorithm models of the special effects.
666
+ * @param path The path to the algorithm models of the special effects.
667
+ * @return <br>
668
+ * - 0: Success;
669
+ * - -1: Failure.
670
+ * @notes <br>
671
+ * Call this method after you set the special effects license by calling {@link #VeLiveVideoEffectManager#setupWithConfig setupWithConfig:}.
672
+ * @order 77
673
+ */
674
+ ios_setAlgoModelPath(path: string): number;
675
+ }
676
+
677
+ /** {en}
678
+ * @detail api
679
+ * @list overview
680
+ * @brief The live pusher.
681
+ */
682
+ export declare class VeLivePusher {
683
+
684
+ /** {en}
685
+ * @detail api
686
+ * @group 方法
687
+ * @brief Sets the level of the output log.
688
+ * @param logLevel The log level. See VeLivePusherLogLevel {@link #VeLivePusherLogLevel} for details.
689
+ * @order 60
690
+ */
691
+ static setLogLevel(logLevel: VeLivePusherLogLevel): void;
692
+
693
+ /** {en}
694
+ * @platform android
695
+ * @detail api
696
+ * @group 方法
697
+ * @brief Sets the version number of OpenGL.
698
+ * @param version The version number of OpenGL. Supported values include `2` and `3`, which correspond to OpenGL 2.0 and 3.0 respectively. The default value is `3`.
699
+ * @order 62
700
+ */
701
+ static android_setEGLVersion(version: number): void;
702
+
703
+ /** {en}
704
+ * @platform android
705
+ * @detail api
706
+ * @group 方法
707
+ * @brief Sets the context of OpenGL.
708
+ * @param context The context of OpenGL.
709
+ * @order 61
710
+ */
711
+ static android_setEGLContext(context: unknown): void;
712
+
713
+ /** {en}
714
+ * @platform android
715
+ * @detail api
716
+ * @group 方法
717
+ * @brief Gets the context of OpenGL.
718
+ * @return <br>
719
+ * The context of the current OpenGL.
720
+ * @order 63
721
+ */
722
+ static android_getEGLContext(): unknown;
723
+ protected _instance: any;
724
+ protected __init(...args: any[]): void;
725
+ protected __new_instance(...args: any[]): $p_a.VeLivePusher | $p_i.VeLivePusher;
726
+
727
+ /** {en}
728
+ * @detail api
729
+ * @group 方法
730
+ * @brief Stops capturing and pushing streams and destroys the pusher. Call this method after stopPush {@link #VeLivePusher#stopPush} is called.
731
+ * @order 13
732
+ */
733
+ destroy(): void;
734
+
735
+ /** {en}
736
+ * @detail api
737
+ * @group 方法
738
+ * @brief Sets an observer to listen for live pusher events, including errors, statuses, network quality, device information, and first frame rendering.
739
+ * @param observer The observer. Refer to VeLivePusherObserver {@link #VeLivePusherObserver} for details.
740
+ * @notes <br>
741
+ * - This method must be called after the live pusher is created;
742
+ * - If you make multiple calls to this method, only the last call takes effect.
743
+ * @order 1
744
+ */
745
+ setObserver(observer: VeLivePusherObserver): void;
746
+
747
+ /** {en}
748
+ * @detail api
749
+ * @group 方法
750
+ * @brief Sets an observer to periodically report push-stream statistics.
751
+ * @param observer The observer. Refer to VeLivePusherStatisticsObserver {@link #VeLivePusherStatisticsObserver} for details.
752
+ * @param interval The time interval between two callbacks, in seconds. The default value is `5`.
753
+ * @notes <br>
754
+ * - This method must be called after the live pusher is created;
755
+ * - If you make multiple calls to this method, only the last call takes effect.
756
+ * @order 15
757
+ */
758
+ setStatisticsObserver(observer: VeLivePusherStatisticsObserver, interval: number): void;
759
+
760
+ /** {en}
761
+ * @detail api
762
+ * @group 方法
763
+ * @brief Sets the preview for the local camera. If beauty AR is applied to the captured video or if it undergoes any other processing, the preview will display the processed video.
764
+ * @param view The preview view.
765
+ * @order 16
766
+ */
767
+ setRenderView(view: View): Promise<void>;
768
+
769
+ /** {en}
770
+ * @detail api
771
+ * @group 方法
772
+ * @brief Sets fill mode for the local camera preview.
773
+ * @param mode The fill mode.
774
+ */
775
+ setRenderFillMode(mode: VeLivePusherRenderMode): void;
776
+
777
+ /** {en}
778
+ * @detail api
779
+ * @group 方法
780
+ * @brief Enables or disables mirroring for the local preview and the streamed video.
781
+ * @param type Mirror mode. See VeLiveVideoMirrorType {@link #VeLiveVideoMirrorType} for details.
782
+ * @param mirror Whether to enable mirroring. <br>
783
+ * - true: Enable;
784
+ * - false: Disable.
785
+ * @order 17
786
+ */
787
+ setVideoMirror(type: VeLiveVideoMirrorType, mirror: boolean): void;
788
+
789
+ /** {en}
790
+ * @detail api
791
+ * @group 方法
792
+ * @brief Starts video capture.
793
+ * @notes <br>After calling this method, you can stop video capture by calling [stopVideoCapture](#VeLivePusher-stopvideocapture).
794
+ * @order 18
795
+ * @param type The video capture type. See {@link #VeLiveVideoCaptureType VeLiveVideoCaptureType} for details.
796
+ *
797
+ */
798
+ startVideoCapture(type: VeLiveVideoCaptureType): void;
799
+
800
+ /** {en}
801
+ * @detail api
802
+ * @group 方法
803
+ * @brief Stops video capture.
804
+ * @notes <br>After calling this method, you can start video capture by calling [startVideoCapture](#VeLivePusher-startvideocapture).
805
+ * @order 19
806
+ */
807
+ stopVideoCapture(): void;
808
+
809
+ /** {en}
810
+ * @detail api
811
+ * @group 方法
812
+ * @brief Starts audio capture.
813
+ * @notes <br>After calling this method, you can stop audio capture by calling [stopAudioCapture](#VeLivePusher-stopaudiocapture).
814
+ * @order 20
815
+ * @param type The audio capture type. See VeLiveAudioCaptureType {@link #VeLiveAudioCaptureType} for details.
816
+ */
817
+ startAudioCapture(type: VeLiveAudioCaptureType): void;
818
+
819
+ /** {en}
820
+ * @detail api
821
+ * @group 方法
822
+ * @brief Stops audio capture.
823
+ * @notes <br>After calling this method, you can start audio capture by calling [startAudioCapture](#VeLivePusher-startaudiocapture).
824
+ * @order 21
825
+ */
826
+ stopAudioCapture(): void;
827
+
828
+ /** {en}
829
+ * @detail api
830
+ * @group 方法
831
+ * @brief Switches the video capture type.
832
+ * @notes <br>This method must be called after [startVideoCapture](#VeLivePusher-startvideocapture) is called.
833
+ * @order 22
834
+ * @param type The video capture type. See VeLiveVideoCaptureType {@link #VeLiveVideoCaptureType} for details.
835
+ */
836
+ switchVideoCapture(type: VeLiveVideoCaptureType): void;
837
+
838
+ /** {en}
839
+ * @detail api
840
+ * @group 方法
841
+ * @brief Switches audio capture type.
842
+ * @notes <br>This method must be called after [startVideoCapture](#VeLivePusher-startvideocapture) is called.
843
+ * @order 23
844
+ * @param type The audio capture type. See VeLiveAudioCaptureType {@link #VeLiveAudioCaptureType} for details.
845
+ */
846
+ switchAudioCapture(type: VeLiveAudioCaptureType): void;
847
+
848
+ /** {en}
849
+ * @detail api
850
+ * @group 方法
851
+ * @brief Gets the current video capture type.
852
+ * @return <br>
853
+ * The video capture type. See VeLiveVideoCaptureType {@link #VeLiveVideoCaptureType} for details.
854
+ * @order 24
855
+ */
856
+ getCurrentVideoCaptureType(): VeLiveVideoCaptureType;
857
+
858
+ /** {en}
859
+ * @detail api
860
+ * @group 方法
861
+ * @brief Gets the current audio capture type.
862
+ * @return <br>
863
+ * The audio capture type. See VeLiveAudioCaptureType {@link #VeLiveAudioCaptureType} for details.
864
+ * @order 25
865
+ */
866
+ getCurrentAudioCaptureType(): VeLiveAudioCaptureType;
867
+
868
+ /** {en}
869
+ * @detail api
870
+ * @group 方法
871
+ * @brief Sets a static image to push. When using this method, you must call startVideoCapture {@link #VeLivePusher#startVideoCapture} and set VeLiveVideoCaptureType {@link #VeLiveVideoCaptureType} to `VeLiveVideoCaptureCustomImage`.
872
+ * @param image The static image to push.
873
+ * @order 26
874
+ */
875
+ updateCustomImage(image: any): Promise<void>;
876
+
877
+ /** {en}
878
+ * @detail api
879
+ * @group 方法
880
+ * @brief Gets the camera manager. With the camera manager, you can do the following:
881
+ * - Control the flashlight
882
+ * - Set the camera zoom
883
+ * - Set autofocus
884
+ * @return <br>
885
+ * The camera manager. See VeLiveCameraDevice {@link #VeLiveCameraDevice} for details.
886
+ * @notes <br>
887
+ * To use this method, you must first call startVideoCapture {@link #startVideoCapture} and set VeLiveVideoCaptureType {@link #VeLiveVideoCaptureType} to `VeLiveVideoCaptureFrontCamera` or `VeLiveVideoCaptureBackCamera`.
888
+ * @order 27
889
+ */
890
+ getCameraDevice(): VeLiveCameraDevice;
891
+
892
+ /** {en}
893
+ * @detail api
894
+ * @group 方法
895
+ * @brief Sets video encoding parameters for the pushed stream.
896
+ * @notes This method can be called before or after live streaming starts.
897
+ * @order 28
898
+ * @param config The video encoding parameters, including the video resolution, encoding format, target bitrate, and GOP size. For details, see VeLiveVideoEncoderConfiguration {@link #VeLiveVideoEncoderConfiguration}.
899
+ */
900
+ setVideoEncoderConfiguration(config: VeLiveVideoEncoderConfiguration): void;
901
+
902
+ /** {en}
903
+ * @platform android
904
+ * @detail api
905
+ * @group 方法
906
+ * @brief Gets video encoding parameters for the pushed stream.
907
+ * @return <br>
908
+ * The video encoding parameters, including the video resolution, encoding format, target bitrate, and GOP size. For details, see VeLiveVideoEncoderConfiguration {@link #VeLiveVideoEncoderConfiguration}.
909
+ * @order 29
910
+ */
911
+ android_getVideoEncoderConfiguration(): VeLiveVideoEncoderConfiguration;
912
+
913
+ /** {en}
914
+ * @detail api
915
+ * @group 方法
916
+ * @brief Sets audio encoding parameters for the pushed stream.
917
+ * @notes <br>This method must be called before calling [startPush](#VeLivePusher-startpush) or [startPushWithUrls](#VeLivePusher-startpushwithurls).
918
+ * @order 30
919
+ * @param config The audio encoding parameters. See [VeLiveAudioEncoderConfiguration](147521#VeLiveAudioEncoderConfiguration) for details.
920
+ */
921
+ setAudioEncoderConfiguration(config: VeLiveAudioEncoderConfiguration): void;
922
+
923
+ /** {en}
924
+ * @platform android
925
+ * @detail api
926
+ * @group 方法
927
+ * @brief Gets audio encoding parameters for the pushed stream.
928
+ * @return <br>The audio encoding parameters. See VeLiveAudioEncoderConfiguration for details.
929
+ * @order 31
930
+ */
931
+ android_getAudioEncoderConfiguration(): VeLiveAudioEncoderConfiguration;
932
+
933
+ /** {en}
934
+ * @detail api
935
+ * @group 方法
936
+ * @brief Starts streaming.
937
+ * @param url The push stream address.
938
+ * @order 32
939
+ */
940
+ startPush(url: string): void;
941
+
942
+ /** {en}
943
+ * @detail api
944
+ * @group 方法
945
+ * @brief Starts streaming with one or more push stream addresses.
946
+ * @param urls A list of push stream addresses.
947
+ * @notes <br>
948
+ * When the first push stream address in the array is unavailable, the SDK will automatically switch to the subsequent addresses.
949
+ * @order 33
950
+ */
951
+ startPushWithUrls(urls: string[]): void;
952
+
953
+ /** {en}
954
+ * @detail api
955
+ * @group 方法
956
+ * @brief Stops streaming.
957
+ * @notes <br>
958
+ * After you have stopped streaming, you can restart streaming by calling startPush {@link #startPush} or startPushWithUrls {@link #startPushWithUrls}.
959
+ * @order 34
960
+ */
961
+ stopPush(): void;
962
+
963
+ /** {en}
964
+ * @detail api
965
+ * @group 方法
966
+ * @brief Checks whether the streaming is currently ongoing. You can use this method to query the status of the live pusher.
967
+ * @return <br>
968
+ * Whether the streaming is currently ongoing. <br>
969
+ * - true: The streaming is currently ongoing;
970
+ * - false: The streaming has stopped.
971
+ * @order 35
972
+ */
973
+ isPushing(): boolean;
974
+
975
+ /** {en}
976
+ * @detail api
977
+ * @group 方法
978
+ * @brief Sets a watermark for the pushed stream.
979
+ * @param image The watermark image. Setting it to null means disabling watermarking.
980
+ * @param x The horizontal offset of the watermark, which represents the ratio of the distance between the left edge of the watermark and the left edge of the video to the width of the video. The value range is [0.0,1.0].
981
+ * @param y The vertical offset of the watermark, which represents the ratio of the distance between the top edge of the watermark and the top edge of the video to the height of the video. The value range is [0.0,1.0].
982
+ * @param scale The uniform scaling of the watermark. The value range is [0.0, 1.0].
983
+ * @return <br>
984
+ * - 0: Success;
985
+ * - < 0: Failure.
986
+ * @order 36
987
+ */
988
+ setWatermark(image: any, x: number, y: number, scale: number): Promise<number>;
989
+
990
+ /** {en}
991
+ * @detail api
992
+ * @group 方法
993
+ * @brief Starts local recording.
994
+ * @order 37
995
+ * @param path The directory for saving the recording file. You cannot leave this parameter empty.
996
+ * @param config The recording configurations. See VeLiveFileRecorderConfiguration for details.
997
+ * @param listener The listener for recording events. See VeLiveFileRecordingListener for details.
998
+ */
999
+ startFileRecording(path: string, config: VeLiveFileRecorderConfiguration, listener: VeLiveFileRecordingListener): void;
1000
+
1001
+ /** {en}
1002
+ * @detail api
1003
+ * @group 方法
1004
+ * @brief Stops local recording.
1005
+ * @notes <br>This method must be called after calling [startFileRecording](#VeLivePusher-startfilerecording).
1006
+ * @order 38
1007
+ */
1008
+ stopFileRecording(): void;
1009
+
1010
+ /** {en}
1011
+ * @detail api
1012
+ * @group 方法
1013
+ * @brief Set advanced configurations. You can contact BytePlus technical support for more information about how to use this method.
1014
+ * @param key The JSON key.
1015
+ * @param value The JSON value.
1016
+ * @return <br>
1017
+ * - 0: Success;
1018
+ * - -1: Failure.
1019
+ * @order 39
1020
+ */
1021
+ setProperty(key: string, value: Object): number;
1022
+
1023
+ /** {en}
1024
+ * @detail api
1025
+ * @group 方法
1026
+ * @brief Pushes an external video frame.
1027
+ * @param frame The external video frame. See VeLiveVideoFrame {@link #VeLiveVideoFrame} for details.
1028
+ * @return <br>
1029
+ * - 0: Success;
1030
+ * - < 0: Failure.
1031
+ * @notes <br>
1032
+ * To use this method, you must first call startVideoCapture {@link #startVideoCapture} and set VeLiveVideoCaptureType {@link #VeLiveVideoCaptureType} to `VeLiveVideoCaptureExternal`.
1033
+ * @order 40
1034
+ */
1035
+ pushExternalVideoFrame(frame: VeLiveVideoFrame): number;
1036
+
1037
+ /** {en}
1038
+ * @detail api
1039
+ * @group 方法
1040
+ * @brief Pushes an external audio frame.
1041
+ * @param frame The external audio frame. See VeLiveAudioFrame {@link #VeLiveAudioFrame} for details.
1042
+ * @return <br>
1043
+ * - 0: Success;
1044
+ * - < 0: Failure.
1045
+ * @notes <br>
1046
+ * To use this method, you must first call startAudioCapture {@link #AustartdioCapture} and set VeLiveAudioCaptureType {@link #VeLiveAudioCaptureType} to `VeLiveAudioCaptureExternal`.
1047
+ * @order 41
1048
+ */
1049
+ pushExternalAudioFrame(frame: VeLiveAudioFrame): number;
1050
+
1051
+ /** {en}
1052
+ * @detail api
1053
+ * @group 方法
1054
+ * @brief Sets the orientation of the pushed video frame. The default orientation is portrait.
1055
+ * @param orientation The orientation of the pushed video frame. See VeLiveOrientation {@link #VeLiveOrientation} for details.
1056
+ * @order 42
1057
+ */
1058
+ setOrientation(orientation: VeLiveOrientation): void;
1059
+
1060
+ /** {en}
1061
+ * @detail api
1062
+ * @group 方法
1063
+ * @brief Sends an SEI message through the video frame. The SEI messages are strings in JSON format.
1064
+ * @return <br>
1065
+ * - 0: Success;
1066
+ * - < 0: Failure.
1067
+ * @notes <br>This method must be called after calling [startPush](#VeLivePusher-startpush) or [startPushWithUrls](#VeLivePusher-startpushwithurls).
1068
+ * @order 43
1069
+ * @param key The JSON key.
1070
+ * @param value The JSON value.
1071
+ * @param repeat The number of times the message is sent. For example, if you set `repeat` to `20` and set `isKeyFrame` to `true`, the SDK will add the SEI message to 20 consecutive key frames starting from the time the method is called.
1072
+ * @param isKeyFrame Whether SEI messages are only included in key frames. <br>
1073
+ * - true: Add the SEI message to key frames only;
1074
+ * - false: Add the SEI message to all types of frames.
1075
+ * @param allowsCovered Whether to allow overwriting. <br>
1076
+ * - true: Allow overwriting;
1077
+ * - false: Do not allow overwriting.
1078
+ */
1079
+ sendSeiMessage(key: string, value: Object, repeat: number, isKeyFrame: boolean, allowsCovered: boolean): number;
1080
+
1081
+ /** {en}
1082
+ * @detail api
1083
+ * @group 方法
1084
+ * @brief Sets whether to mute the stream.
1085
+ * @param mute Whether to mute the stream. <br>
1086
+ * - true: Mute;
1087
+ * - false: (Default) Do not mute.
1088
+ * @order 44
1089
+ */
1090
+ setMute(mute: boolean): void;
1091
+
1092
+ /** {en}
1093
+ * @detail api
1094
+ * @group 方法
1095
+ * @brief Checks whether the stream is muted.
1096
+ * @return <br>
1097
+ * - true: The stream is muted;
1098
+ * - false: The stream is not muted.
1099
+ * @order 45
1100
+ */
1101
+ isMute(): boolean;
1102
+
1103
+ /** {en}
1104
+ * @detail api
1105
+ * @group 方法
1106
+ * @brief Gets the special effects manager. With the special effects manager, you can do the following:
1107
+ * - Set beauty AR
1108
+ * - Set special effects
1109
+ * - Set materials
1110
+ * - Set stickers
1111
+ * - Set filters
1112
+ * @return <br>
1113
+ * The special effects manager. See VeLiveVideoEffectManager {@link #VeLiveVideoEffectManager} for details.
1114
+ * @notes <br>
1115
+ * You must first integrate the BytePlus Effects SDK before calling this method.
1116
+ * @order 46
1117
+ */
1118
+ getVideoEffectManager(): VeLiveVideoEffectManager;
1119
+
1120
+ /** {en}
1121
+ * @detail api
1122
+ * @group 方法
1123
+ * @brief Sets custom video processing.
1124
+ * @order 47
1125
+ * @param filter The video filter. See VeLiveVideoFrameFilter for details.
1126
+ */
1127
+ setVideoFrameFilter(filter: VeLiveVideoFrameFilter): void;
1128
+
1129
+ /** {en}
1130
+ * @detail api
1131
+ * @group 方法
1132
+ * @brief Gets the audio device manager.
1133
+ * @return <br>
1134
+ * The audio device manager. See VeLiveAudioDevice {@link #VeLiveAudioDevice} for details.
1135
+ * @notes <br>
1136
+ * To use this method, you must first call startAudioCapture {@link #startAudioCapture} and set VeLiveAudioCaptureType {@link #VeLiveAudioCaptureType} to `VeLiveAudioCaptureMicrophone`.
1137
+ * @order 48
1138
+ */
1139
+ getAudioDevice(): VeLiveAudioDevice;
1140
+
1141
+ /** {en}
1142
+ * @detail api
1143
+ * @group 方法
1144
+ * @brief Sets custom audio processing.
1145
+ * @order 49
1146
+ * @param filter The audio filter. See VeLiveAudioFrameFilter for details.
1147
+ */
1148
+ setAudioFrameFilter(filter: VeLiveAudioFrameFilter): void;
1149
+
1150
+ /** {en}
1151
+ * @detail api
1152
+ * @group 方法
1153
+ * @brief Creates the media player.
1154
+ * @return <br>
1155
+ * The media player. See VeLiveMediaPlayer {@link #VeLiveMediaPlayer} for details.
1156
+ * @order 50
1157
+ */
1158
+ createPlayer(): VeLiveMediaPlayer;
1159
+
1160
+ /** {en}
1161
+ * @detail api
1162
+ * @group 方法
1163
+ * @brief Gets the audio and video mixer.
1164
+ * @return <br>
1165
+ * The audio and video mixer. See VeLiveMixerManager {@link #VeLiveMixerManager} for details.
1166
+ * @order 51
1167
+ */
1168
+ getMixerManager(): VeLiveMixerManager;
1169
+
1170
+ /** {en}
1171
+ * @platform android
1172
+ * @detail api
1173
+ * @group 方法
1174
+ * @brief Starts screen capture.
1175
+ * @param enableAppAudio Whether to record in-app audio data. Currently, you can only set it to `true`, which is the default value.
1176
+ * @param screenIntent The system screen recording permission.
1177
+ * @order 52
1178
+ *
1179
+ */
1180
+ android_startScreenRecording(enableAppAudio: boolean, screenIntent: $p_a.Intent): void;
1181
+
1182
+ /** {en}
1183
+ * @platform android
1184
+ * @detail api
1185
+ * @group 方法
1186
+ * @brief Stops screen capture.
1187
+ * @order 53
1188
+ */
1189
+ android_stopScreenRecording(): void;
1190
+
1191
+ /** {en}
1192
+ * @platform android
1193
+ * @detail api
1194
+ * @group 方法
1195
+ * @brief Gets whether the SDK is capturing the screen at this moment.
1196
+ * @order 54
1197
+ */
1198
+ android_isScreenRecording(): boolean;
1199
+
1200
+ /** {en}
1201
+ * @detail api
1202
+ * @group 方法
1203
+ * @brief Adds a video frame listener.
1204
+ * @return <br>
1205
+ * - 0: Success;
1206
+ * - < 0: Failure.
1207
+ * @order 55
1208
+ * @param listener The listener. See VeLiveVideoFrameListener for details.
1209
+ */
1210
+ addVideoFrameListener(listener: VeLiveVideoFrameListener): number;
1211
+
1212
+ /** {en}
1213
+ * @detail api
1214
+ * @group 方法
1215
+ * @brief Removes the video frame listener.
1216
+ * @return <br>
1217
+ * - 0: Success;
1218
+ * - < 0: Failure.
1219
+ * @notes <br>
1220
+ * Calling this method will return a failure if the listener has not been added or has been removed.
1221
+ * @order 56
1222
+ * @param listener The listener. See VeLiveVideoFrameListener for details.
1223
+ */
1224
+ removeVideoFrameListener(listener: VeLiveVideoFrameListener): number;
1225
+
1226
+ /** {en}
1227
+ * @detail api
1228
+ * @group 方法
1229
+ * @brief Adds an audio frame listener.
1230
+ * @return <br>
1231
+ * - 0: Success;
1232
+ * - < 0: Failure.
1233
+ * @order 57
1234
+ * @param listener The listener. See VeLiveAudioFrameListener for details.
1235
+ */
1236
+ addAudioFrameListener(listener: VeLiveAudioFrameListener): number;
1237
+
1238
+ /** {en}
1239
+ * @detail api
1240
+ * @group 方法
1241
+ * @brief Removes the audio frame listener.
1242
+ * @return <br>
1243
+ * - 0: Success;
1244
+ * - < 0: Failure.
1245
+ * @notes <br>
1246
+ * Calling this method will return a failure if the listener has not been added or has been removed.
1247
+ * @order 58
1248
+ * @param listener The listener. See VeLiveAudioFrameListener for details.
1249
+ */
1250
+ removeAudioFrameListener(listener: VeLiveAudioFrameListener): number;
1251
+
1252
+ /** {en}
1253
+ * @detail api
1254
+ * @group 方法
1255
+ * @brief Takes a screenshot.
1256
+ * @order 59
1257
+ * @param listener The listener for the screenshot. See VeLiveSnapshotListener for details.
1258
+ */
1259
+ snapshot(listener: VeLiveSnapshotListener): void;
1260
+
1261
+ /** {en}
1262
+ * @platform ios
1263
+ * @detail api
1264
+ * @group 方法
1265
+ * @brief Initializes the live pusher.
1266
+ * @param config The pusher configurations. See VeLivePusherConfiguration {@link #VeLivePusherConfiguration} for details.
1267
+ * @order 0
1268
+ */
1269
+ ios_initWithConfig(config: VeLivePusherConfiguration): this;
1270
+
1271
+ /** {en}
1272
+ * @platform ios
1273
+ * @brief Sets the observer for screen capturing events.
1274
+ * @notes Calling this method will return a failure if the listener has not been added or has been removed.
1275
+ * @return - 0: Success;
1276
+ * - <0: Failure.
1277
+ * @param observer The observer for screen capturing events. For details, refer to [VeLiveScreenCaptureStatusObserver](broadcast-sdk-for-ios-callback#VeLiveScreenCaptureStatusObserver).
1278
+ */
1279
+ ios_setScreenCaptureObserver(observer: $p_i.id<$p_i.VeLiveScreenCaptureStatusObserver>): number;
1280
+
1281
+ /** {en}
1282
+ * @platform ios
1283
+ * @detail api
1284
+ * @group 方法
1285
+ * @brief Pushes an external encoded video frame.
1286
+ * @return <br>
1287
+ * - 0: Success;
1288
+ * - <0: Failure.
1289
+ * @notes <br>Before calling this method, you must first call {@link #VeLivePusher#startVideoCapture startVideoCapture:} and set [VeLiveVideoCaptureType](broadcast-sdk-for-ios-type-definition#VeLiveVideoCaptureType) to `VeLiveVideoCaptureFrontCamera` or `VeLiveVideoCaptureExternal`.
1290
+ * @order 44
1291
+ * @param encodeFrame The external encoded video frame. See VeLiveVideoEncodeFrame {@link #VeLiveVideoEncodeFrame} for details.
1292
+ */
1293
+ ios_pushExternalVideoEncodeFrame(encodeFrame: VeLiveVideoEncodeFrame): number;
1294
+
1295
+ /** {en}
1296
+ * @platform ios
1297
+ * @detail api
1298
+ * @group 方法
1299
+ * @brief Request to encode a new IDR frame.
1300
+ * @notes <br>
1301
+ * This method must be called after calling startPush: {@link #VeLivePusher#startPush} or startPushWithUrls: {@link #VeLivePusher#startPushWithUrls}.
1302
+ * @order 47
1303
+ */
1304
+ ios_requestIDRFrame(): void;
1305
+
1306
+ /** {en}
1307
+ * @platform ios
1308
+ * @detail api
1309
+ * @group 方法
1310
+ * @brief Sets the version number of OpenGL.
1311
+ * @param version The version number of OpenGL. Supported values include `2` and `3`, which correspond to OpenGL 2.0 and 3.0 respectively. The default value is `3`.
1312
+ * @order 45
1313
+ */
1314
+ ios_setEGLVersion(version: number): void;
1315
+
1316
+ /** {en}
1317
+ * @platform ios
1318
+ * @detail api
1319
+ * @group 方法
1320
+ * @brief Gets the context of EAGL. This context is shared across threads.
1321
+ * @return <br>
1322
+ * The EAGL context.
1323
+ * @order 46
1324
+ */
1325
+ ios_getEGLContext(): $p_i.EAGLContext;
1326
+ }
1327
+ /**
1328
+ * @hidden
1329
+ */
1330
+ export declare class Parameter extends $p_a.Parameter {
1331
+ }
1332
+
1333
+ /** {en}
1334
+ * @detail api
1335
+ * @list overview
1336
+ * @brief The audio and video mixer.
1337
+ */
1338
+ export declare class VeLiveMixerManager {
1339
+ protected _instance: any;
1340
+ protected __init(...args: any[]): void;
1341
+ protected __new_instance(...args: any[]): $p_a.VeLiveMixerManager | $p_i.VeLiveMixerManager;
1342
+
1343
+ /** {en}
1344
+ * @detail api
1345
+ * @group 方法
1346
+ * @brief Adds a video stream to the mixer.
1347
+ * @return <br>
1348
+ * The video stream ID.
1349
+ * @order 79
1350
+ */
1351
+ addVideoStream(): number;
1352
+
1353
+ /** {en}
1354
+ * @detail api
1355
+ * @group 方法
1356
+ * @brief Gets the ID of the primary video stream.
1357
+ * @order 83
1358
+ */
1359
+ getOriginVideoStream(): number;
1360
+
1361
+ /** {en}
1362
+ * @detail api
1363
+ * @group 方法
1364
+ * @brief Gets the ID of the primary audio stream.
1365
+ * @order 84
1366
+ */
1367
+ getOriginAudioStream(): number;
1368
+
1369
+ /** {en}
1370
+ * @platform android
1371
+ * @detail api
1372
+ * @group 方法
1373
+ * @brief Gets the ID of the primary screen stream.
1374
+ * @order 85
1375
+ */
1376
+ android_getOriginScreenStream(): number;
1377
+
1378
+ /** {en}
1379
+ * @platform android
1380
+ * @detail api
1381
+ * @group 方法
1382
+ * @brief Gets the ID of the primary system audio stream.
1383
+ * @order 86
1384
+ */
1385
+ android_getOriginSystemAudioStream(): number;
1386
+
1387
+ /** {en}
1388
+ * @detail api
1389
+ * @group 方法
1390
+ * @brief Sends a custom video frame with a specified stream ID.
1391
+ * @param frame The custom video frame. See VeLiveVideoFrame {@link #VeLiveVideoFrame} for details.
1392
+ * @param streamId The ID of the video stream to mix.
1393
+ * @order 87
1394
+ */
1395
+ sendCustomVideoFrame(frame: VeLiveVideoFrame, streamId: number): void;
1396
+
1397
+ /** {en}
1398
+ * @detail api
1399
+ * @group 方法
1400
+ * @brief Sends a custom audio frame with a specified stream ID.
1401
+ * @param frame The custom audio frame. See VeLiveAudioFrame {@link #VeLiveAudioFrame} for details.
1402
+ * @param streamId The ID of the audio stream to mix.
1403
+ * @order 88
1404
+ */
1405
+ sendCustomAudioFrame(frame: VeLiveAudioFrame, streamId: number): void;
1406
+
1407
+ /** {en}
1408
+ * @detail api
1409
+ * @group 方法
1410
+ * @brief Updates the configurations for audio and video mixing.
1411
+ * @param mixDescription The updated configurations for audio and video mixing. See VeLiveStreamMixDescription {@link #VeLiveStreamMixDescription} for details.
1412
+ */
1413
+ updateStreamMixDescription(mixDescription: VeLiveStreamMixDescription): void;
1414
+
1415
+ /** {en}
1416
+ * @detail api
1417
+ * @group 方法
1418
+ * @brief Removes a non-primary video stream from the mixer.
1419
+ * @param streamId The ID of the video stream to remove.
1420
+ * @order 80
1421
+ */
1422
+ removeVideoStream(streamId: number): void;
1423
+
1424
+ /** {en}
1425
+ * @detail api
1426
+ * @group 方法
1427
+ * @brief Removes a non-primary audio stream from the mixer.
1428
+ * @param streamId The ID of the audio stream to remove.
1429
+ * @order 82
1430
+ */
1431
+ removeAudioStream(streamId: number): void;
1432
+
1433
+ /** {en}
1434
+ * @platform ios
1435
+ * @detail api
1436
+ * @group 方法
1437
+ * @brief Sets the volume of a non-primary audio stream. If you set {@link #VeLiveAudioMixType VeLiveAudioMixType} to `VeLiveAudioMixPlayAndPush`, this method takes effect on both the host and the audience sides.
1438
+ * @param streamId The audio stream ID.
1439
+ * @param volume The audio volume. The value range is [0.0,4.0].
1440
+ * @order 70
1441
+ */
1442
+ ios_setAudioStream(streamId: number, volume: number): void;
1443
+
1444
+ /** {en}
1445
+ * @platform ios
1446
+ */
1447
+ ios_getAppAudioStream(): number;
1448
+ }
1449
+
1450
+ /** {en}
1451
+ * @detail api
1452
+ * @list overview
1453
+ * @brief The media player.
1454
+ */
1455
+ export declare class VeLiveMediaPlayer {
1456
+ protected _instance: any;
1457
+ protected __init(...args: any[]): void;
1458
+ protected __new_instance(...args: any[]): $p_a.VeLiveMediaPlayer | $p_i.VeLiveMediaPlayer;
1459
+
1460
+ /** {en}
1461
+ * @detail api
1462
+ * @group 方法
1463
+ * @brief Destroys the media player instance.
1464
+ * @order 100
1465
+ */
1466
+ destroy(): void;
1467
+
1468
+ /** {en}
1469
+ * @detail api
1470
+ * @group 方法
1471
+ * @brief Sets the observer for playback statuses.
1472
+ * @notes <br>
1473
+ * If you make multiple calls to this method, only the last call takes effect.
1474
+ * @order 101
1475
+ * @param listener The observer that listens for playback statuses. For details, see VeLiveMediaPlayerListener.
1476
+ */
1477
+ setListener(listener: VeLiveMediaPlayerListener): void;
1478
+
1479
+ /** {en}
1480
+ * @detail api
1481
+ * @group 方法
1482
+ * @brief Sets the file path. Supported file formats include MP3, AAC, M4A, WAV.
1483
+ * @param url The file path.
1484
+ * @return <br>
1485
+ * - 0: Success;
1486
+ * - ≠ 0: Failure.
1487
+ * @order 102
1488
+ */
1489
+ prepare(url: string): number;
1490
+
1491
+ /** {en}
1492
+ * @detail api
1493
+ * @group 方法
1494
+ * @brief Pauses playback.
1495
+ * @notes <br>
1496
+ * This method must be called after you call start {@link #start} to start playback.
1497
+ * @order 103
1498
+ */
1499
+ start(): Promise<number>;
1500
+
1501
+ /** {en}
1502
+ * @detail api
1503
+ * @group 方法
1504
+ * @brief Stops playback.
1505
+ * @return <br>
1506
+ * - 0: Success;
1507
+ * - ≠ 0: Failure.
1508
+ * @notes <br>
1509
+ * This method must be called after you call start {@link #start} to start playback.
1510
+ * @order 104
1511
+ */
1512
+ stop(): Promise<number>;
1513
+
1514
+ /** {en}
1515
+ * @detail api
1516
+ * @group 方法
1517
+ * @brief Pauses playback.
1518
+ * @notes <br>
1519
+ * This method must be called after you call start {@link #start} to start playback.
1520
+ * @order 105
1521
+ */
1522
+ pause(): Promise<void>;
1523
+
1524
+ /** {en}
1525
+ * @detail api
1526
+ * @group 方法
1527
+ * @brief Resumes playback.
1528
+ * @notes <br>This method must be called after you call [pause](#VeLiveMediaPlayer-pause) to pause playback.
1529
+ * @order 106
1530
+ */
1531
+ resume(): Promise<void>;
1532
+
1533
+ /** {en}
1534
+ * @detail api
1535
+ * @group 方法
1536
+ * @brief Gets the duration of the media file.
1537
+ * @return <br>
1538
+ * - \\\\> 0: The duration of the media file, in milliseconds;
1539
+ * - ≤ 0: Failure.
1540
+ * @notes <br>This method must be called after you call [start](#VeLiveMediaPlayer-start) to start playback.
1541
+ * @order 107
1542
+ */
1543
+ getDuration(): number;
1544
+
1545
+ /** {en}
1546
+ * @detail api
1547
+ * @group 方法
1548
+ * @brief Sets the playback progress.
1549
+ * @param posMs The playback progress, in milliseconds.
1550
+ * @return <br>
1551
+ * - 0: Success;
1552
+ * - ≠ 0: Failure.
1553
+ * @order 108
1554
+ */
1555
+ seek(posMs: number): number;
1556
+
1557
+ /** {en}
1558
+ * @detail api
1559
+ * @group 方法
1560
+ * @brief Enables or disables mixing the audio to the live stream.
1561
+ * @param enable Whether to enable or disable mixing the audio to the live stream. <br>
1562
+ * - ture: Enable;
1563
+ * - false: (Default) Disable.
1564
+ * @order 109
1565
+ */
1566
+ enableMixer(enable: boolean): void;
1567
+
1568
+ /** {en}
1569
+ * @detail api
1570
+ * @group 方法
1571
+ * @brief Enables or disables automatic volume equalization.
1572
+ * @param sourceLufs The source volume.
1573
+ * @param targetLufs The target volume.
1574
+ * @order 110
1575
+ */
1576
+ enableAutoEq(sourceLufs: number, targetLufs: number): void;
1577
+
1578
+ /** {en}
1579
+ * @detail api
1580
+ * @group 方法
1581
+ * @brief Sets the view for rendering the video. Supports MP4 format.
1582
+ * @param view The view used by the media player to render video.
1583
+ * @order 111
1584
+ */
1585
+ setRenderView(view: View): void;
1586
+
1587
+ /** {en}
1588
+ * @detail api
1589
+ * @group 方法
1590
+ * @brief Sets the observer for audio and video frames.
1591
+ * @notes <br>
1592
+ * If you make multiple calls to this method, only the last call takes effect.
1593
+ * @order 112
1594
+ * @param listener The observer that listens for audio and video frames. For details, see VeLiveMediaPlayerFrameListener
1595
+ */
1596
+ setFrameListener(listener: VeLiveMediaPlayerFrameListener): void;
1597
+
1598
+ /** {en}
1599
+ * @detail api
1600
+ * @group 方法
1601
+ * @brief Sets the playback volume.
1602
+ * @param volume The playback volume. The value range is [0.0, 4.0].
1603
+ * @order 113
1604
+ */
1605
+ setBGMVolume(volume: number): void;
1606
+
1607
+ /** {en}
1608
+ * @detail api
1609
+ * @group 方法
1610
+ * @brief Sets the audio capture volume.
1611
+ * @notes <br>This method must be called after you call [start](#VeLiveMediaPlayer-start) to start playing background music.
1612
+ * @order 114
1613
+ * @param volume The audio capture volume. The value range is [0.0, 4.0].
1614
+ */
1615
+ setVoiceVolume(volume: number): void;
1616
+
1617
+ /** {en}
1618
+ * @detail api
1619
+ * @group 方法
1620
+ * @brief Sets whether to loop the video.
1621
+ * @param loop Whether to loop the video. <br>
1622
+ * - true: Loop;
1623
+ * - false: (Default) Do not loop.
1624
+ * @order 115
1625
+ */
1626
+ enableBGMLoop(loop: boolean): void;
1627
+ }
1628
+
1629
+ /** {en}
1630
+ * @detail api
1631
+ * @list overview
1632
+ * @brief The information of an audio frame.
1633
+ */
1634
+ export declare class VeLiveAudioFrame {
1635
+ protected _instance: any;
1636
+ protected __init(...args: any[]): void;
1637
+ protected __new_instance(...args: any[]): $p_a.VeLiveAudioFrame | $p_i.VeLiveAudioFrame;
1638
+ get bufferType(): any;
1639
+ set bufferType(value: any);
1640
+ get sampleRate(): any;
1641
+ set sampleRate(value: any);
1642
+ get channels(): any;
1643
+ set channels(value: any);
1644
+ /**
1645
+ * @platform android
1646
+ */
1647
+ get android_ptsUs(): any;
1648
+ set android_ptsUs(value: any);
1649
+ /**
1650
+ * @platform android
1651
+ */
1652
+ get android_buffer(): any;
1653
+ set android_buffer(value: any);
1654
+ /**
1655
+ * @platform android
1656
+ */
1657
+ get android_samplesPerChannel(): any;
1658
+ set android_samplesPerChannel(value: any);
1659
+
1660
+ /** {en}
1661
+ * @detail api
1662
+ * @group 方法
1663
+ * @brief Gets the audio data type.
1664
+ * @return <br>
1665
+ * The audio data type. See VeLiveAudioBufferType {@link #VeLiveAudioBufferType} for details.
1666
+ */
1667
+ getBufferType(): VeLiveAudioBufferType;
1668
+
1669
+ /** {en}
1670
+ * @detail api
1671
+ * @group 方法
1672
+ * @brief Gets the audio sample rate.
1673
+ * @return <br>
1674
+ * The audio sample rate. See VeLiveAudioSampleRate {@link #VeLiveAudioSampleRate} for details.
1675
+ */
1676
+ getSampleRate(): VeLiveAudioSampleRate;
1677
+
1678
+ /** {en}
1679
+ * @detail api
1680
+ * @group 方法
1681
+ * @brief Gets the number of audio channels.
1682
+ * @return <br>
1683
+ * The number of audio channels. See VeLiveAudioChannel {@link #VeLiveAudioChannel} for details.
1684
+ */
1685
+ getChannels(): VeLiveAudioChannel;
1686
+
1687
+ /** {en}
1688
+ * @platform android
1689
+ * @detail api
1690
+ * @group 方法
1691
+ * @brief Gets the audio bit depth.
1692
+ * @return <br>
1693
+ * The audio bit depth.
1694
+ */
1695
+ android_getSamplesPerChannel(): number;
1696
+
1697
+ /** {en}
1698
+ * @detail api
1699
+ * @group 方法
1700
+ * @brief Gets the audio timestamp, in μs.
1701
+ * @return <br>
1702
+ * The timestamp of the audio frame, in μs.
1703
+ */
1704
+ getPts(): number;
1705
+
1706
+ /** {en}
1707
+ * @platform android
1708
+ * @detail api
1709
+ * @group 方法
1710
+ * @brief Gets the audio data. The audio data is of type float32 and is stored in little-endian byte order.
1711
+ * @return <br>
1712
+ * The audio data in the format of ByteBuffer.
1713
+ */
1714
+ android_getBuffer(): unknown;
1715
+ }
1716
+
1717
+ /** {en}
1718
+ * @detail api
1719
+ * @list overview
1720
+ * @brief The audio device manager.
1721
+ */
1722
+ export declare class VeLiveAudioDevice {
1723
+ protected _instance: any;
1724
+ protected __init(...args: any[]): void;
1725
+ protected __new_instance(...args: any[]): $p_a.VeLiveAudioDevice | $p_i.VeLiveAudioDevice;
1726
+
1727
+ /** {en}
1728
+ * @detail api
1729
+ * @group 方法
1730
+ * @brief Sets the volume.
1731
+ * @param level The volume. The value range is [0.0, 4.0].
1732
+ * @order 74
1733
+ */
1734
+ setVoiceLoudness(level: number): void;
1735
+
1736
+ /** {en}
1737
+ * @detail api
1738
+ * @group 方法
1739
+ * @brief Gets the current volume.
1740
+ * @return <br>
1741
+ * The current volume.
1742
+ * @order 75
1743
+ */
1744
+ getVoiceLoudness(): number;
1745
+
1746
+ /** {en}
1747
+ * @detail api
1748
+ * @group 方法
1749
+ * @brief Checks whether in-ear monitoring is supported.
1750
+ * @return <br>
1751
+ * - true: Supported;
1752
+ * - false: Not supported.
1753
+ * @order 76
1754
+ */
1755
+ isSupportHardwareEcho(): boolean;
1756
+
1757
+ /** {en}
1758
+ * @detail api
1759
+ * @group 方法
1760
+ * @brief Enables or disables in-ear monitoring.
1761
+ * @param enable Whether to enable in-ear monitoring. <br>
1762
+ * - true: Enable;
1763
+ * - false: (Default) Disable.
1764
+ * @order 77
1765
+ */
1766
+ enableEcho(enable: boolean): void;
1767
+
1768
+ /** {en}
1769
+ * @detail api
1770
+ * @group 方法
1771
+ * @brief Checks whether in-ear monitoring is enabled.
1772
+ * @return <br>
1773
+ * - true: Enabled;
1774
+ * - false: Disabled.
1775
+ * @order 78
1776
+ */
1777
+ isEnableEcho(): boolean;
1778
+ }
1779
+
1780
+ /** {en}
1781
+ * @detail api
1782
+ * @list overview
1783
+ * @brief The initial configurations for the live pusher.
1784
+ */
1785
+ export declare class VeLivePusherConfiguration {
1786
+ protected _instance: any;
1787
+ protected __init(...args: any[]): void;
1788
+ protected __new_instance(...args: any[]): $p_a.VeLivePusherConfiguration | $p_i.VeLivePusherConfiguration;
1789
+
1790
+ /** {en}
1791
+ * @detail api
1792
+ * @group 方法
1793
+ * @brief Sets the time interval between each attempt to reconnect.
1794
+ * @param interval The time interval between each attempt to reconnect, in seconds. The default value is `5`.
1795
+ * @order 2
1796
+ */
1797
+ setReconnectIntervalSeconds(interval: number): VeLivePusherConfiguration;
1798
+
1799
+ /** {en}
1800
+ * @detail api
1801
+ * @group 方法
1802
+ * @brief Gets the time interval between each attempt to reconnect.
1803
+ * @return <br>
1804
+ * The time interval between each attempt to reconnect, in seconds.
1805
+ * @order 3
1806
+ */
1807
+ getReconnectIntervalSeconds(): number;
1808
+
1809
+ /** {en}
1810
+ * @detail api
1811
+ * @group 方法
1812
+ * @brief Sets the number of attempts to reconnect after the initial attempt fails.
1813
+ * @param maxCount The number of attempts to reconnect after the initial attempt fails. The default value is `3`.
1814
+ * @order 4
1815
+ */
1816
+ setReconnectCount(maxCount: number): VeLivePusherConfiguration;
1817
+
1818
+ /** {en}
1819
+ * @detail api
1820
+ * @group 方法
1821
+ * @brief Gets the number of attempts to reconnect after the initial attempt fails.
1822
+ * @return <br>
1823
+ * The number of attempts to reconnect after the initial attempt fails.
1824
+ * @order 5
1825
+ *
1826
+ */
1827
+ getReconnectCount(): number;
1828
+
1829
+ /** {en}
1830
+ * @detail api
1831
+ * @group 方法
1832
+ * @brief Sets the video capture configurations.
1833
+ * @return <br>
1834
+ * The pusher configurations. See VeLivePusherConfiguration {@link #VeLivePusherConfiguration} for details.
1835
+ * @order 6
1836
+ * @param config The video capture configurations. See VeLiveVideoCaptureConfiguration for details.
1837
+ */
1838
+ setVideoCaptureConfig(config: VeLiveVideoCaptureConfiguration): VeLivePusherConfiguration;
1839
+
1840
+ /** {en}
1841
+ * @detail api
1842
+ * @group 方法
1843
+ * @brief Gets the video capture configurations.
1844
+ * @return <br>The video capture configurations. See VeLiveVideoCaptureConfiguration for details.
1845
+ * @order 7
1846
+ */
1847
+ getVideoCaptureConfig(): VeLiveVideoCaptureConfiguration;
1848
+
1849
+ /** {en}
1850
+ * @detail api
1851
+ * @group 方法
1852
+ * @brief Sets the audio capture configurations.
1853
+ * @return <br>
1854
+ * The pusher configurations. See VeLivePusherConfiguration {@link #VeLivePusherConfiguration} for details.
1855
+ * @order 7
1856
+ * @param config The audio capture configurations. See VeLiveAudioCaptureConfiguration for details.
1857
+ */
1858
+ setAudioCaptureConfig(config: VeLiveAudioCaptureConfiguration): VeLivePusherConfiguration;
1859
+
1860
+ /** {en}
1861
+ * @detail api
1862
+ * @group 方法
1863
+ * @brief Gets the audio capture configurations.
1864
+ * @return <br>The audio capture configurations. See VeLiveAudioCaptureConfiguration for details.
1865
+ * @order 8
1866
+ *
1867
+ */
1868
+ getAudioCaptureConfig(): VeLiveAudioCaptureConfiguration;
1869
+
1870
+ /** {en}
1871
+ * @platform android
1872
+ * @detail api
1873
+ * @group 方法
1874
+ * @brief Sets the context of the application.
1875
+ * @param context The context of the application.
1876
+ * @return <br>
1877
+ * The pusher configurations. See VeLivePusherConfiguration {@link #VeLivePusherConfiguration} for details.
1878
+ * @order 9
1879
+ */
1880
+ android_setContext(context: $p_a.Context): VeLivePusherConfiguration;
1881
+
1882
+ /** {en}
1883
+ * @platform android
1884
+ * @detail api
1885
+ * @group 方法
1886
+ * @brief Gets the context of the application.
1887
+ * @return <br>
1888
+ * The context of the application.
1889
+ * @order 10
1890
+ *
1891
+ */
1892
+ android_getContext(): $p_a.Context;
1893
+
1894
+ /** {en}
1895
+ * @detail api
1896
+ * @group 方法
1897
+ * @brief Sets advanced parameters. You can leave this parameter empty. If you need to use it, please contact BytePlus technical support.
1898
+ * @param params Extension parameters.
1899
+ * @return <br>
1900
+ * The pusher configurations. See VeLivePusherConfiguration {@link #VeLivePusherConfiguration} for details.
1901
+ * @order 11
1902
+ *
1903
+ */
1904
+ setExtraParameters(params: string): VeLivePusherConfiguration;
1905
+
1906
+ /** {en}
1907
+ * @platform android
1908
+ * @detail api
1909
+ * @group 方法
1910
+ * @brief Gets advanced parameters.
1911
+ * @return <br>
1912
+ * Advanced parameters.
1913
+ * @order 12
1914
+ *
1915
+ */
1916
+ android_getExtraParams(): $p_a.LiveSdkSetting;
1917
+
1918
+ /** {en}
1919
+ * @platform android
1920
+ * @detail api
1921
+ * @group 方法
1922
+ * @brief Creates the live pusher.
1923
+ * @return <br>
1924
+ * The live pusher. See VeLivePusher {@link #VeLivePusher} for details.
1925
+ * @order 1
1926
+ *
1927
+ */
1928
+ android_build(): VeLivePusher;
1929
+ }
1930
+ export declare class VeLiveFileRecorderManager extends $p_i.VeLiveFileRecorderManager {
1931
+ }
1932
+ export declare class VeLivePusherScreenCapture extends $p_i.VeLivePusher {
1933
+ }