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