@byteplus/react-native-live-push 1.1.3-rc.1 → 1.1.3-rc.3

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 (123) hide show
  1. package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushModule.java +13 -2
  2. package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushPackage.java +16 -13
  3. package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushView.java +16 -0
  4. package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushViewManager.java +7 -2
  5. package/android/src/main/java/com/volcengine/velive/rn/push/mixer/MixerManager.java +397 -0
  6. package/android/src/main/java/com/volcengine/velive/rn/push/mixer/MixerView.java +423 -0
  7. package/android/src/main/java/com/volcengine/velive/rn/push/mixer/MixerViewManager.java +79 -0
  8. package/android/src/main/java/com/volcengine/velive/rn/push/mixer/TextureMgr.java +168 -0
  9. package/android/src/main/java/com/volcengine/velive/rn/push/mixer/YuvHelper.java +165 -0
  10. package/ios/VeLiveMixerHelper.h +44 -0
  11. package/ios/VeLiveMixerHelper.m +591 -0
  12. package/ios/VeLiveMixerView.h +69 -0
  13. package/ios/VeLiveMixerView.m +592 -0
  14. package/ios/VeLiveMixerViewManager.m +92 -0
  15. package/lib/commonjs/index.js +1779 -980
  16. package/lib/commonjs/typescript/android/index.d.ts +47 -0
  17. package/lib/commonjs/typescript/codegen/android/api.d.ts +1527 -0
  18. package/lib/commonjs/typescript/codegen/android/callback.d.ts +91 -0
  19. package/lib/commonjs/typescript/codegen/android/errorcode.d.ts +26 -0
  20. package/lib/commonjs/typescript/codegen/android/index.d.ts +5 -0
  21. package/lib/commonjs/typescript/codegen/android/keytype.d.ts +846 -0
  22. package/lib/commonjs/typescript/codegen/android/types.d.ts +33 -0
  23. package/lib/commonjs/typescript/codegen/ios/api.d.ts +222 -0
  24. package/lib/commonjs/typescript/codegen/ios/callback.d.ts +80 -0
  25. package/lib/commonjs/typescript/codegen/ios/errorcode.d.ts +54 -0
  26. package/lib/commonjs/typescript/codegen/ios/external.d.ts +1 -0
  27. package/lib/commonjs/typescript/codegen/ios/index.d.ts +6 -0
  28. package/lib/commonjs/typescript/codegen/ios/keytype.d.ts +460 -0
  29. package/lib/commonjs/typescript/codegen/ios/types.d.ts +46 -0
  30. package/lib/commonjs/typescript/codegen/pack/api.d.ts +1835 -0
  31. package/lib/commonjs/typescript/codegen/pack/callback.d.ts +400 -0
  32. package/lib/commonjs/typescript/codegen/pack/errorcode.d.ts +35 -0
  33. package/lib/commonjs/typescript/codegen/pack/index.d.ts +5 -0
  34. package/lib/commonjs/typescript/codegen/pack/keytype.d.ts +1392 -0
  35. package/lib/commonjs/typescript/codegen/pack/types.d.ts +68 -0
  36. package/lib/commonjs/typescript/codegen/type-shim.d.ts +6 -0
  37. package/lib/commonjs/typescript/component.d.ts +15 -0
  38. package/lib/commonjs/typescript/core/api.d.ts +17 -0
  39. package/lib/commonjs/typescript/core/callback.d.ts +2 -0
  40. package/lib/commonjs/typescript/core/env.d.ts +29 -0
  41. package/lib/commonjs/typescript/core/errorcode.d.ts +2 -0
  42. package/lib/commonjs/typescript/core/index.d.ts +6 -0
  43. package/lib/commonjs/typescript/core/keytype.d.ts +17 -0
  44. package/lib/commonjs/typescript/core/mixer.d.ts +26 -0
  45. package/lib/commonjs/typescript/core/pusher.d.ts +16 -0
  46. package/lib/commonjs/typescript/index.d.ts +3 -0
  47. package/lib/commonjs/typescript/ios/extends.d.ts +41 -0
  48. package/lib/commonjs/typescript/platforms/android/extends.d.ts +8 -0
  49. package/lib/commonjs/typescript/platforms/android/helper.d.ts +8 -0
  50. package/lib/commonjs/typescript/platforms/android/mixer.d.ts +8 -0
  51. package/lib/commonjs/typescript/platforms/ios/extends.d.ts +17 -0
  52. package/lib/commonjs/typescript/platforms/ios/helper.d.ts +8 -0
  53. package/lib/commonjs/typescript/platforms/ios/mixer.d.ts +9 -0
  54. package/lib/commonjs/typescript/runtime.d.ts +1 -0
  55. package/lib/commonjs/typescript/view/MixView.d.ts +52 -0
  56. package/lib/commonjs/typescript/view/VeImageView.d.ts +19 -0
  57. package/lib/commonjs/typescript/view/VeTextView.d.ts +7 -0
  58. package/lib/commonjs/typescript/view/VeView.d.ts +7 -0
  59. package/lib/commonjs/typescript/view/VeWebView.d.ts +7 -0
  60. package/lib/commonjs/typescript/view/index.d.ts +5 -0
  61. package/lib/module/index.js +1776 -982
  62. package/lib/module/typescript/android/index.d.ts +47 -0
  63. package/lib/module/typescript/codegen/android/api.d.ts +1527 -0
  64. package/lib/module/typescript/codegen/android/callback.d.ts +91 -0
  65. package/lib/module/typescript/codegen/android/errorcode.d.ts +26 -0
  66. package/lib/module/typescript/codegen/android/index.d.ts +5 -0
  67. package/lib/module/typescript/codegen/android/keytype.d.ts +846 -0
  68. package/lib/module/typescript/codegen/android/types.d.ts +33 -0
  69. package/lib/module/typescript/codegen/ios/api.d.ts +222 -0
  70. package/lib/module/typescript/codegen/ios/callback.d.ts +80 -0
  71. package/lib/module/typescript/codegen/ios/errorcode.d.ts +54 -0
  72. package/lib/module/typescript/codegen/ios/external.d.ts +1 -0
  73. package/lib/module/typescript/codegen/ios/index.d.ts +6 -0
  74. package/lib/module/typescript/codegen/ios/keytype.d.ts +460 -0
  75. package/lib/module/typescript/codegen/ios/types.d.ts +46 -0
  76. package/lib/module/typescript/codegen/pack/api.d.ts +1835 -0
  77. package/lib/module/typescript/codegen/pack/callback.d.ts +400 -0
  78. package/lib/module/typescript/codegen/pack/errorcode.d.ts +35 -0
  79. package/lib/module/typescript/codegen/pack/index.d.ts +5 -0
  80. package/lib/module/typescript/codegen/pack/keytype.d.ts +1392 -0
  81. package/lib/module/typescript/codegen/pack/types.d.ts +68 -0
  82. package/lib/module/typescript/codegen/type-shim.d.ts +6 -0
  83. package/lib/module/typescript/component.d.ts +15 -0
  84. package/lib/module/typescript/core/api.d.ts +17 -0
  85. package/lib/module/typescript/core/callback.d.ts +2 -0
  86. package/lib/module/typescript/core/env.d.ts +29 -0
  87. package/lib/module/typescript/core/errorcode.d.ts +2 -0
  88. package/lib/module/typescript/core/index.d.ts +6 -0
  89. package/lib/module/typescript/core/keytype.d.ts +17 -0
  90. package/lib/module/typescript/core/mixer.d.ts +26 -0
  91. package/lib/module/typescript/core/pusher.d.ts +16 -0
  92. package/lib/module/typescript/index.d.ts +3 -0
  93. package/lib/module/typescript/ios/extends.d.ts +41 -0
  94. package/lib/module/typescript/platforms/android/extends.d.ts +8 -0
  95. package/lib/module/typescript/platforms/android/helper.d.ts +8 -0
  96. package/lib/module/typescript/platforms/android/mixer.d.ts +8 -0
  97. package/lib/module/typescript/platforms/ios/extends.d.ts +17 -0
  98. package/lib/module/typescript/platforms/ios/helper.d.ts +8 -0
  99. package/lib/module/typescript/platforms/ios/mixer.d.ts +9 -0
  100. package/lib/module/typescript/runtime.d.ts +1 -0
  101. package/lib/module/typescript/view/MixView.d.ts +52 -0
  102. package/lib/module/typescript/view/VeImageView.d.ts +19 -0
  103. package/lib/module/typescript/view/VeTextView.d.ts +7 -0
  104. package/lib/module/typescript/view/VeView.d.ts +7 -0
  105. package/lib/module/typescript/view/VeWebView.d.ts +7 -0
  106. package/lib/module/typescript/view/index.d.ts +5 -0
  107. package/lib/typescript/codegen/android/api.d.ts +1 -121
  108. package/lib/typescript/codegen/ios/api.d.ts +1 -28
  109. package/lib/typescript/codegen/pack/api.d.ts +1 -133
  110. package/lib/typescript/core/api.d.ts +17 -2
  111. package/lib/typescript/core/keytype.d.ts +15 -0
  112. package/lib/typescript/core/mixer.d.ts +26 -0
  113. package/lib/typescript/index.d.ts +1 -0
  114. package/lib/typescript/platforms/android/extends.d.ts +8 -0
  115. package/lib/typescript/platforms/android/mixer.d.ts +8 -0
  116. package/lib/typescript/platforms/ios/mixer.d.ts +9 -0
  117. package/lib/typescript/view/MixView.d.ts +52 -0
  118. package/lib/typescript/view/VeImageView.d.ts +19 -0
  119. package/lib/typescript/view/VeTextView.d.ts +7 -0
  120. package/lib/typescript/view/VeView.d.ts +7 -0
  121. package/lib/typescript/view/VeWebView.d.ts +7 -0
  122. package/lib/typescript/view/index.d.ts +5 -0
  123. package/package.json +1 -1
@@ -0,0 +1,1527 @@
1
+ import { VeLiveVideoBufferType, VeLivePixelFormat, VeLiveVideoRotation, VeLiveVideoEffectLicenseConfiguration, VeLivePusherLogLevel, VeLivePusherLogConfig, VeLivePusherRenderMode, VeLiveVideoMirrorType, VeLiveVideoCaptureType, VeLiveAudioCaptureType, VeLiveVideoEncoderConfiguration, VeLiveAudioEncoderConfiguration, VeLiveFileRecorderConfiguration, VeLiveOrientation, VeLiveAudioBufferType, VeLiveAudioSampleRate, VeLiveAudioChannel, VeLiveVideoCaptureConfiguration, VeLiveAudioCaptureConfiguration } from './keytype';
2
+ import { int, long, Matrix, ByteBuffer, Runnable, float, String, EGLContext, View, Bitmap, Intent, Context, LiveSdkSetting } from './types';
3
+ import { VeLiveVideoEffectCallback, VeLiveVideoEffectHandleCallback, VeLivePusherObserver, VeLivePusherStatisticsObserver, VeLiveFileRecordingListener, VeLiveVideoFrameFilter, VeLiveAudioFrameFilter, VeLiveVideoFrameListener, VeLiveAudioFrameListener, VeLiveSnapshotListener, VeLiveMediaPlayerListener, VeLiveMediaPlayerFrameListener } from './callback';
4
+ export declare class VeLiveVideoFrame {
5
+ constructor(width: int, height: int, pts: long, texId: int, isOes: boolean, matrix: Matrix);
6
+ constructor(width: int, height: int, pts: long, byteBuffer: ByteBuffer);
7
+ constructor(width: int, height: int, pts: long, data: ArrayBuffer);
8
+ constructor();
9
+ width: number;
10
+ height: number;
11
+ ptsUs: number;
12
+ textureId: number;
13
+ data: any;
14
+
15
+ /** {en}
16
+ * @detail api
17
+ * @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.
18
+ *
19
+ */
20
+ retain(): void;
21
+
22
+ /** {en}
23
+ * @detail api
24
+ * @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.
25
+ *
26
+ */
27
+ release(): void;
28
+
29
+ /** {en}
30
+ * @detail api
31
+ * @brief Gets the data type of the video.
32
+ * @return <br>
33
+ * The data type of the video. See VeLiveVideoBufferType {@link #VeLiveVideoBufferType} for details.
34
+ *
35
+ */
36
+ getBufferType(): VeLiveVideoBufferType;
37
+
38
+ /** {en}
39
+ * @detail api
40
+ * @brief Sets the data type of the video.
41
+ * @param bufferType The data type of the video. See VeLiveVideoBufferType {@link #VeLiveVideoBufferType} for details.
42
+ * @return <br>
43
+ * The video frame object. See VeLiveVideoFrame {@link #VeLiveVideoFrame} for details.
44
+ *
45
+ */
46
+ setBufferType(bufferType: VeLiveVideoBufferType): this;
47
+
48
+ /** {en}
49
+ * @detail api
50
+ * @brief Gets the pixel format.
51
+ * @return <br>
52
+ * The pixel format. See VeLivePixelFormat {@link #VeLivePixelFormat} for details.
53
+ *
54
+ */
55
+ getPixelFormat(): VeLivePixelFormat;
56
+
57
+ /** {en}
58
+ * @detail api
59
+ * @brief Sets the pixel format.
60
+ * @param pixelFormat The pixel format. See VeLivePixelFormat {@link #VeLivePixelFormat} for details.
61
+ * @return <br>
62
+ * The video frame object. See VeLiveVideoFrame {@link #VeLiveVideoFrame} for details.
63
+ *
64
+ */
65
+ setPixelFormat(pixelFormat: VeLivePixelFormat): this;
66
+
67
+ /** {en}
68
+ * @detail api
69
+ * @brief Gets the rotation angle in a clockwise direction.
70
+ * @return <br>
71
+ * The rotation angle in a clockwise direction. See VeLiveVideoRotation {@link #VeLiveVideoRotation} for details.
72
+ *
73
+ */
74
+ getRotation(): VeLiveVideoRotation;
75
+
76
+ /** {en}
77
+ * @detail api
78
+ * @brief Sets the rotation angle in a clockwise direction.
79
+ * @param rotation The rotation angle in a clockwise direction. See VeLiveVideoRotation {@link #VeLiveVideoRotation} for details.
80
+ * @return <br>
81
+ * The video frame object. See VeLiveVideoFrame {@link #VeLiveVideoFrame} for details.
82
+ *
83
+ */
84
+ setRotation(rotation: VeLiveVideoRotation): this;
85
+
86
+ /** {en}
87
+ * @detail api
88
+ * @brief Gets the width of the video frame.
89
+ * @return <br>
90
+ * The width of the video frame.
91
+ *
92
+ */
93
+ getWidth(): int;
94
+
95
+ /** {en}
96
+ * @detail api
97
+ * @brief Gets the height of the video frame.
98
+ * @return <br>
99
+ * The height of the video frame.
100
+ *
101
+ */
102
+ getHeight(): int;
103
+
104
+ /** {en}
105
+ * @detail api
106
+ * @brief Gets the width of the rotated video frame.
107
+ * @return <br>
108
+ * The width of the rotated video frame.
109
+ *
110
+ */
111
+ getRotatedWidth(): int;
112
+
113
+ /** {en}
114
+ * @detail api
115
+ * @brief Gets the height of the rotated video frame.
116
+ * @return <br>
117
+ * The height of the rotated video frame.
118
+ *
119
+ */
120
+ getRotatedHeight(): int;
121
+
122
+ /** {en}
123
+ * @detail api
124
+ * @brief Gets the timestamp of the video frame.
125
+ * @return <br>
126
+ * The timestamp of the video frame, in μs.
127
+ *
128
+ */
129
+ getPts(): long;
130
+
131
+ /** {en}
132
+ * @detail api
133
+ * @brief Gets the texture ID.
134
+ * @return <br>
135
+ * The texture ID.
136
+ *
137
+ */
138
+ getTextureId(): int;
139
+
140
+ /** {en}
141
+ * @detail api
142
+ * @brief Gets the texture matrix.
143
+ * @return <br>
144
+ * The texture matrix.
145
+ *
146
+ */
147
+ getTextureMatrix(): Matrix;
148
+
149
+ /** {en}
150
+ * @detail api
151
+ * @brief Gets the video data in the format of ByteBuffer.
152
+ * @return <br>
153
+ * The video data in the format of ByteBuffer.
154
+ *
155
+ */
156
+ getBuffer(): ByteBuffer;
157
+
158
+ /** {en}
159
+ * @detail api
160
+ * @brief Gets the video data in the format of byte [].
161
+ * @return <br>
162
+ * The video data in the format of byte [].
163
+ *
164
+ */
165
+ getData(): ArrayBuffer;
166
+
167
+ /** {en}
168
+ * @detail api
169
+ * @brief Gets the internal release callback.
170
+ * @return <br>
171
+ * The internal release callback.
172
+ *
173
+ */
174
+ getReleaseCallback(): Runnable;
175
+
176
+ /** {en}
177
+ * @detail api
178
+ * @brief Sets the internal release callback.
179
+ * @param releaseCallback The internal release callback.
180
+ * @return <br>
181
+ * The video frame object. See VeLiveVideoFrame {@link #VeLiveVideoFrame} for details.
182
+ *
183
+ */
184
+ setReleaseCallback(releaseCallback: Runnable): this;
185
+ }
186
+ export declare class VeLiveCameraDevice {
187
+
188
+ /** {en}
189
+ * @detail api
190
+ * @brief Gets the frame rate range supported by the camera.
191
+ * @return <br>
192
+ * The frame rate range supported by the camera.
193
+ * @notes <br>Call this method after calling [startVideoCapture](#VeLivePusher-startvideocapture) to start camera capture.
194
+ * @order 66
195
+ *
196
+ */
197
+ getRealFpsRange(): Array<int>;
198
+
199
+ /** {en}
200
+ * @detail api
201
+ * @brief Enables or disables the flashlight.
202
+ * @return <br>
203
+ * - 0: Success;
204
+ * - ≠ 0: Failure.
205
+ * @notes <br>Call this method after calling [startVideoCapture](#VeLivePusher-startvideocapture) to start camera capture.
206
+ * @order 67
207
+ * @param enable Whether to enable the flashlight. <br>
208
+ * - true: Enable;
209
+ * - false: (Default) Disable.
210
+ *
211
+ */
212
+ enableTorch(enable: boolean): int;
213
+
214
+ /** {en}
215
+ * @detail api
216
+ * @brief Sets the zoom factor of the camera.
217
+ * @return <br>
218
+ * - 0: Success;
219
+ * - ≠ 0: Failure.
220
+ * @notes <br>Call this method after calling [startVideoCapture](#VeLivePusher-startvideocapture) to start camera capture.
221
+ * @order 68
222
+ * @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)].
223
+ *
224
+ */
225
+ setZoomRatio(ratio: float): int;
226
+
227
+ /** {en}
228
+ * @detail api
229
+ * @brief Gets the current zoom factor of the camera.
230
+ * @return <br>
231
+ * - ≤ 0: The camera does not support zooming;
232
+ * - \\\\> 0: The zoom factor.
233
+ * @notes <br>Call this method after calling [startVideoCapture](#VeLivePusher-startvideocapture) to start camera capture.
234
+ * @order 68
235
+ *
236
+ */
237
+ getCurrentZoomRatio(): float;
238
+
239
+ /** {en}
240
+ * @detail api
241
+ * @brief Gets the maximum zoom factor of the camera.
242
+ * @return <br>
243
+ * - ≤ 0: The camera does not support zooming;
244
+ * - \\\\> 0: The maximum zoom factor.
245
+ * @notes <br>Call this method after calling [startVideoCapture](#VeLivePusher-startvideocapture) to start camera capture.
246
+ * @order 69
247
+ *
248
+ */
249
+ getMaxZoomRatio(): float;
250
+
251
+ /** {en}
252
+ * @detail api
253
+ * @brief Gets the minimum zoom factor of the camera.
254
+ * @return <br>
255
+ * - ≤ 0: The camera does not support zooming;
256
+ * - \\\\> 0: The minimum zoom factor.
257
+ * @notes <br>Call this method after calling [startVideoCapture](#VeLivePusher-startvideocapture) to start camera capture.
258
+ * @order 70
259
+ *
260
+ */
261
+ getMinZoomRatio(): float;
262
+
263
+ /** {en}
264
+ * @detail api
265
+ * @brief Checks whether autofocus is supported.
266
+ * @return <br>
267
+ * - true: Supported;
268
+ * - false: Not supported.
269
+ * @notes <br>Call this method after calling [startVideoCapture](#VeLivePusher-startvideocapture) to start camera capture.
270
+ * @order 71
271
+ *
272
+ */
273
+ isAutoFocusEnabled(): boolean;
274
+
275
+ /** {en}
276
+ * @detail api
277
+ * @brief Enables or disables autofocus.
278
+ * @return <br>
279
+ * - 0: Success;
280
+ * - ≠ 0: Failure.
281
+ * @notes <br>Call this method after calling [startVideoCapture](#VeLivePusher-startvideocapture) to start camera capture.
282
+ * @order 72
283
+ * @param enable Whether to enable autofocus.
284
+ * - true: (Default) Enable;
285
+ * - false: Disable.
286
+ *
287
+ */
288
+ enableAutoFocus(enable: boolean): int;
289
+
290
+ /** {en}
291
+ * @detail api
292
+ * @brief Sets the focus position of the camera.
293
+ * @return <br>
294
+ * - 0: Success;
295
+ * - ≠ 0: Failure.
296
+ * @notes <br>Call this method after calling [startVideoCapture](#VeLivePusher-startvideocapture) to start camera capture.
297
+ * @order 73
298
+ * @param viewW The width of the current view.
299
+ * @param viewH The height of the current view.
300
+ * @param x The horizontal coordinate of the focus point from the upper left corner of the current view.
301
+ * @param y The vertical coordinate of the focus point from the upper left corner of the current view.
302
+ *
303
+ */
304
+ setFocusPosition(viewW: int, viewH: int, x: int, y: int): int;
305
+
306
+ /** {en}
307
+ * @detail api
308
+ * @brief Checks if manual exposure setting is available for the currently used camera.
309
+ * @return - YES: Available.
310
+ * - NO: Unavailable.
311
+ * @notes You must call [startVideoCapture](#VeLivePusher-startvideocapture) to start SDK internal video capturing before calling this API.
312
+ * @order 74
313
+ *
314
+ */
315
+ isExposurePositionSupported(): boolean;
316
+
317
+ /** {en}
318
+ * @return - =0: Success.
319
+ * - ≠0: Failure.
320
+ * @detail api
321
+ * @brief Sets the manual exposure position for the currently used camera.
322
+ * @notes - You must call [startVideoCapture](#VeLivePusher-startvideocapture) to start SDK internal video capturing, and use SDK internal rendering before calling this API.
323
+ * - The camera exposure point setting will be invalid after calling [stopVideoCapture](#VeLivePusher-stopvideocapture) to stop internal capturing.
324
+ * @order 75
325
+ * @param viewW The width of the current view.
326
+ * @param viewH The height of the current view.
327
+ * @param x The horizontal coordinate of the focus point from the upper left corner of the current view.
328
+ * @param y The vertical coordinate of the focus point from the upper left corner of the current view.
329
+ *
330
+ */
331
+ setExposurePosition(viewW: int, viewH: int, x: int, y: int): int;
332
+
333
+ /** {en}
334
+ * @return - ≤0: The camera does not support exposure;
335
+ * - \\>0: The minimum exposure compensation.
336
+ * @detail api
337
+ * @brief Gets the minimum exposure compensation of the camera.
338
+ * @notes Call this method after calling [startVideoCapture](#VeLivePusher-startvideocapture) to start camera capture.
339
+ * @order 76
340
+ *
341
+ */
342
+ getMinExposureCompensation(): float;
343
+
344
+ /** {en}
345
+ * @return - ≤0: The camera does not support exposure;
346
+ * - \\>0: The maximum exposure compensation.
347
+ * @detail api
348
+ * @brief Gets the maximum exposure compensation of the camera.
349
+ * @notes Call this method after calling [startVideoCapture](#VeLivePusher-startvideocapture) to start camera capture.
350
+ * @order 77
351
+ *
352
+ */
353
+ getMaxExposureCompensation(): float;
354
+
355
+ /** {en}
356
+ * @return - =0: Success.
357
+ * - ≠0: Failure.
358
+ * @detail api
359
+ * @brief Sets the exposure compensation for the currently used camera.
360
+ * @notes <br>
361
+ * - You must call [startVideoCapture](#VeLivePusher-startvideocapture) to start SDK internal video capturing, and use SDK internal rendering before calling this API.
362
+ * - The camera exposure compensation setting will be invalid after calling [stopVideoCapture](#VeLivePusher-stopvideocapture) to stop internal capturing.
363
+ * @order 78
364
+ * @param value The range of the exposure compensation is [[getMinExposureCompensation](#VeLiveCameraDevice-getminexposurecompensation),[getMaxExposureCompensation](#VeLiveCameraDevice-getmaxexposurecompensation)], Default to 0, which means no exposure compensation.
365
+ *
366
+ */
367
+ setExposureCompensation(value: float): int;
368
+ }
369
+ export declare class VeLiveVideoEffectManager {
370
+
371
+ /** {en}
372
+ * @detail api
373
+ * @brief Initializes the special effects manager.
374
+ * @return <br>
375
+ * - 0: Success;
376
+ * - -1: Failure.
377
+ * @order 89
378
+ * @param config The special effects configurations. See VeLiveVideoEffectLicenseConfiguration for details.
379
+ *
380
+ */
381
+ setupWithConfig(config: VeLiveVideoEffectLicenseConfiguration): int;
382
+
383
+ /** {en}
384
+ * @detail api
385
+ * @brief Updates the special effects license. This method is effective only if you authenticate the license online.
386
+ * @param callback The result callback.
387
+ * @notes <br>
388
+ * - Call this method after you set the video effects license by calling setupWithConfig {@link #setupWithConfig};
389
+ * - This method is an asynchronous operation.
390
+ * @order 90
391
+ *
392
+ */
393
+ updateLicense(callback: VeLiveVideoEffectCallback): void;
394
+
395
+ /** {en}
396
+ * @detail api
397
+ * @brief Creates or destroys the special effects engine.
398
+ * @return <br>
399
+ * - 0: Success;
400
+ * - -1: Failure.
401
+ * @notes <br>
402
+ * - Call this method after calling [setupWithConfig](broadcast-sdk-for-android-api#VeLiveVideoEffectManager-setupwithconfig) and [setAlgorithmModelPath](broadcast-sdk-for-android-api#VeLiveVideoEffectManager-setalgorithmmodelpath) ;
403
+ * - 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;
404
+ * - 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;
405
+ * - Creating or destroying the special effects engine repeatedly can result in increased processing time.
406
+ * @order 92
407
+ * @param enable Whether to create or destroy the special effects engine.<br>
408
+ * - true: Create;
409
+ * - false: (Default) Destroy.
410
+ * @param callback [VeLiveVideoEffectCallback](broadcast-sdk-for-android-callback\\#VeLiveVideoEffectCallback), the listener for special effect events.
411
+ *
412
+ */
413
+ setEnable(enable: boolean, callback: VeLiveVideoEffectCallback): void;
414
+
415
+ /** {en}
416
+ * @detail api
417
+ * @brief Sets the path to the algorithm model package of the special effects.
418
+ * @param path The path to the algorithm model package of the special effects.
419
+ * @return <br>
420
+ * - 0: Success;
421
+ * - -1: Failure.
422
+ * @notes <br>
423
+ * Call this method after you set the special effects license by calling setupWithConfig {@link #setupWithConfig}.
424
+ * @order 91
425
+ *
426
+ */
427
+ setAlgorithmModelPath(path: String): int;
428
+
429
+ /** {en}
430
+ * @detail api
431
+ * @brief Sets the special effects you want to apply to the video. You can choose effects from ComposeMakeup.bundle.
432
+ * @param nodes The paths to the special effects resource.
433
+ * @return <br>
434
+ * - 0: Success;
435
+ * - -1: Failure.
436
+ * @notes <br>
437
+ * - Call this method after calling setEnable {@link #VeLiveVideoEffectManager #setEnable};
438
+ * - If you make multiple calls to this method, only the last call takes effect;
439
+ * - To add more effects to the existing effects settings, call appendComposeNodes {@link #VeLiveVideoEffectManager#appendComposeNodes}.
440
+ * @order 93
441
+ *
442
+ */
443
+ setComposeNodes(nodes: Array<String>): int;
444
+
445
+ /** {en}
446
+ * @detail api
447
+ * @brief Adds one or more effects to the existing effects settings that you have configured by calling setComposeNodes {@link #VeLiveVideoEffectManager#setComposeNodes}.
448
+ * @param nodes The paths to the special effects resource.
449
+ * @return <br>
450
+ * - 0: Success;
451
+ * - -1: Failure.
452
+ * @notes <br>
453
+ * - Call this method after calling setEnable {@link #VeLiveVideoEffectManager #setEnable}.
454
+ * @order 94
455
+ *
456
+ */
457
+ appendComposeNodes(nodes: Array<String>): int;
458
+
459
+ /** {en}
460
+ * @detail api
461
+ * @brief Removes one or more special effects resource set by the setComposeNodes{@link #VeLiveVideoEffectManager#setComposeNodes} or appendComposeNodes{@link #VeLiveVideoEffectManager#appendComposeNodes} methods.
462
+ * @param nodes The paths to the special effects resource.
463
+ * @return <br>
464
+ * - 0: Success;
465
+ * - -1: Failure.
466
+ * @notes <br>
467
+ * - Call this method after calling setEnable {@link #VeLiveVideoEffectManager #setEnable}.
468
+ * @order 94
469
+ *
470
+ */
471
+ removeComposeNodes(nodes: Array<String>): int;
472
+
473
+ /** {en}
474
+ * @detail api
475
+ * @brief Sets the intensity of a special effect.
476
+ * @param node The path to the special effects resource.
477
+ * @param key The key of the resource.
478
+ * @param intensity The intensity of the effect. The value range is [0.0, 1.0].
479
+ * @return <br>
480
+ * - 0: Success;
481
+ * - -1: Failure.
482
+ * @notes <br>
483
+ * - Call this method after calling setComposeNodes {@link #VeLiveVideoEffectManager#setComposeNodes} or appendComposeNodes {@link #VeLiveVideoEffectManager#appendComposeNodes};
484
+ * - 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.
485
+ * @order 95
486
+ *
487
+ */
488
+ updateComposerNodeIntensity(node: String, key: String, intensity: float): int;
489
+
490
+ /** {en}
491
+ * @detail api
492
+ * @brief Sets the color filter.
493
+ * @param path The absolute path to the filter resource.
494
+ * @return <br>
495
+ * - 0: Success;
496
+ * - -1: Failure.
497
+ * @notes <br>
498
+ * Call this method after calling setEnable {@link #VeLiveVideoEffectManager #setEnable}.
499
+ * @order 96
500
+ *
501
+ */
502
+ setFilter(path: String): int;
503
+
504
+ /** {en}
505
+ * @detail api
506
+ * @brief Sets the intensity of the color filter.
507
+ * @return <br>
508
+ * - 0: Success;
509
+ * - -1: Failure.
510
+ * @notes <br>Call this method after calling setFilter.
511
+ * @order 97
512
+ * @param intensity The intensity. The value range is [0.0, 1.0].
513
+ *
514
+ */
515
+ updateFilterIntensity(intensity: float): int;
516
+
517
+ /** {en}
518
+ * @detail api
519
+ * @brief Sets the sticker.
520
+ * @param path The absolute path to the sticker resource.
521
+ * @return <br>
522
+ * - 0: Success;
523
+ * - -1: Failure.
524
+ * @notes <br>
525
+ * Call this method after calling setEnable {@link #VeLiveVideoEffectManager #setEnable}.
526
+ * @order 98
527
+ *
528
+ */
529
+ setSticker(path: String): int;
530
+
531
+ /** {en}
532
+ * @detail api
533
+ * @brief Advanced settings for special effects.
534
+ * @param callback A callback function that takes a handle as an argument.
535
+ * @param isGLThread Whether the callback is called in the GL thread.
536
+ * @param isAsync Whether the callback is executed synchronously.
537
+ * @notes <br>
538
+ * Call the method after calling setEnable {@link #VeLiveVideoEffectManager #setEnable}. Do not perform frequent synchronization operations in the main thread.
539
+ * @order 99
540
+ *
541
+ */
542
+ setAdvancedFeature(callback: VeLiveVideoEffectHandleCallback, isGLThread: boolean, isAsync: boolean): int;
543
+ }
544
+ export declare class VeLivePusher {
545
+
546
+ /** {en}
547
+ * @detail api
548
+ * @hidden
549
+ * @brief Gets the version number of the current SDK.
550
+ * @return <br>
551
+ * The version number of the current SDK.
552
+ *
553
+ */
554
+ static getVersion(): String;
555
+
556
+ /** {en}
557
+ * @detail api
558
+ * @brief Sets the level of the output log.
559
+ * @param logLevel The log level. See VeLivePusherLogLevel {@link #VeLivePusherLogLevel} for details.
560
+ * @order 60
561
+ *
562
+ */
563
+ static setLogLevel(logLevel: VeLivePusherLogLevel): void;
564
+
565
+ /** {en}
566
+ * @detail api
567
+ * @hidden
568
+ * @brief Sets log configurations.
569
+ * @param config The log level. See VeLivePusherLogConfig {@link #VeLivePusherLogConfig} for details。
570
+ *
571
+ */
572
+ static setLogConfig(config: VeLivePusherLogConfig): void;
573
+
574
+ /** {en}
575
+ * @detail api
576
+ * @brief Sets the context of OpenGL.
577
+ * @param context The context of OpenGL.
578
+ * @order 61
579
+ *
580
+ */
581
+ static setEGLContext(context: EGLContext): void;
582
+
583
+ /** {en}
584
+ * @detail api
585
+ * @brief Stops capturing and pushing streams and destroys the pusher. Call this method after stopPush {@link #VeLivePusher#stopPush} is called.
586
+ * @order 13
587
+ *
588
+ */
589
+ release(): void;
590
+
591
+ /** {en}
592
+ * @detail api
593
+ * @brief Sets an observer to listen for live pusher events, including errors, statuses, network quality, device information, and first frame rendering.
594
+ * @param observer The observer. Refer to VeLivePusherObserver {@link #VeLivePusherObserver} for details.
595
+ * @notes <br>
596
+ * - This method must be called after the live pusher is created;
597
+ * - If you make multiple calls to this method, only the last call takes effect.
598
+ * @order 1
599
+ *
600
+ */
601
+ setObserver(observer: VeLivePusherObserver): void;
602
+
603
+ /** {en}
604
+ * @detail api
605
+ * @brief Sets an observer to periodically report push-stream statistics.
606
+ * @param observer The observer. Refer to VeLivePusherStatisticsObserver {@link #VeLivePusherStatisticsObserver} for details.
607
+ * @param interval The time interval between two callbacks, in seconds. The default value is `5`.
608
+ * @notes <br>
609
+ * - This method must be called after the live pusher is created;
610
+ * - If you make multiple calls to this method, only the last call takes effect.
611
+ * @order 15
612
+ *
613
+ */
614
+ setStatisticsObserver(observer: VeLivePusherStatisticsObserver, interval: int): void;
615
+
616
+ /** {en}
617
+ * @detail api
618
+ * @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.
619
+ * @param view The preview view.
620
+ * @order 16
621
+ *
622
+ */
623
+ setRenderView(view: View): Promise<void>;
624
+
625
+ /** {en}
626
+ * @detail api
627
+ * @brief Sets fill mode for the local camera preview.
628
+ * @param mode The fill mode.
629
+ *
630
+ */
631
+ setRenderFillMode(mode: VeLivePusherRenderMode): void;
632
+
633
+ /** {en}
634
+ * @detail api
635
+ * @brief Enables or disables mirroring for the local preview and the streamed video.
636
+ * @param type Mirror mode. See VeLiveVideoMirrorType {@link #VeLiveVideoMirrorType} for details.
637
+ * @param mirror Whether to enable mirroring. <br>
638
+ * - true: Enable;
639
+ * - false: Disable.
640
+ * @order 17
641
+ *
642
+ */
643
+ setVideoMirror(type: VeLiveVideoMirrorType, mirror: boolean): void;
644
+
645
+ /** {en}
646
+ * @detail api
647
+ * @brief Starts video capture.
648
+ * @notes <br>After calling this method, you can stop video capture by calling [stopVideoCapture](#VeLivePusher-stopvideocapture).
649
+ * @order 18
650
+ * @param type The video capture type. See VeLiveVideoCaptureType{@link #VeLiveVideoCaptureType} for details.
651
+ *
652
+ *
653
+ */
654
+ startVideoCapture(type: VeLiveVideoCaptureType): void;
655
+
656
+ /** {en}
657
+ * @detail api
658
+ * @brief Stops video capture.
659
+ * @notes <br>After calling this method, you can start video capture by calling [startVideoCapture](#VeLivePusher-startvideocapture).
660
+ * @order 19
661
+ *
662
+ */
663
+ stopVideoCapture(): void;
664
+
665
+ /** {en}
666
+ * @detail api
667
+ * @brief Starts audio capture.
668
+ * @notes <br>After calling this method, you can stop audio capture by calling [stopAudioCapture](#VeLivePusher-stopaudiocapture).
669
+ * @order 20
670
+ * @param type The audio capture type. See VeLiveAudioCaptureType {@link #VeLiveAudioCaptureType} for details.
671
+ *
672
+ */
673
+ startAudioCapture(type: VeLiveAudioCaptureType): void;
674
+
675
+ /** {en}
676
+ * @detail api
677
+ * @brief Stops audio capture.
678
+ * @notes <br>After calling this method, you can start audio capture by calling [startAudioCapture](#VeLivePusher-startaudiocapture).
679
+ * @order 21
680
+ *
681
+ */
682
+ stopAudioCapture(): void;
683
+
684
+ /** {en}
685
+ * @detail api
686
+ * @brief Switches the video capture type.
687
+ * @notes <br>This method must be called after [startVideoCapture](#VeLivePusher-startvideocapture) is called.
688
+ * @order 22
689
+ * @param type The video capture type. See VeLiveVideoCaptureType {@link #VeLiveVideoCaptureType} for details.
690
+ *
691
+ */
692
+ switchVideoCapture(type: VeLiveVideoCaptureType): void;
693
+
694
+ /** {en}
695
+ * @detail api
696
+ * @brief Switches audio capture type.
697
+ * @notes <br>This method must be called after [startVideoCapture](#VeLivePusher-startvideocapture) is called.
698
+ * @order 23
699
+ * @param type The audio capture type. See VeLiveAudioCaptureType {@link #VeLiveAudioCaptureType} for details.
700
+ *
701
+ */
702
+ switchAudioCapture(type: VeLiveAudioCaptureType): void;
703
+
704
+ /** {en}
705
+ * @detail api
706
+ * @brief Gets the current video capture type.
707
+ * @return <br>
708
+ * The video capture type. See VeLiveVideoCaptureType {@link #VeLiveVideoCaptureType} for details.
709
+ * @order 24
710
+ *
711
+ */
712
+ getCurrentVideoCaptureType(): VeLiveVideoCaptureType;
713
+
714
+ /** {en}
715
+ * @detail api
716
+ * @brief Gets the current audio capture type.
717
+ * @return <br>
718
+ * The audio capture type. See VeLiveAudioCaptureType {@link #VeLiveAudioCaptureType} for details.
719
+ * @order 25
720
+ *
721
+ */
722
+ getCurrentAudioCaptureType(): VeLiveAudioCaptureType;
723
+
724
+ /** {en}
725
+ * @detail api
726
+ * @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`.
727
+ * @param image The static image to push.
728
+ * @order 26
729
+ *
730
+ */
731
+ updateCustomImage(image: Bitmap): Promise<void>;
732
+
733
+ /** {en}
734
+ * @detail api
735
+ * @brief Gets the camera manager. With the camera manager, you can do the following:
736
+ * - Control the flashlight
737
+ * - Set the camera zoom
738
+ * - Set autofocus
739
+ * @return <br>
740
+ * The camera manager. See VeLiveCameraDevice {@link #VeLiveCameraDevice} for details.
741
+ * @notes <br>
742
+ * To use this method, you must first call startVideoCapture {@link #startVideoCapture} and set VeLiveVideoCaptureType {@link #VeLiveVideoCaptureType} to `VeLiveVideoCaptureFrontCamera` or `VeLiveVideoCaptureBackCamera`.
743
+ * @order 27
744
+ *
745
+ */
746
+ getCameraDevice(): VeLiveCameraDevice;
747
+
748
+ /** {en}
749
+ * @detail api
750
+ * @brief Sets video encoding parameters for the pushed stream.
751
+ * @notes This method can be called before or after live streaming starts.
752
+ * @order 28
753
+ * @param config The video encoding parameters, including the video resolution, encoding format, target bitrate, and GOP size. For details, see VeLiveVideoEncoderConfiguration {@link #VeLiveVideoEncoderConfiguration}.
754
+ *
755
+ */
756
+ setVideoEncoderConfiguration(config: VeLiveVideoEncoderConfiguration): void;
757
+
758
+ /** {en}
759
+ * @detail api
760
+ * @brief Gets video encoding parameters for the pushed stream.
761
+ * @return <br>
762
+ * The video encoding parameters, including the video resolution, encoding format, target bitrate, and GOP size. For details, see VeLiveVideoEncoderConfiguration {@link #VeLiveVideoEncoderConfiguration}.
763
+ * @order 29
764
+ *
765
+ */
766
+ getVideoEncoderConfiguration(): VeLiveVideoEncoderConfiguration;
767
+
768
+ /** {en}
769
+ * @detail api
770
+ * @brief Sets audio encoding parameters for the pushed stream.
771
+ * @notes <br>This method must be called before calling [startPush](#VeLivePusher-startpush) or [startPushWithUrls](#VeLivePusher-startpushwithurls).
772
+ * @order 30
773
+ * @param config The audio encoding parameters. See [VeLiveAudioEncoderConfiguration](147521#VeLiveAudioEncoderConfiguration) for details.
774
+ *
775
+ */
776
+ setAudioEncoderConfiguration(config: VeLiveAudioEncoderConfiguration): void;
777
+
778
+ /** {en}
779
+ * @detail api
780
+ * @brief Gets audio encoding parameters for the pushed stream.
781
+ * @return <br>The audio encoding parameters. See VeLiveAudioEncoderConfiguration for details.
782
+ * @order 31
783
+ *
784
+ */
785
+ getAudioEncoderConfiguration(): VeLiveAudioEncoderConfiguration;
786
+
787
+ /** {en}
788
+ * @detail api
789
+ * @brief Starts streaming.
790
+ * @param url The push stream address.
791
+ * @order 32
792
+ *
793
+ */
794
+ startPush(url: String): void;
795
+
796
+ /** {en}
797
+ * @detail api
798
+ * @brief Starts streaming with one or more push stream addresses.
799
+ * @param urls A list of push stream addresses.
800
+ * @notes <br>
801
+ * When the first push stream address in the array is unavailable, the SDK will automatically switch to the subsequent addresses.
802
+ * @order 33
803
+ *
804
+ */
805
+ startPushWithUrls(urls: Array<String>): void;
806
+
807
+ /** {en}
808
+ * @detail api
809
+ * @brief Stops streaming.
810
+ * @notes <br>
811
+ * After you have stopped streaming, you can restart streaming by calling startPush {@link #startPush} or startPushWithUrls {@link #startPushWithUrls}.
812
+ * @order 34
813
+ *
814
+ */
815
+ stopPush(): void;
816
+
817
+ /** {en}
818
+ * @detail api
819
+ * @brief Checks whether the streaming is currently ongoing. You can use this method to query the status of the live pusher.
820
+ * @return <br>
821
+ * Whether the streaming is currently ongoing. <br>
822
+ * - true: The streaming is currently ongoing;
823
+ * - false: The streaming has stopped.
824
+ * @order 35
825
+ *
826
+ */
827
+ isPushing(): boolean;
828
+
829
+ /** {en}
830
+ * @detail api
831
+ * @brief Sets a watermark for the pushed stream.
832
+ * @param image The watermark image. Setting it to null means disabling watermarking.
833
+ * @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].
834
+ * @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].
835
+ * @param scale The uniform scaling of the watermark. The value range is [0.0, 1.0].
836
+ * @return <br>
837
+ * - 0: Success;
838
+ * - < 0: Failure.
839
+ * @order 36
840
+ *
841
+ */
842
+ setWatermark(image: Bitmap, x: float, y: float, scale: float): Promise<int>;
843
+
844
+ /** {en}
845
+ * @detail api
846
+ * @brief Starts local recording.
847
+ * @order 37
848
+ * @param path The directory for saving the recording file. You cannot leave this parameter empty.
849
+ * @param config The recording configurations. See VeLiveFileRecorderConfiguration for details.
850
+ * @param listener The listener for recording events. See VeLiveFileRecordingListener for details.
851
+ *
852
+ */
853
+ startFileRecording(path: String, config: VeLiveFileRecorderConfiguration, listener: VeLiveFileRecordingListener): void;
854
+
855
+ /** {en}
856
+ * @detail api
857
+ * @brief Stops local recording.
858
+ * @notes <br>This method must be called after calling [startFileRecording](#VeLivePusher-startfilerecording).
859
+ * @order 38
860
+ *
861
+ */
862
+ stopFileRecording(): void;
863
+
864
+ /** {en}
865
+ * @detail api
866
+ * @brief Set advanced configurations. You can contact BytePlus technical support for more information about how to use this method.
867
+ * @param key The JSON key.
868
+ * @param value The JSON value.
869
+ * @return <br>
870
+ * - 0: Success;
871
+ * - -1: Failure.
872
+ * @order 39
873
+ *
874
+ */
875
+ setProperty(key: String, value: Object): int;
876
+
877
+ /** {en}
878
+ * @detail api
879
+ * @brief Pushes an external video frame.
880
+ * @param frame The external video frame. See VeLiveVideoFrame {@link #VeLiveVideoFrame} for details.
881
+ * @return <br>
882
+ * - 0: Success;
883
+ * - < 0: Failure.
884
+ * @notes <br>
885
+ * To use this method, you must first call startVideoCapture {@link #startVideoCapture} and set VeLiveVideoCaptureType {@link #VeLiveVideoCaptureType} to `VeLiveVideoCaptureExternal`.
886
+ * @order 40
887
+ *
888
+ */
889
+ pushExternalVideoFrame(frame: VeLiveVideoFrame): int;
890
+
891
+ /** {en}
892
+ * @detail api
893
+ * @brief Pushes an external audio frame.
894
+ * @param frame The external audio frame. See VeLiveAudioFrame {@link #VeLiveAudioFrame} for details.
895
+ * @return <br>
896
+ * - 0: Success;
897
+ * - < 0: Failure.
898
+ * @notes <br>
899
+ * To use this method, you must first call startAudioCapture {@link #AustartdioCapture} and set VeLiveAudioCaptureType {@link #VeLiveAudioCaptureType} to `VeLiveAudioCaptureExternal`.
900
+ * @order 41
901
+ *
902
+ */
903
+ pushExternalAudioFrame(frame: VeLiveAudioFrame): int;
904
+
905
+ /** {en}
906
+ * @detail api
907
+ * @brief Sets the orientation of the pushed video frame. The default orientation is portrait.
908
+ * @param orientation The orientation of the pushed video frame. See VeLiveOrientation {@link #VeLiveOrientation} for details.
909
+ * @order 42
910
+ *
911
+ */
912
+ setOrientation(orientation: VeLiveOrientation): void;
913
+
914
+ /** {en}
915
+ * @detail api
916
+ * @brief Sends an SEI message through the video frame. The SEI messages are strings in JSON format.
917
+ * @return <br>
918
+ * - 0: Success;
919
+ * - < 0: Failure.
920
+ * @notes <br>This method must be called after calling [startPush](#VeLivePusher-startpush) or [startPushWithUrls](#VeLivePusher-startpushwithurls).
921
+ * @order 43
922
+ * @param key The JSON key.
923
+ * @param value The JSON value.
924
+ * @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.
925
+ * @param isKeyFrame Whether SEI messages are only included in key frames. <br>
926
+ * - true: Add the SEI message to key frames only;
927
+ * - false: Add the SEI message to all types of frames.
928
+ * @param allowsCovered Whether to allow overwriting. <br>
929
+ * - true: Allow overwriting;
930
+ * - false: Do not allow overwriting.
931
+ *
932
+ */
933
+ sendSeiMessage(key: String, value: Object, repeat: int, isKeyFrame: boolean, allowsCovered: boolean): int;
934
+
935
+ /** {en}
936
+ * @detail api
937
+ * @brief Sets whether to mute the stream.
938
+ * @param mute Whether to mute the stream. <br>
939
+ * - true: Mute;
940
+ * - false: (Default) Do not mute.
941
+ * @order 44
942
+ *
943
+ */
944
+ setMute(mute: boolean): void;
945
+
946
+ /** {en}
947
+ * @detail api
948
+ * @brief Checks whether the stream is muted.
949
+ * @return <br>
950
+ * - true: The stream is muted;
951
+ * - false: The stream is not muted.
952
+ * @order 45
953
+ *
954
+ */
955
+ isMute(): boolean;
956
+
957
+ /** {en}
958
+ * @detail api
959
+ * @brief Gets the special effects manager. With the special effects manager, you can do the following:
960
+ * - Set beauty AR
961
+ * - Set special effects
962
+ * - Set materials
963
+ * - Set stickers
964
+ * - Set filters
965
+ * @return <br>
966
+ * The special effects manager. See VeLiveVideoEffectManager {@link #VeLiveVideoEffectManager} for details.
967
+ * @notes <br>
968
+ * You must first integrate the BytePlus Effects SDK before calling this method.
969
+ * @order 46
970
+ *
971
+ */
972
+ getVideoEffectManager(): VeLiveVideoEffectManager;
973
+
974
+ /** {en}
975
+ * @detail api
976
+ * @brief Sets custom video processing.
977
+ * @order 47
978
+ * @param filter The video filter. See VeLiveVideoFrameFilter for details.
979
+ *
980
+ */
981
+ setVideoFrameFilter(filter: VeLiveVideoFrameFilter): void;
982
+
983
+ /** {en}
984
+ * @detail api
985
+ * @brief Gets the audio device manager.
986
+ * @return <br>
987
+ * The audio device manager. See VeLiveAudioDevice {@link #VeLiveAudioDevice} for details.
988
+ * @notes <br>
989
+ * To use this method, you must first call startAudioCapture {@link #startAudioCapture} and set VeLiveAudioCaptureType {@link #VeLiveAudioCaptureType} to `VeLiveAudioCaptureMicrophone`.
990
+ * @order 48
991
+ *
992
+ */
993
+ getAudioDevice(): VeLiveAudioDevice;
994
+
995
+ /** {en}
996
+ * @detail api
997
+ * @brief Sets custom audio processing.
998
+ * @order 49
999
+ * @param filter The audio filter. See VeLiveAudioFrameFilter for details.
1000
+ *
1001
+ */
1002
+ setAudioFrameFilter(filter: VeLiveAudioFrameFilter): void;
1003
+
1004
+ /** {en}
1005
+ * @detail api
1006
+ * @brief Creates the media player.
1007
+ * @return <br>
1008
+ * The media player. See VeLiveMediaPlayer {@link #VeLiveMediaPlayer} for details.
1009
+ * @order 50
1010
+ *
1011
+ */
1012
+ createPlayer(): VeLiveMediaPlayer;
1013
+
1014
+ /** {en}
1015
+ * @detail api
1016
+ * @brief Starts screen capture.
1017
+ * @param enableAppAudio Whether to record in-app audio data. Currently, you can only set it to `true`, which is the default value.
1018
+ * @param screenIntent The system screen recording permission.
1019
+ * @order 52
1020
+ *
1021
+ *
1022
+ */
1023
+ startScreenRecording(enableAppAudio: boolean, screenIntent: Intent): void;
1024
+
1025
+ /** {en}
1026
+ * @detail api
1027
+ * @brief Stops screen capture.
1028
+ * @order 53
1029
+ *
1030
+ */
1031
+ stopScreenRecording(): void;
1032
+
1033
+ /** {en}
1034
+ * @detail api
1035
+ * @brief Gets whether the SDK is capturing the screen at this moment.
1036
+ * @order 54
1037
+ *
1038
+ */
1039
+ isScreenRecording(): boolean;
1040
+
1041
+ /** {en}
1042
+ * @detail api
1043
+ * @brief Adds a video frame listener.
1044
+ * @return <br>
1045
+ * - 0: Success;
1046
+ * - < 0: Failure.
1047
+ * @order 55
1048
+ * @param listener The listener. See VeLiveVideoFrameListener for details.
1049
+ *
1050
+ */
1051
+ addVideoFrameListener(listener: VeLiveVideoFrameListener): int;
1052
+
1053
+ /** {en}
1054
+ * @detail api
1055
+ * @brief Removes the video frame listener.
1056
+ * @return <br>
1057
+ * - 0: Success;
1058
+ * - < 0: Failure.
1059
+ * @notes <br>
1060
+ * Calling this method will return a failure if the listener has not been added or has been removed.
1061
+ * @order 56
1062
+ * @param listener The listener. See VeLiveVideoFrameListener for details.
1063
+ *
1064
+ */
1065
+ removeVideoFrameListener(listener: VeLiveVideoFrameListener): int;
1066
+
1067
+ /** {en}
1068
+ * @detail api
1069
+ * @brief Adds an audio frame listener.
1070
+ * @return <br>
1071
+ * - 0: Success;
1072
+ * - < 0: Failure.
1073
+ * @order 57
1074
+ * @param listener The listener. See VeLiveAudioFrameListener for details.
1075
+ *
1076
+ */
1077
+ addAudioFrameListener(listener: VeLiveAudioFrameListener): int;
1078
+
1079
+ /** {en}
1080
+ * @detail api
1081
+ * @brief Removes the audio frame listener.
1082
+ * @return <br>
1083
+ * - 0: Success;
1084
+ * - < 0: Failure.
1085
+ * @notes <br>
1086
+ * Calling this method will return a failure if the listener has not been added or has been removed.
1087
+ * @order 58
1088
+ * @param listener The listener. See VeLiveAudioFrameListener for details.
1089
+ *
1090
+ */
1091
+ removeAudioFrameListener(listener: VeLiveAudioFrameListener): int;
1092
+
1093
+ /** {en}
1094
+ * @detail api
1095
+ * @brief Takes a screenshot.
1096
+ * @order 59
1097
+ * @param listener The listener for the screenshot. See VeLiveSnapshotListener for details.
1098
+ *
1099
+ */
1100
+ snapshot(listener: VeLiveSnapshotListener): void;
1101
+ }
1102
+ export declare class VeLiveMediaPlayer {
1103
+
1104
+ /** {en}
1105
+ * @detail api
1106
+ * @brief Destroys the media player instance.
1107
+ * @order 100
1108
+ *
1109
+ */
1110
+ release(): void;
1111
+
1112
+ /** {en}
1113
+ * @detail api
1114
+ * @brief Sets the observer for playback statuses.
1115
+ * @notes <br>
1116
+ * If you make multiple calls to this method, only the last call takes effect.
1117
+ * @order 101
1118
+ * @param listener The observer that listens for playback statuses. For details, see VeLiveMediaPlayerListener.
1119
+ *
1120
+ */
1121
+ setListener(listener: VeLiveMediaPlayerListener): void;
1122
+
1123
+ /** {en}
1124
+ * @detail api
1125
+ * @brief Sets the file path. Supported file formats include MP3, AAC, M4A, WAV.
1126
+ * @param url The file path.
1127
+ * @return <br>
1128
+ * - 0: Success;
1129
+ * - ≠ 0: Failure.
1130
+ * @order 102
1131
+ *
1132
+ */
1133
+ prepare(url: String): int;
1134
+
1135
+ /** {en}
1136
+ * @detail api
1137
+ * @brief Pauses playback.
1138
+ * @notes <br>
1139
+ * This method must be called after you call start {@link #start} to start playback.
1140
+ * @order 103
1141
+ *
1142
+ */
1143
+ start(): int;
1144
+
1145
+ /** {en}
1146
+ * @detail api
1147
+ * @brief Stops playback.
1148
+ * @return <br>
1149
+ * - 0: Success;
1150
+ * - ≠ 0: Failure.
1151
+ * @notes <br>
1152
+ * This method must be called after you call start {@link #start} to start playback.
1153
+ * @order 104
1154
+ *
1155
+ */
1156
+ stop(): int;
1157
+
1158
+ /** {en}
1159
+ * @detail api
1160
+ * @brief Pauses playback.
1161
+ * @notes <br>
1162
+ * This method must be called after you call start {@link #start} to start playback.
1163
+ * @order 105
1164
+ *
1165
+ */
1166
+ pause(): void;
1167
+
1168
+ /** {en}
1169
+ * @detail api
1170
+ * @brief Resumes playback.
1171
+ * @notes <br>This method must be called after you call [pause](#VeLiveMediaPlayer-pause) to pause playback.
1172
+ * @order 106
1173
+ *
1174
+ */
1175
+ resume(): void;
1176
+
1177
+ /** {en}
1178
+ * @detail api
1179
+ * @brief Gets the duration of the media file.
1180
+ * @return <br>
1181
+ * - \\\\> 0: The duration of the media file, in milliseconds;
1182
+ * - ≤ 0: Failure.
1183
+ * @notes <br>This method must be called after you call [start](#VeLiveMediaPlayer-start) to start playback.
1184
+ * @order 107
1185
+ *
1186
+ */
1187
+ getDuration(): long;
1188
+
1189
+ /** {en}
1190
+ * @detail api
1191
+ * @brief Sets the playback progress.
1192
+ * @param posMs The playback progress, in milliseconds.
1193
+ * @return <br>
1194
+ * - 0: Success;
1195
+ * - ≠ 0: Failure.
1196
+ * @order 108
1197
+ *
1198
+ */
1199
+ seek(posMs: long): int;
1200
+
1201
+ /** {en}
1202
+ * @detail api
1203
+ * @brief Enables or disables mixing the audio to the live stream.
1204
+ * @param enable Whether to enable or disable mixing the audio to the live stream. <br>
1205
+ * - ture: Enable;
1206
+ * - false: (Default) Disable.
1207
+ * @order 109
1208
+ *
1209
+ */
1210
+ enableMixer(enable: boolean): void;
1211
+
1212
+ /** {en}
1213
+ * @detail api
1214
+ * @brief Enables or disables automatic volume equalization.
1215
+ * @param sourceLufs The source volume.
1216
+ * @param targetLufs The target volume.
1217
+ * @order 110
1218
+ *
1219
+ */
1220
+ enableAutoEq(sourceLufs: float, targetLufs: float): void;
1221
+
1222
+ /** {en}
1223
+ * @detail api
1224
+ * @brief Sets the view for rendering the video. Supports MP4 format.
1225
+ * @param view The view used by the media player to render video.
1226
+ * @order 111
1227
+ *
1228
+ */
1229
+ setRenderView(view: View): void;
1230
+
1231
+ /** {en}
1232
+ * @detail api
1233
+ * @brief Sets the observer for audio and video frames.
1234
+ * @notes <br>
1235
+ * If you make multiple calls to this method, only the last call takes effect.
1236
+ * @order 112
1237
+ * @param listener The observer that listens for audio and video frames. For details, see VeLiveMediaPlayerFrameListener
1238
+ *
1239
+ */
1240
+ setFrameListener(listener: VeLiveMediaPlayerFrameListener): void;
1241
+
1242
+ /** {en}
1243
+ * @detail api
1244
+ * @brief Sets the playback volume.
1245
+ * @param volume The playback volume. The value range is [0.0, 4.0].
1246
+ * @order 113
1247
+ *
1248
+ */
1249
+ setBGMVolume(volume: float): void;
1250
+
1251
+ /** {en}
1252
+ * @detail api
1253
+ * @brief Sets the audio capture volume.
1254
+ * @notes <br>This method must be called after you call [start](#VeLiveMediaPlayer-start) to start playing background music.
1255
+ * @order 114
1256
+ * @param volume The audio capture volume. The value range is [0.0, 4.0].
1257
+ *
1258
+ */
1259
+ setVoiceVolume(volume: float): void;
1260
+
1261
+ /** {en}
1262
+ * @detail api
1263
+ * @brief Sets whether to loop the video.
1264
+ * @param loop Whether to loop the video. <br>
1265
+ * - true: Loop;
1266
+ * - false: (Default) Do not loop.
1267
+ * @order 115
1268
+ *
1269
+ */
1270
+ enableBGMLoop(loop: boolean): void;
1271
+ }
1272
+ export declare class VeLiveAudioFrame {
1273
+ constructor();
1274
+ constructor(sampleRate: VeLiveAudioSampleRate, channel: VeLiveAudioChannel, pts: long, buffer: ByteBuffer);
1275
+ bufferType: any;
1276
+ sampleRate: any;
1277
+ channels: any;
1278
+ ptsUs: any;
1279
+ buffer: any;
1280
+ samplesPerChannel: any;
1281
+
1282
+ /** {en}
1283
+ * @detail api
1284
+ * @brief Gets the audio data type.
1285
+ * @return <br>
1286
+ * The audio data type. See VeLiveAudioBufferType {@link #VeLiveAudioBufferType} for details.
1287
+ *
1288
+ */
1289
+ getBufferType(): VeLiveAudioBufferType;
1290
+
1291
+ /** {en}
1292
+ * @detail api
1293
+ * @brief Gets the audio sample rate.
1294
+ * @return <br>
1295
+ * The audio sample rate. See VeLiveAudioSampleRate {@link #VeLiveAudioSampleRate} for details.
1296
+ *
1297
+ */
1298
+ getSampleRate(): VeLiveAudioSampleRate;
1299
+
1300
+ /** {en}
1301
+ * @detail api
1302
+ * @brief Gets the number of audio channels.
1303
+ * @return <br>
1304
+ * The number of audio channels. See VeLiveAudioChannel {@link #VeLiveAudioChannel} for details.
1305
+ *
1306
+ */
1307
+ getChannels(): VeLiveAudioChannel;
1308
+
1309
+ /** {en}
1310
+ * @detail api
1311
+ * @brief Gets the audio bit depth.
1312
+ * @return <br>
1313
+ * The audio bit depth.
1314
+ *
1315
+ */
1316
+ getSamplesPerChannel(): int;
1317
+
1318
+ /** {en}
1319
+ * @detail api
1320
+ * @brief Gets the audio timestamp, in μs.
1321
+ * @return <br>
1322
+ * The timestamp of the audio frame, in μs.
1323
+ *
1324
+ */
1325
+ getPts(): long;
1326
+
1327
+ /** {en}
1328
+ * @detail api
1329
+ * @brief Gets the audio data. The audio data is of type float32 and is stored in little-endian byte order.
1330
+ * @return <br>
1331
+ * The audio data in the format of ByteBuffer.
1332
+ *
1333
+ */
1334
+ getBuffer(): ByteBuffer;
1335
+ }
1336
+ export declare class VeLiveAudioDevice {
1337
+
1338
+ /** {en}
1339
+ * @detail api
1340
+ * @brief Sets the volume.
1341
+ * @param level The volume. The value range is [0.0, 4.0].
1342
+ * @order 74
1343
+ *
1344
+ */
1345
+ setVoiceLoudness(level: float): void;
1346
+
1347
+ /** {en}
1348
+ * @detail api
1349
+ * @brief Gets the current volume.
1350
+ * @return <br>
1351
+ * The current volume.
1352
+ * @order 75
1353
+ *
1354
+ */
1355
+ getVoiceLoudness(): float;
1356
+
1357
+ /** {en}
1358
+ * @detail api
1359
+ * @brief Checks whether in-ear monitoring is supported.
1360
+ * @return <br>
1361
+ * - true: Supported;
1362
+ * - false: Not supported.
1363
+ * @order 76
1364
+ *
1365
+ */
1366
+ isSupportHardwareEcho(): boolean;
1367
+
1368
+ /** {en}
1369
+ * @detail api
1370
+ * @brief Enables or disables in-ear monitoring.
1371
+ * @param enable Whether to enable in-ear monitoring. <br>
1372
+ * - true: Enable;
1373
+ * - false: (Default) Disable.
1374
+ * @order 77
1375
+ *
1376
+ */
1377
+ enableEcho(enable: boolean): void;
1378
+
1379
+ /** {en}
1380
+ * @detail api
1381
+ * @brief Checks whether in-ear monitoring is enabled.
1382
+ * @return <br>
1383
+ * - true: Enabled;
1384
+ * - false: Disabled.
1385
+ * @order 78
1386
+ *
1387
+ */
1388
+ isEnableEcho(): boolean;
1389
+ }
1390
+ export declare class VeLivePusherConfiguration {
1391
+
1392
+ /** {en}
1393
+ * @detail api
1394
+ * @brief Sets the time interval between each attempt to reconnect.
1395
+ * @param interval The time interval between each attempt to reconnect, in seconds. The default value is `5`.
1396
+ * @order 2
1397
+ *
1398
+ */
1399
+ setReconnectIntervalSeconds(interval: int): this;
1400
+
1401
+ /** {en}
1402
+ * @detail api
1403
+ * @brief Gets the time interval between each attempt to reconnect.
1404
+ * @return <br>
1405
+ * The time interval between each attempt to reconnect, in seconds.
1406
+ * @order 3
1407
+ *
1408
+ */
1409
+ getReconnectIntervalSeconds(): int;
1410
+
1411
+ /** {en}
1412
+ * @detail api
1413
+ * @brief Sets the number of attempts to reconnect after the initial attempt fails.
1414
+ * @param maxCount The number of attempts to reconnect after the initial attempt fails. The default value is `3`.
1415
+ * @order 4
1416
+ *
1417
+ */
1418
+ setReconnectCount(maxCount: int): this;
1419
+
1420
+ /** {en}
1421
+ * @detail api
1422
+ * @brief Gets the number of attempts to reconnect after the initial attempt fails.
1423
+ * @return <br>
1424
+ * The number of attempts to reconnect after the initial attempt fails.
1425
+ * @order 5
1426
+ *
1427
+ *
1428
+ */
1429
+ getReconnectCount(): int;
1430
+
1431
+ /** {en}
1432
+ * @detail api
1433
+ * @brief Sets the video capture configurations.
1434
+ * @return <br>
1435
+ * The pusher configurations. See VeLivePusherConfiguration {@link #VeLivePusherConfiguration} for details.
1436
+ * @order 6
1437
+ * @param config The video capture configurations. See VeLiveVideoCaptureConfiguration for details.
1438
+ *
1439
+ */
1440
+ setVideoCaptureConfig(config: VeLiveVideoCaptureConfiguration): this;
1441
+
1442
+ /** {en}
1443
+ * @detail api
1444
+ * @brief Gets the video capture configurations.
1445
+ * @return <br>The video capture configurations. See VeLiveVideoCaptureConfiguration for details.
1446
+ * @order 7
1447
+ *
1448
+ */
1449
+ getVideoCaptureConfig(): VeLiveVideoCaptureConfiguration;
1450
+
1451
+ /** {en}
1452
+ * @detail api
1453
+ * @brief Sets the audio capture configurations.
1454
+ * @return <br>
1455
+ * The pusher configurations. See VeLivePusherConfiguration {@link #VeLivePusherConfiguration} for details.
1456
+ * @order 7
1457
+ * @param config The audio capture configurations. See VeLiveAudioCaptureConfiguration for details.
1458
+ *
1459
+ */
1460
+ setAudioCaptureConfig(config: VeLiveAudioCaptureConfiguration): this;
1461
+
1462
+ /** {en}
1463
+ * @detail api
1464
+ * @brief Gets the audio capture configurations.
1465
+ * @return <br>The audio capture configurations. See VeLiveAudioCaptureConfiguration for details.
1466
+ * @order 8
1467
+ *
1468
+ *
1469
+ */
1470
+ getAudioCaptureConfig(): VeLiveAudioCaptureConfiguration;
1471
+
1472
+ /** {en}
1473
+ * @detail api
1474
+ * @brief Sets the context of the application.
1475
+ * @param context The context of the application.
1476
+ * @return <br>
1477
+ * The pusher configurations. See VeLivePusherConfiguration {@link #VeLivePusherConfiguration} for details.
1478
+ * @order 9
1479
+ *
1480
+ */
1481
+ setContext(context: Context): this;
1482
+
1483
+ /** {en}
1484
+ * @detail api
1485
+ * @brief Gets the context of the application.
1486
+ * @return <br>
1487
+ * The context of the application.
1488
+ * @order 10
1489
+ *
1490
+ *
1491
+ */
1492
+ getContext(): Context;
1493
+
1494
+ /** {en}
1495
+ * @detail api
1496
+ * @brief Sets advanced parameters. You can leave this parameter empty. If you need to use it, please contact BytePlus technical support.
1497
+ * @param params Extension parameters.
1498
+ * @return <br>
1499
+ * The pusher configurations. See VeLivePusherConfiguration {@link #VeLivePusherConfiguration} for details.
1500
+ * @order 11
1501
+ *
1502
+ *
1503
+ */
1504
+ setExtraParameters(params: String): this;
1505
+
1506
+ /** {en}
1507
+ * @detail api
1508
+ * @brief Gets advanced parameters.
1509
+ * @return <br>
1510
+ * Advanced parameters.
1511
+ * @order 12
1512
+ *
1513
+ *
1514
+ */
1515
+ getExtraParams(): LiveSdkSetting;
1516
+
1517
+ /** {en}
1518
+ * @detail api
1519
+ * @brief Creates the live pusher.
1520
+ * @return <br>
1521
+ * The live pusher. See VeLivePusher {@link #VeLivePusher} for details.
1522
+ * @order 1
1523
+ *
1524
+ *
1525
+ */
1526
+ build(): VeLivePusher;
1527
+ }