@volcengine/react-native-live-push 1.1.3-rc.1 → 1.2.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/android/build.gradle +2 -2
  2. package/android/src/main/java/com/volcengine/velive/rn/push/ClassHelper.java +9 -0
  3. package/android/src/main/java/com/volcengine/velive/rn/push/NativeVariableManager.java +5 -8
  4. package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushModule.java +14 -2
  5. package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushPackage.java +16 -13
  6. package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushView.java +16 -0
  7. package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushViewManager.java +7 -2
  8. package/android/src/main/java/com/volcengine/velive/rn/push/mixer/MixerManager.java +410 -0
  9. package/android/src/main/java/com/volcengine/velive/rn/push/mixer/MixerView.java +434 -0
  10. package/android/src/main/java/com/volcengine/velive/rn/push/mixer/MixerViewManager.java +79 -0
  11. package/android/src/main/java/com/volcengine/velive/rn/push/mixer/TextureMgr.java +168 -0
  12. package/android/src/main/java/com/volcengine/velive/rn/push/mixer/YuvHelper.java +165 -0
  13. package/ios/VeLiveMixerHelper.h +46 -0
  14. package/ios/VeLiveMixerHelper.m +620 -0
  15. package/ios/VeLiveMixerView.h +69 -0
  16. package/ios/VeLiveMixerView.m +600 -0
  17. package/ios/VeLiveMixerViewManager.m +92 -0
  18. package/lib/commonjs/index.js +22698 -20359
  19. package/lib/commonjs/typescript/android/index.d.ts +44 -0
  20. package/lib/commonjs/typescript/codegen/android/api.d.ts +1068 -0
  21. package/lib/commonjs/typescript/codegen/android/callback.d.ts +333 -0
  22. package/lib/commonjs/typescript/codegen/android/errorcode.d.ts +92 -0
  23. package/lib/commonjs/typescript/codegen/android/index.d.ts +5 -0
  24. package/lib/commonjs/typescript/codegen/android/keytype.d.ts +1693 -0
  25. package/lib/commonjs/typescript/codegen/android/types.d.ts +33 -0
  26. package/lib/commonjs/typescript/codegen/ios/api.d.ts +1125 -0
  27. package/lib/commonjs/typescript/codegen/ios/callback.d.ts +242 -0
  28. package/lib/commonjs/typescript/codegen/ios/errorcode.d.ts +154 -0
  29. package/lib/commonjs/typescript/codegen/ios/external.d.ts +1 -0
  30. package/lib/commonjs/typescript/codegen/ios/index.d.ts +6 -0
  31. package/lib/commonjs/typescript/codegen/ios/keytype.d.ts +1154 -0
  32. package/lib/commonjs/typescript/codegen/ios/types.d.ts +46 -0
  33. package/lib/commonjs/typescript/codegen/pack/api.d.ts +1470 -0
  34. package/lib/commonjs/typescript/codegen/pack/callback.d.ts +446 -0
  35. package/lib/commonjs/typescript/codegen/pack/errorcode.d.ts +109 -0
  36. package/lib/commonjs/typescript/codegen/pack/index.d.ts +5 -0
  37. package/lib/commonjs/typescript/codegen/pack/keytype.d.ts +2248 -0
  38. package/lib/commonjs/typescript/codegen/pack/types.d.ts +68 -0
  39. package/lib/commonjs/typescript/codegen/type-shim.d.ts +6 -0
  40. package/lib/commonjs/typescript/component.d.ts +15 -0
  41. package/lib/commonjs/typescript/core/api.d.ts +18 -0
  42. package/lib/commonjs/typescript/core/callback.d.ts +2 -0
  43. package/lib/commonjs/typescript/core/env.d.ts +29 -0
  44. package/lib/commonjs/typescript/core/errorcode.d.ts +2 -0
  45. package/lib/commonjs/typescript/core/index.d.ts +6 -0
  46. package/lib/commonjs/typescript/core/keytype.d.ts +18 -0
  47. package/lib/commonjs/typescript/core/mixer.d.ts +26 -0
  48. package/lib/commonjs/typescript/core/pusher.d.ts +13 -0
  49. package/lib/commonjs/typescript/index.d.ts +3 -0
  50. package/lib/commonjs/typescript/ios/extends.d.ts +41 -0
  51. package/lib/commonjs/typescript/platforms/android/extends.d.ts +8 -0
  52. package/lib/commonjs/typescript/platforms/android/helper.d.ts +8 -0
  53. package/lib/commonjs/typescript/platforms/android/mixer.d.ts +8 -0
  54. package/lib/commonjs/typescript/platforms/ios/extends.d.ts +17 -0
  55. package/lib/commonjs/typescript/platforms/ios/helper.d.ts +8 -0
  56. package/lib/commonjs/typescript/platforms/ios/mixer.d.ts +9 -0
  57. package/lib/commonjs/typescript/runtime.d.ts +1 -0
  58. package/lib/commonjs/typescript/view/MixView.d.ts +52 -0
  59. package/lib/commonjs/typescript/view/VeImageView.d.ts +19 -0
  60. package/lib/commonjs/typescript/view/VeTextView.d.ts +7 -0
  61. package/lib/commonjs/typescript/view/VeView.d.ts +7 -0
  62. package/lib/commonjs/typescript/view/VeWebView.d.ts +7 -0
  63. package/lib/commonjs/typescript/view/index.d.ts +5 -0
  64. package/lib/module/index.js +22695 -20360
  65. package/lib/module/typescript/android/index.d.ts +44 -0
  66. package/lib/module/typescript/codegen/android/api.d.ts +1068 -0
  67. package/lib/module/typescript/codegen/android/callback.d.ts +333 -0
  68. package/lib/module/typescript/codegen/android/errorcode.d.ts +92 -0
  69. package/lib/module/typescript/codegen/android/index.d.ts +5 -0
  70. package/lib/module/typescript/codegen/android/keytype.d.ts +1693 -0
  71. package/lib/module/typescript/codegen/android/types.d.ts +33 -0
  72. package/lib/module/typescript/codegen/ios/api.d.ts +1125 -0
  73. package/lib/module/typescript/codegen/ios/callback.d.ts +242 -0
  74. package/lib/module/typescript/codegen/ios/errorcode.d.ts +154 -0
  75. package/lib/module/typescript/codegen/ios/external.d.ts +1 -0
  76. package/lib/module/typescript/codegen/ios/index.d.ts +6 -0
  77. package/lib/module/typescript/codegen/ios/keytype.d.ts +1154 -0
  78. package/lib/module/typescript/codegen/ios/types.d.ts +46 -0
  79. package/lib/module/typescript/codegen/pack/api.d.ts +1470 -0
  80. package/lib/module/typescript/codegen/pack/callback.d.ts +446 -0
  81. package/lib/module/typescript/codegen/pack/errorcode.d.ts +109 -0
  82. package/lib/module/typescript/codegen/pack/index.d.ts +5 -0
  83. package/lib/module/typescript/codegen/pack/keytype.d.ts +2248 -0
  84. package/lib/module/typescript/codegen/pack/types.d.ts +68 -0
  85. package/lib/module/typescript/codegen/type-shim.d.ts +6 -0
  86. package/lib/module/typescript/component.d.ts +15 -0
  87. package/lib/module/typescript/core/api.d.ts +18 -0
  88. package/lib/module/typescript/core/callback.d.ts +2 -0
  89. package/lib/module/typescript/core/env.d.ts +29 -0
  90. package/lib/module/typescript/core/errorcode.d.ts +2 -0
  91. package/lib/module/typescript/core/index.d.ts +6 -0
  92. package/lib/module/typescript/core/keytype.d.ts +18 -0
  93. package/lib/module/typescript/core/mixer.d.ts +26 -0
  94. package/lib/module/typescript/core/pusher.d.ts +13 -0
  95. package/lib/module/typescript/index.d.ts +3 -0
  96. package/lib/module/typescript/ios/extends.d.ts +41 -0
  97. package/lib/module/typescript/platforms/android/extends.d.ts +8 -0
  98. package/lib/module/typescript/platforms/android/helper.d.ts +8 -0
  99. package/lib/module/typescript/platforms/android/mixer.d.ts +8 -0
  100. package/lib/module/typescript/platforms/ios/extends.d.ts +17 -0
  101. package/lib/module/typescript/platforms/ios/helper.d.ts +8 -0
  102. package/lib/module/typescript/platforms/ios/mixer.d.ts +9 -0
  103. package/lib/module/typescript/runtime.d.ts +1 -0
  104. package/lib/module/typescript/view/MixView.d.ts +52 -0
  105. package/lib/module/typescript/view/VeImageView.d.ts +19 -0
  106. package/lib/module/typescript/view/VeTextView.d.ts +7 -0
  107. package/lib/module/typescript/view/VeView.d.ts +7 -0
  108. package/lib/module/typescript/view/VeWebView.d.ts +7 -0
  109. package/lib/module/typescript/view/index.d.ts +5 -0
  110. package/lib/typescript/android/index.d.ts +0 -3
  111. package/lib/typescript/codegen/android/api.d.ts +194 -762
  112. package/lib/typescript/codegen/android/callback.d.ts +85 -48
  113. package/lib/typescript/codegen/android/errorcode.d.ts +30 -0
  114. package/lib/typescript/codegen/android/keytype.d.ts +514 -122
  115. package/lib/typescript/codegen/ios/api.d.ts +380 -351
  116. package/lib/typescript/codegen/ios/callback.d.ts +33 -6
  117. package/lib/typescript/codegen/ios/errorcode.d.ts +52 -2
  118. package/lib/typescript/codegen/ios/keytype.d.ts +313 -35
  119. package/lib/typescript/codegen/pack/api.d.ts +302 -821
  120. package/lib/typescript/codegen/pack/callback.d.ts +54 -49
  121. package/lib/typescript/codegen/pack/errorcode.d.ts +38 -5
  122. package/lib/typescript/codegen/pack/keytype.d.ts +672 -228
  123. package/lib/typescript/core/api.d.ts +18 -2
  124. package/lib/typescript/core/keytype.d.ts +16 -0
  125. package/lib/typescript/core/mixer.d.ts +26 -0
  126. package/lib/typescript/core/pusher.d.ts +0 -3
  127. package/lib/typescript/index.d.ts +1 -0
  128. package/lib/typescript/platforms/android/extends.d.ts +8 -0
  129. package/lib/typescript/platforms/android/mixer.d.ts +8 -0
  130. package/lib/typescript/platforms/ios/mixer.d.ts +9 -0
  131. package/lib/typescript/view/MixView.d.ts +52 -0
  132. package/lib/typescript/view/VeImageView.d.ts +19 -0
  133. package/lib/typescript/view/VeTextView.d.ts +7 -0
  134. package/lib/typescript/view/VeView.d.ts +7 -0
  135. package/lib/typescript/view/VeWebView.d.ts +7 -0
  136. package/lib/typescript/view/index.d.ts +5 -0
  137. package/package.json +1 -1
  138. package/react-native-velive-push.podspec +3 -3
  139. package/android/src/main/java/com/volcengine/velive/rn/push/ScreenCaptureHelper.java +0 -73
@@ -0,0 +1,1470 @@
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, VeLiveVideoFrame, VeLiveAudioFrame, VeLiveVideoCaptureConfiguration, VeLiveVideoEffectLicenseConfiguration } from './keytype';
5
+ import { View, Bitmap } from './types';
6
+ /** {zh}
7
+ * @detail api
8
+ * @brief 直播推流器。
9
+ */
10
+ export declare class VeLivePusher {
11
+ /** {zh}
12
+ * @platform android
13
+ * @detail api
14
+ * @hidden
15
+ * @brief 获取当前 SDK 版本号。
16
+ * @return <br>
17
+ * 当前 SDK 版本号。
18
+ *
19
+ */
20
+
21
+ static android_getVersion(): string;
22
+ /** {zh}
23
+ * @detail api
24
+ * @brief 设置输出到控制台的日志等级。
25
+ * @order 49
26
+ * @param logLevel 输出的日志级别。级别详情请参见 [VeLivePusherLogLevel](147521#VeLivePusherLogLevel)。
27
+ *
28
+ */
29
+
30
+ static setLogLevel(logLevel: VeLivePusherLogLevel): void;
31
+ /** {zh}
32
+ * @platform android
33
+ * @detail api
34
+ * @brief 设置 OpenGL 的上下文。
35
+ * @order 50
36
+ * @param context OpenGL 上下文。
37
+ *
38
+ */
39
+
40
+ static android_setEGLContext(context: $p_a.EGLContext): void;
41
+ protected _instance: any;
42
+ protected __init(...args: any[]): void;
43
+ protected __new_instance(...args: any[]): any;
44
+ /** {zh}
45
+ * @detail api
46
+ * @brief 停止采集和推流,并销毁推流器。通常在调用 [stopPush](#VeLivePusher-stoppush) 结束推流后调用此方法进行清理。
47
+ * @order 4
48
+ *
49
+ */
50
+
51
+ destroy(): void;
52
+ /** {zh}
53
+ * @detail api
54
+ * @brief 设置推流器回调,通过设置回调,监听推流器的推流错误、状态、网络质量、设备、首帧等回调事件。
55
+ * @notes <br>
56
+ * - 需要在创建推流引擎后,调用本方法;
57
+ * - 重复调用本方法,仅最后一次调用生效。
58
+ * @order 2
59
+ * @param observer 推流器回调对象,详细信息请参见 [VeLivePusherObserver](147519#VeLivePusherObserver)。
60
+ *
61
+ */
62
+
63
+ setObserver(observer: VeLivePusherObserver): void;
64
+ /** {zh}
65
+ * @detail api
66
+ * @brief 设置推流器周期性回调,用于定期获取推流状态信息。
67
+ * @notes <br>
68
+ * - 需要在创建推流引擎后,调用本方法;
69
+ * - 重复调用本方法,仅最后一次调用生效。
70
+ * @order 3
71
+ * @param observer 推流器周期性回调对象,详细信息请参见 [VeLivePusherStatisticsObserver](147519#VeLivePusherDef-VeLivePusherStatisticsObserver)。
72
+ * @param interval 周期性回调的时间间隔,单位为 s,默认值为 5。
73
+ *
74
+ */
75
+
76
+ setStatisticsObserver(observer: VeLivePusherStatisticsObserver, interval: number): void;
77
+ /** {zh}
78
+ * @detail api
79
+ * @brief 设置本地摄像头预览视图。摄像头采集到的画面,经过美颜、脸形调整、滤镜等多种效果叠加之后,最终会显示到传入的 View 上。
80
+ * @param view 摄像头预览视图
81
+ * @order 5
82
+ *
83
+ */
84
+
85
+ setRenderView(view: View): Promise<void>;
86
+ /** {zh}
87
+ * @detail api
88
+ * @brief 设置本地预览画面的填充模式。
89
+ * @param mode 填充模式。
90
+ * @order 6
91
+ *
92
+ */
93
+
94
+ setRenderFillMode(mode: VeLivePusherRenderMode): void;
95
+ /** {zh}
96
+ * @detail api
97
+ * @brief 开启/关闭镜像。
98
+ * @notes <br>
99
+ * 用于配置视频镜像效果,影响采集、预览和推流画面。
100
+ * @order 7
101
+ * @param type 镜像类型,详细信息请参见 [VeLiveVideoMirrorType](147521#VeLiveVideoMirrorType)。
102
+ * @param mirror 是否开启镜像。<br>
103
+ * - true:开启;
104
+ * - false:关闭。
105
+ *
106
+ */
107
+
108
+ setVideoMirror(type: VeLiveVideoMirrorType, mirror: boolean): void;
109
+ /** {zh}
110
+ * @detail api
111
+ * @brief 开始视频采集。
112
+ * @notes <br>调用该接口后,可以通过调用接口 [stopVideoCapture](#VeLivePusher-stopvideocapture) 停止视频采集。
113
+ * @order 8
114
+ * @param type 视频采集类型,详细信息请参见 VeLiveVideoCaptureType{@link #VeLiveVideoCaptureType}
115
+ *
116
+ */
117
+
118
+ startVideoCapture(type: VeLiveVideoCaptureType): void;
119
+ /** {zh}
120
+ * @detail api
121
+ * @brief 停止视频采集。
122
+ * @notes <br>调用该接口后,可以通过调用接口 [startVideoCapture](#VeLivePusher-startvideocapture) 开始视频采集。
123
+ * @order 10
124
+ *
125
+ */
126
+
127
+ stopVideoCapture(): void;
128
+ /** {zh}
129
+ * @detail api
130
+ * @brief 开始音频采集。
131
+ * @notes <br>调用该接口后,可以通过调用接口 [stopAudioCapture](#VeLivePusher-stopaudiocapture) 停止音频采集。
132
+ * @order 9
133
+ * @param type 音频采集类型,详细信息请参见 [VeLiveAudioCaptureType](147521#VeLiveAudioCaptureType)。
134
+ *
135
+ */
136
+
137
+ startAudioCapture(type: VeLiveAudioCaptureType): void;
138
+ /** {zh}
139
+ * @detail api
140
+ * @brief 停止音频采集。
141
+ * @notes <br>调用该接口后,可以通过调用接口 [startAudioCapture](#VeLivePusher-startaudiocapture) 开始音频采集。
142
+ * @order 11
143
+ *
144
+ */
145
+
146
+ stopAudioCapture(): void;
147
+ /** {zh}
148
+ * @detail api
149
+ * @brief 切换视频采集类型。
150
+ * @notes <br>该接口必须在调用接口 [startVideoCapture](#VeLivePusher-startvideocapture) 后调用才能生效。
151
+ * @order 12
152
+ * @param type 视频采集类型,详细信息请参见 [VeLiveVideoCaptureType](147521#VeLiveVideoCaptureType)。
153
+ *
154
+ */
155
+
156
+ switchVideoCapture(type: VeLiveVideoCaptureType): void;
157
+ /** {zh}
158
+ * @detail api
159
+ * @brief 切换音频采集类型。
160
+ * @notes <br>该接口必须在调用接口 [startVideoCapture](#VeLivePusher-startvideocapture) 后调用才能生效。
161
+ * @order 13
162
+ * @param type 音频采集类型,详细信息请参见 [VeLiveAudioCaptureType](147521#VeLiveAudioCaptureType)。
163
+ *
164
+ */
165
+
166
+ switchAudioCapture(type: VeLiveAudioCaptureType): void;
167
+ /** {zh}
168
+ * @detail api
169
+ * @brief 获取当前视频采集类型。
170
+ * @order 14
171
+ * @return 视频采集类型,详细信息请参见 [VeLiveVideoCaptureType](147521#VeLiveVideoCaptureType)。
172
+ *
173
+ */
174
+
175
+ getCurrentVideoCaptureType(): VeLiveVideoCaptureType;
176
+ /** {zh}
177
+ * @detail api
178
+ * @brief 获取当前音频采集类型。
179
+ * @order 15
180
+ * @return <br>音频采集类型,详细信息请参见 [VeLiveAudioCaptureType](147521#VeLiveAudioCaptureType)。
181
+ *
182
+ */
183
+
184
+ getCurrentAudioCaptureType(): VeLiveAudioCaptureType;
185
+ /** {zh}
186
+ * @detail api
187
+ * @brief 自定义静态图,适用于静态图推流采集类型。使用该接口时,需要将视频采集类型设置为 VeLiveVideoCaptureCustomImage,您可调用 [startVideoCapture](#VeLivePusher-startvideocapture) 方法,将 [VeLiveVideoCaptureType](147521#VeLiveVideoCaptureType) 设置为 VeLiveVideoCaptureCustomImage。
188
+ * @order 16
189
+ * @param image 静态图片,用于在静态图推流采集类型下设置静态图。
190
+ *
191
+ */
192
+
193
+ updateCustomImage(image: Bitmap): Promise<void>;
194
+ /** {zh}
195
+ * @detail api
196
+ * @brief 获取相机设备管理对象 `VeLiveCameraDevice`。通过设备管理,您可以使用以下功能。
197
+ * - 控制闪光灯开关
198
+ * - 设置摄像头缩放比例
199
+ * - 设置自动对焦
200
+ * @notes <br>
201
+ * 该接口需要在 startVideoCapture{@link #startVideoCapture} 方法中设置 VeLiveVideoCaptureType{@link #VeLiveVideoCaptureType} 为 VeLiveVideoCaptureFrontCamera 或 VeLiveVideoCaptureBackCamera。
202
+ * @order 17
203
+ * @return 相机设备管理对象 [VeLiveCameraDevice](#VeLiveCameraDevice)。
204
+ *
205
+ */
206
+
207
+ getCameraDevice(): VeLiveCameraDevice;
208
+ /** {zh}
209
+ * @detail api
210
+ * @brief 设置推流视频编码参数。
211
+ * @notes 该接口可在推流开始前或开始后调用。
212
+ * @order 18
213
+ * @param config 推流视频参数,支持设置推流视频分辨率、编码格式、目标码率和视频 GOP 大小等信息。详情请参见 [VeLiveVideoEncoderConfiguration](147521#VeLivePusherDef-VeLiveVideoEncoderConfiguration)。
214
+ *
215
+ */
216
+
217
+ setVideoEncoderConfiguration(config: VeLiveVideoEncoderConfiguration): void;
218
+ /** {zh}
219
+ * @platform android
220
+ * @detail api
221
+ * @brief 获取推流视频编码参数。
222
+ * @order 19
223
+ * @return 推流视频参数,支持设置推流视频分辨率、编码格式、目标码率和视频 GOP 大小等信息。详情请参见 [VeLiveVideoEncoderConfiguration](147521#VeLivePusherDef-VeLiveVideoEncoderConfiguration)。
224
+ *
225
+ */
226
+
227
+ android_getVideoEncoderConfiguration(): $p_a.VeLiveVideoEncoderConfiguration;
228
+ /** {zh}
229
+ * @detail api
230
+ * @brief 设置推流音频编码参数。
231
+ * @notes <br>该接口需要在 [startPush](#VeLivePusher-startpush) 或 [startPushWithUrls](#VeLivePusher-startpushwithurls) 方法之前调用。
232
+ * @order 20
233
+ * @param config 推流音频编码参数,详情请参见 [VeLiveAudioEncoderConfiguration](147521#VeLivePusherDef-VeLiveAudioEncoderConfiguration)。
234
+ *
235
+ */
236
+
237
+ setAudioEncoderConfiguration(config: VeLiveAudioEncoderConfiguration): void;
238
+ /** {zh}
239
+ * @platform android
240
+ * @detail api
241
+ * @brief 获取推流音频编码参数。
242
+ * @order 21
243
+ * @return 推流音频编码参数,详情请参见 [VeLiveAudioEncoderConfiguration](147521#VeLivePusherDef-VeLiveAudioEncoderConfiguration)。
244
+ *
245
+ */
246
+
247
+ android_getAudioEncoderConfiguration(): $p_a.VeLiveAudioEncoderConfiguration;
248
+ /** {zh}
249
+ * @detail api
250
+ * @brief 开始推流。
251
+ * @order 22
252
+ * @param url 推流地址,用于将直播流推送到目标服务器。
253
+ *
254
+ */
255
+
256
+ startPush(url: string): void;
257
+ /** {zh}
258
+ * @detail api
259
+ * @brief 开始推流,支持备用推流地址。
260
+ * @notes <br>
261
+ * 当主推流地址不可用时,会自动切换到备用推流地址继续推流。
262
+ * @order 23
263
+ * @param urls 推流地址列表,包含一个或多个推流地址。
264
+ *
265
+ */
266
+
267
+ startPushWithUrls(urls: Array<string>): void;
268
+ /** {zh}
269
+ * @detail api
270
+ * @brief 停止推流。
271
+ * @notes <br>停止推流后,可以通过调用 [startPush](#VeLivePusher-startpush) 或 [startPushWithUrls](#VeLivePusher-startpushwithurls) 方法重新开始推流。
272
+ * @order 24
273
+ *
274
+ */
275
+
276
+ stopPush(): void;
277
+ /** {zh}
278
+ * @detail api
279
+ * @brief 当前是否正在推流中,可用来查询推流器的当前状态。
280
+ * @order 25
281
+ * @return <br>
282
+ * 是否正在推流。<br>
283
+ * - true:正在推流中;
284
+ * - false:已经停止推流。
285
+ *
286
+ */
287
+
288
+ isPushing(): boolean;
289
+ /** {zh}
290
+ * @detail api
291
+ * @brief 设置推流水印。
292
+ * @order 26
293
+ * @param image 水印图片。取值为 null 时,表示禁用水印。
294
+ * @param x 水印的水平偏移量,即水印图片相对视频流左上角的横向偏移与视频流宽度的比值,取值范围为 [0.0,1.0]。
295
+ * @param y 水印的垂直偏移量,即水印图片相对视频流左上角的纵向偏移与视频流高度的比值,取值范围为 [0.0,1.0]。
296
+ * @param scale 水印图片的缩放比例,取值范围为 [0.0,1.0]。
297
+ * @return <br>
298
+ * - 0:水印设置成功;
299
+ * - <0:水印设置失败。
300
+ *
301
+ */
302
+
303
+ setWatermark(image: Bitmap, x: number, y: number, scale: number): Promise<number>;
304
+ /** {zh}
305
+ * @detail api
306
+ * @brief 开始本地文件录制。
307
+ * @order 27
308
+ * @param path 录制文件保存路径,不能为空。
309
+ * @param config 文件录制设置,详情请参见 [VeLiveFileRecorderConfiguration](147521#VeLivePusherDef-VeLiveFileRecorderConfiguration)。
310
+ * @param listener 本地文件录制的监听,详情请参见 [VeLiveFileRecordingListener](147519#VeLivePusherDef-VeLiveFileRecordingListener)。
311
+ *
312
+ */
313
+
314
+ startFileRecording(path: string, config: VeLiveFileRecorderConfiguration, listener: VeLiveFileRecordingListener): void;
315
+ /** {zh}
316
+ * @detail api
317
+ * @brief 停止本地文件录制。
318
+ * @notes <br>该接口需要在 [startFileRecording](#VeLivePusher-startfilerecording) 方法之后调用。
319
+ * @order 28
320
+ *
321
+ */
322
+
323
+ stopFileRecording(): void;
324
+ /** {zh}
325
+ * @detail api
326
+ * @brief 高级配置。
327
+ * @order 29
328
+ * @param key 推流高级配置为 JSON 格式的字符串,此参数为 JSON 结构中的 Key。您可通过提交工单联系[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076),了解配置方法。
329
+ * @param value 推流高级配置为 JSON 格式的字符串,此参数为 JSON 结构中的 Value。您可通过提交工单联系[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076),了解配置方法。
330
+ * @return <br>
331
+ * - 0:成功;
332
+ * - -1:失败,参数错误。
333
+ *
334
+ */
335
+
336
+ setProperty(key: string, value: Object): number;
337
+ /** {zh}
338
+ * @detail api
339
+ * @brief 推送外部视频帧数据。
340
+ * @notes <br>
341
+ * 调用该接口时,需要将视频采集类型设置为 VeLiveVideoCaptureExternal,您可调用 startVideoCapture{@link #startVideoCapture} 方法,将 VeLiveVideoCaptureType{@link #VeLiveVideoCaptureType} 设置为 VeLiveVideoCaptureExternal。
342
+ * @order 30
343
+ * @param frame 视频帧的数据信息,详情请参见 [VeLiveVideoFrame](147521#VeLiveVideoFrame)。
344
+ * @return - 0:成功;
345
+ * - <0:失败。
346
+ *
347
+ */
348
+
349
+ pushExternalVideoFrame(frame: VeLiveVideoFrame): number;
350
+ /** {zh}
351
+ * @detail api
352
+ * @brief 推送外部音频帧数据。
353
+ * @notes 该接口需要在 startAudioCapture 方法中设置 [VeLiveAudioCaptureType](147521#VeLiveAudioCaptureType) 为 VeLiveAudioCaptureExternal。
354
+ * @order 31
355
+ * @param frame 外部音频数据。详情请参见 [VeLiveAudioFrame](147521#VeLiveAudioFrame)。
356
+ * @return <br>
357
+ * - 0:成功;
358
+ * - <0:失败。
359
+ *
360
+ */
361
+
362
+ pushExternalAudioFrame(frame: VeLiveAudioFrame): number;
363
+ /** {zh}
364
+ * @detail api
365
+ * @brief 设置推流视频帧朝向。默认为竖屏推流。
366
+ * @order 32
367
+ * @param orientation 视频帧朝向,详情请参见 [VeLiveOrientation](147521#VeLiveOrientation)。
368
+ *
369
+ */
370
+
371
+ setOrientation(orientation: VeLiveOrientation): void;
372
+ /** {zh}
373
+ * @detail api
374
+ * @brief 通过视频帧发送 SEI 消息。
375
+ * @notes <br>该接口需要在调用 [startPush](#VeLivePusher-startpush) 或 [startPushWithUrls](#VeLivePusher-startpushwithurls) 方法之后调用。
376
+ * @order 33
377
+ * @param key SEI 消息为 JSON 格式的字符串。此参数为 JSON 结构中的 Key。
378
+ * @param value SEI 消息为 JSON 格式的字符串。此参数为 JSON 结构中的 Value。
379
+ * @param repeat 消息发送重复的次数。例如,`repeat` 取值为 20,`isKeyFrame` 取值为 YES,则会在视频帧开始的连续 20 个关键帧中添加 SEI 消息。
380
+ * @param isKeyFrame 是否仅在关键帧中包含 SEI 消息。<br>
381
+ * - true:仅在关键帧中包含;
382
+ * - false:所有帧中均包含。
383
+ * @param allowsCovered 是否允许覆盖。<br>
384
+ * - true:允许;
385
+ * - false:不允许。
386
+ * @return <br>
387
+ * - 0:成功;
388
+ * - <0:失败。
389
+ *
390
+ */
391
+
392
+ sendSeiMessage(key: string, value: Object, repeat: number, isKeyFrame: boolean, allowsCovered: boolean): number;
393
+ /** {zh}
394
+ * @detail api
395
+ * @brief 设置静音。
396
+ * @param mute 是否设置为静音。默认为正常推流。<br>
397
+ * - true:静音推流;
398
+ * - false:正常推流。
399
+ * @order 34
400
+ *
401
+ */
402
+
403
+ setMute(mute: boolean): void;
404
+ /** {zh}
405
+ * @detail api
406
+ * @brief 当前是否是静音状态。
407
+ * @order 35
408
+ * @return <br>
409
+ * - true:当前是静音状态;
410
+ * - false:当前非静音状态。
411
+ *
412
+ */
413
+
414
+ isMute(): boolean;
415
+ /** {zh}
416
+ * @detail api
417
+ * @brief 获取视频特效管理对象 `VeLiveVideoEffectManager`。通过视频特效管理,您可以使用以下功能。
418
+ * - 设置美颜
419
+ * - 设置特效
420
+ * - 设置素材
421
+ * - 设置贴图
422
+ * - 设置滤镜
423
+ * @notes 该接口需要集成智能美化特效 SDK 后才能使用。
424
+ * @order 36
425
+ * @return 视频特效管理对象 [VeLiveVideoEffectManager](#VeLiveVideoEffectManager)。
426
+ *
427
+ */
428
+
429
+ getVideoEffectManager(): VeLiveVideoEffectManager;
430
+ /** {zh}
431
+ * @detail api
432
+ * @brief 自定义视频处理。
433
+ * @order 37
434
+ * @param filter 视频数据处理回调,详情请参见 [VeLiveVideoFrameFilter](147519#VeLivePusherDef-VeLiveVideoFrameFilter)。
435
+ *
436
+ */
437
+
438
+ setVideoFrameFilter(filter: VeLiveVideoFrameFilter): void;
439
+ /** {zh}
440
+ * @detail api
441
+ * @brief 获取音频模块管理对象。
442
+ * @notes <br>
443
+ * 该接口需要在 startAudioCapture{@link #startAudioCapture} 方法中设置 VeLiveAudioCaptureType{@link #VeLiveAudioCaptureType} 为 VeLiveAudioCaptureMicrophone。
444
+ * @order 38
445
+ * @return 音频模块管理对象 [VeLiveAudioDevice](#VeLiveAudioDevice)。
446
+ *
447
+ */
448
+
449
+ getAudioDevice(): VeLiveAudioDevice;
450
+ /** {zh}
451
+ * @detail api
452
+ * @brief 自定义音频处理。
453
+ * @order 39
454
+ * @param filter 音频帧滤镜对象 VeLiveAudioFrameFilter 。
455
+ *
456
+ */
457
+
458
+ setAudioFrameFilter(filter: VeLiveAudioFrameFilter): void;
459
+ /** {zh}
460
+ * @detail api
461
+ * @brief 创建播放器。
462
+ * @order 1
463
+ * @return 播放器管理对象 [VeLiveMediaPlayer](#VeLiveMediaPlayer)。
464
+ *
465
+ */
466
+
467
+ createPlayer(): VeLiveMediaPlayer;
468
+ /** {zh}
469
+ * @platform android
470
+ * @detail api
471
+ * @brief 开始系统音频采集。
472
+ * @order 41
473
+ *
474
+ */
475
+
476
+ android_startMixSystemAudio(): void;
477
+ /** {zh}
478
+ * @platform android
479
+ * @detail api
480
+ * @brief 停止系统音频采集。
481
+ * @order 42
482
+ *
483
+ */
484
+
485
+ android_stopMixSystemAudio(): void;
486
+ /** {zh}
487
+ * @platform android
488
+ * @detail api
489
+ * @brief 获取当前是否处于屏幕采集状态。
490
+ * @order 43
491
+ *
492
+ */
493
+
494
+ android_isScreenRecording(): boolean;
495
+ /** {zh}
496
+ * @detail api
497
+ * @brief 添加视频帧的监听回调,用于获取推流器输出的视频帧。
498
+ * @order 44
499
+ * @param listener 视频帧的监听回调,详细信息请参见 [VeLiveVideoFrameListener](147519#VeLivePusherDef-VeLiveVideoFrameListener)。
500
+ * @return <br>
501
+ * - 0:成功;
502
+ * - <0:失败。
503
+ *
504
+ */
505
+
506
+ addVideoFrameListener(listener: VeLiveVideoFrameListener): number;
507
+ /** {zh}
508
+ * @detail api
509
+ * @brief 移除已添加的视频帧监听回调。
510
+ * @notes <br>
511
+ * 如果没有添加过此监听回调或者监听回调已被移除,调用此方法将返回失败。
512
+ * @order 45
513
+ * @param listener 视频帧的监听回调,详细信息请参见 [VeLiveVideoFrameListener](147519#VeLivePusherDef-VeLiveVideoFrameListener)。
514
+ * @return <br>
515
+ * - 0:成功;
516
+ * - <0:失败。
517
+ *
518
+ */
519
+
520
+ removeVideoFrameListener(listener: VeLiveVideoFrameListener): number;
521
+ /** {zh}
522
+ * @detail api
523
+ * @brief 添加音频帧的监听回调,用于获取推流器输出的音频帧。
524
+ * @order 46
525
+ * @param listener 音频帧监听回调,详细信息请参见 [VeLiveAudioFrameListener](147519#VeLivePusherDef-VeLiveAudioFrameListener)。
526
+ * @return <br>
527
+ * - 0:成功;
528
+ * - <0:失败。
529
+ *
530
+ */
531
+
532
+ addAudioFrameListener(listener: VeLiveAudioFrameListener): number;
533
+ /** {zh}
534
+ * @detail api
535
+ * @brief 移除已添加的音频帧监听回调。
536
+ * @notes <br>
537
+ * 如果没有添加过此监听回调或者监听回调已被移除,调用此方法将返回失败。
538
+ * @order 47
539
+ * @param listener 音频帧的监听回调,详细信息请参见 [VeLiveAudioFrameListener](147519#VeLivePusherDef-VeLiveAudioFrameListener)。
540
+ * @return <br>
541
+ * - 0:成功;
542
+ * - <0:失败。
543
+ *
544
+ */
545
+
546
+ removeAudioFrameListener(listener: VeLiveAudioFrameListener): number;
547
+ /** {zh}
548
+ * @detail api
549
+ * @brief 视频截图。
550
+ * @order 48
551
+ * @param listener 截图监听对象,详情请参见 [VeLiveSnapshotListener](147519#VeLivePusherDef-VeLiveSnapshotListener)。
552
+ *
553
+ */
554
+
555
+ snapshot(listener: VeLiveSnapshotListener): void;
556
+ /** {zh}
557
+ * @platform ios
558
+ * @detail api
559
+ * @param applicationGroupIdentifier iOS app group 标识符。
560
+ * @brief 开启屏幕采集。
561
+ * @order 20
562
+ */
563
+
564
+ ios_startScreenCapture(applicationGroupIdentifier: string): void;
565
+ /** {zh}
566
+ * @platform ios
567
+ * @detail api
568
+ * @brief 停止屏幕采集。
569
+ * @notes <br>
570
+ * 该方法用于结束当前屏幕采集流程,并释放相关资源。调用本方法后,`pauseScreenCapture` 和 `resumeScreenCapture` 将不再生效。
571
+ * @order 21
572
+ */
573
+
574
+ ios_stopScreenCapture(): void;
575
+ /** {zh}
576
+ * @platform ios
577
+ * @detail api
578
+ * @brief 暂停屏幕采集。
579
+ * @notes <br>
580
+ * 调用该方法后,屏幕采集将暂停输出数据,但不会销毁内部资源。您可通过 `resumeScreenCapture` 来恢复采集。如果当前采集已经停止或尚未开始,调用本方法不会产生任何效果。
581
+ * @order 22
582
+ */
583
+
584
+ ios_pauseScreenCapture(): void;
585
+ /** {zh}
586
+ * @platform ios
587
+ * @detail api
588
+ * @brief 恢复屏幕采集。
589
+ * @notes <br>
590
+ * 在调用 `pauseScreenCapture` 暂停后,通过本方法可以恢复屏幕采集输出。如果屏幕采集已经停止或尚未开始,调用本方法不会产生任何效果。
591
+ * @order 23
592
+ */
593
+
594
+ ios_resumeScreenCapture(): void;
595
+ /** {zh}
596
+ * @platform ios
597
+ * @detail api
598
+ * @brief 初始化推流器。
599
+ * @order 0
600
+ * @param config 推流配置类。详细信息请参见 [VeLivePusherConfiguration](155321#VeLivePusherConfiguration)。
601
+ */
602
+
603
+ ios_initWithConfig(config: $p_i.VeLivePusherConfiguration): this;
604
+ /** {zh}
605
+ * @platform ios
606
+ * @detail api
607
+ * @brief 添加屏幕采集的监听。
608
+ * @notes <br>
609
+ * 如果没有添加过此监听回调或者监听回调已被移除,调用此方法将返回失败。
610
+ * @param listener 屏幕采集事件监听回调,详细信息请参见 VeLiveScreenCaptureStatusObserver{@link #VeLiveScreenCaptureStatusObserver}
611
+ * @param observer 录屏推流事件监听器。详情见 [VeLiveScreenCaptureStatusObserver](155319#VeLiveScreenCaptureStatusObserver)。
612
+ * @order 5
613
+ * @return <br>
614
+ * - 0:成功;
615
+ * - <0:失败。
616
+ */
617
+
618
+ ios_setScreenCaptureObserver(observer: $p_i.id<$p_i.VeLiveScreenCaptureStatusObserver>): number;
619
+ /** {zh}
620
+ * @platform ios
621
+ * @detail api
622
+ * @brief 推送外部视频编码数据。
623
+ * @notes
624
+ * 该接口需要在 [startVideoCapture:](#VeLivePusher-startvideocapture) 方法中设置 [VeLiveVideoCaptureType](155321#VeLiveVideoCaptureType) 为 VeLiveVideoCaptureFrontCamera 或 VeLiveVideoCaptureExternal。
625
+ * @order 38
626
+ * @param encodeFrame 视频编码帧的数据信息,详情请参见 [VeLiveVideoEncodeFrame](155321#VeLiveVideoEncodeFrame)。
627
+ * @return <br>
628
+ * - 0:成功;
629
+ * - <0:失败。
630
+ */
631
+
632
+ ios_pushExternalVideoEncodeFrame(encodeFrame: $p_i.VeLiveVideoEncodeFrame): number;
633
+ /** {zh}
634
+ * @platform ios
635
+ * @detail api
636
+ * @brief 强制请求 IDR 帧,发起请求以编码一个新的 IDR 帧。
637
+ * @notes
638
+ * 该接口需要在调用 [startPush:](#VeLivePusher-startpush) 或 [startPushWithUrls:](#VeLivePusher-startpushwithurls) 方法之后调用。
639
+ * @order 49
640
+ */
641
+
642
+ ios_requestIDRFrame(): void;
643
+ }
644
+ /** {zh}
645
+ * @detail api
646
+ * @brief 媒体播放器对象。
647
+ */
648
+ export declare class VeLiveMediaPlayer {
649
+ protected _instance: any;
650
+ protected __init(...args: any[]): void;
651
+ protected __new_instance(...args: any[]): any;
652
+ /** {zh}
653
+ * @detail api
654
+ * @brief 销毁播放器实例。
655
+ * @order 1
656
+ *
657
+ */
658
+
659
+ destroy(): void;
660
+ /** {zh}
661
+ * @detail api
662
+ * @brief 设置播放状态的监听。
663
+ * @notes <br>
664
+ * 重复调用本方法,仅最后一次调用生效。
665
+ * @order 4
666
+ * @param listener 播放状态监听。详情请参见 [VeLiveMediaPlayerListener](147519#VeLivePusherDef-VeLiveMediaPlayerListener)。
667
+ *
668
+ */
669
+
670
+ setListener(listener: VeLiveMediaPlayerListener): void;
671
+ /** {zh}
672
+ * @detail api
673
+ * @brief 设置文件路径。支持的文件格式包括 MP3、AAC、M4A、WAV。
674
+ * @order 2
675
+ * @param url 文件路径。
676
+ * @return <br>
677
+ * - 0:成功;
678
+ * - ≠0:失败。
679
+ *
680
+ */
681
+
682
+ prepare(url: string): number;
683
+ /** {zh}
684
+ * @detail api
685
+ * @brief 开始播放。
686
+ * @notes <br>
687
+ * 需要在调用 start{@link #start} 开始播放后,调用本方法。
688
+ * @order 12
689
+ *
690
+ */
691
+
692
+ start(): Promise<number>;
693
+ /** {zh}
694
+ * @detail api
695
+ * @brief 停止播放。
696
+ * @notes <br>
697
+ * 需要在调用 start{@link #start} 开始播放后,调用本方法。
698
+ * @order 13
699
+ * @return <br>
700
+ * - 0:成功;
701
+ * - ≠0:失败。
702
+ *
703
+ */
704
+
705
+ stop(): Promise<number>;
706
+ /** {zh}
707
+ * @detail api
708
+ * @brief 暂停播放。
709
+ * @notes <br>需要在调用 [start](#VeLiveMediaPlayer-start)[start](#VeLiveMediaPlayer-start) 开始播放后,调用本方法。
710
+ * @order 14
711
+ *
712
+ */
713
+
714
+ pause(): Promise<void>;
715
+ /** {zh}
716
+ * @detail api
717
+ * @brief 恢复播放。
718
+ * @notes <br>需要在调用 [pause](#VeLiveMediaPlayer-pause) 暂停播放后,调用本方法。
719
+ * @order 15
720
+ *
721
+ */
722
+
723
+ resume(): Promise<void>;
724
+ /** {zh}
725
+ * @detail api
726
+ * @brief 获取文件的总时长,单位为 ms。
727
+ * @notes <br>需要在调用 [start](#VeLiveMediaPlayer-start) 开始播放后,调用本方法。
728
+ * @order 3
729
+ * @return <br>
730
+ * - >0:成功,音频文件时长;
731
+ * - ≤0:失败。
732
+ *
733
+ */
734
+
735
+ getDuration(): number;
736
+ /** {zh}
737
+ * @detail api
738
+ * @brief 设置播放进度。
739
+ * @order 5
740
+ * @param posMs 播放时间,单位为 ms。
741
+ * @return <br>
742
+ * - 0:成功;
743
+ * - ≠0:失败。
744
+ *
745
+ */
746
+
747
+ seek(posMs: number): number;
748
+ /** {zh}
749
+ * @detail api
750
+ * @brief 开启/关闭音频是否混音到直播流。
751
+ * @param enable 开启/关闭,默认为 false。 <br>
752
+ * - ture:开启;
753
+ * - false:关闭。
754
+ * @order 6
755
+ *
756
+ */
757
+
758
+ enableMixer(enable: boolean): void;
759
+ /** {zh}
760
+ * @detail api
761
+ * @brief 开启/关闭自动音量均衡。
762
+ * @order 7
763
+ * @param sourceLufs 源响度。
764
+ * @param targetLufs 目标响度。
765
+ *
766
+ */
767
+
768
+ enableAutoEq(sourceLufs: number, targetLufs: number): void;
769
+ /** {zh}
770
+ * @detail api
771
+ * @brief 设置音视频帧回调的监听。
772
+ * @notes <br>
773
+ * 重复调用本方法,仅最后一次调用生效。
774
+ * @order 8
775
+ * @param listener 音视频帧回调监听。详情请参见 [VeLiveMediaPlayerFrameListener](147519#VeLivePusherDef-VeLiveMediaPlayerFrameListener)。
776
+ *
777
+ */
778
+
779
+ setFrameListener(listener: VeLiveMediaPlayerFrameListener): void;
780
+ /** {zh}
781
+ * @detail api
782
+ * @brief 设置播放音频的音量。
783
+ * @order 9
784
+ * @param volume 播放音频音量,取值范围为 [0.0,4.0]。
785
+ *
786
+ */
787
+
788
+ setBGMVolume(volume: number): void;
789
+ /** {zh}
790
+ * @detail api
791
+ * @brief 设置音频采集音量。
792
+ * @notes <br>需要在调用 [start](#VeLiveMediaPlayer-start) 开始播放背景音乐后,调用本方法。
793
+ * @order 10
794
+ * @param volume 音频采集音量,取值范围为 [0.0,4.0]。
795
+ *
796
+ */
797
+
798
+ setVoiceVolume(volume: number): void;
799
+ /** {zh}
800
+ * @detail api
801
+ * @brief 设置是否循环播放。
802
+ * @param loop 是否循环播放。默认为 false。<br>
803
+ * - true:循环播放;
804
+ * - false:不循环播放。
805
+ * @order 11
806
+ *
807
+ */
808
+
809
+ enableBGMLoop(loop: boolean): void;
810
+ /** {zh}
811
+ * @platform ios
812
+ * @detail api
813
+ * @brief 支持 MP4 格式的视频渲染。
814
+ * @param view 渲染视图。
815
+ * @order 93
816
+ */
817
+
818
+ ios_setRenderView(view: $p_i.UIView): void;
819
+ }
820
+ /** {zh}
821
+ * @detail keytype
822
+ * @brief 推流引擎初始化配置。
823
+ */
824
+ export declare class VeLivePusherConfiguration {
825
+ protected _instance: any;
826
+ /** {zh}
827
+ * @platform ios
828
+ * @brief 音频采集参数设置,用于调整和设置音频采集相关的参数。详情请参见 [VeLiveAudioCaptureConfiguration](#VeLiveAudioCaptureConfiguration)。
829
+ */
830
+
831
+ get audioCaptureConfig(): $p_i.VeLiveAudioCaptureConfiguration;
832
+ set audioCaptureConfig(value: $p_i.VeLiveAudioCaptureConfiguration);
833
+ /** {zh}
834
+ * @platform ios
835
+ * @brief 推流失败后,尝试重连的时间间隔。单位为 s,默认值为 5。
836
+ */
837
+
838
+ get reconnectIntervalSeconds(): $p_i.int;
839
+ set reconnectIntervalSeconds(value: $p_i.int);
840
+ /** {zh}
841
+ * @platform ios
842
+ * @brief 推流失败后,尝试重连的次数。默认值为 3。
843
+ */
844
+
845
+ get reconnectCount(): $p_i.int;
846
+ set reconnectCount(value: $p_i.int);
847
+ /** {zh}
848
+ * @platform ios
849
+ * @brief 设置扩展参数,用于实现某些特殊功能或配置,默认不需要设置。
850
+ */
851
+
852
+ get extraParameters(): $p_i.NSDictionary;
853
+ set extraParameters(value: $p_i.NSDictionary);
854
+ protected __init(...args: any[]): void;
855
+ protected __new_instance(...args: any[]): any;
856
+ /** {zh}
857
+ * @detail api
858
+ * @brief 设置视频采集参数,用于调整和设置视频采集相关的参数。
859
+ * @order 6
860
+ * @param config 视频采集参数,详情请参见 [VeLiveVideoCaptureConfiguration](#VeLivePusherDef-VeLiveVideoCaptureConfiguration)。
861
+ * @return 推流引擎初始化配置对象,详情请参见 [VeLivePusherConfiguration](#VeLivePusherConfiguration)。
862
+ *
863
+ */
864
+
865
+ setVideoCaptureConfig(config: VeLiveVideoCaptureConfiguration): void;
866
+ /** {zh}
867
+ * @platform android
868
+ * @detail api
869
+ * @brief 设置推流器推流失败后尝试重连的时间间隔。
870
+ * @param interval 时间间隔,单位为 s,默认值为 5
871
+ * @order 2
872
+ *
873
+ */
874
+
875
+ android_setReconnectIntervalSeconds(interval: number): this;
876
+ /** {zh}
877
+ * @platform android
878
+ * @detail api
879
+ * @brief 获取推流器推流失败后尝试重连的时间间隔。
880
+ * @order 3
881
+ * @return <br>
882
+ * 时间间隔,单位为 s。
883
+ *
884
+ */
885
+
886
+ android_getReconnectIntervalSeconds(): number;
887
+ /** {zh}
888
+ * @platform android
889
+ * @detail api
890
+ * @brief 设置推流器推流失败后尝试重连的次数。
891
+ * @param maxCount 重连次数,默认值为 3
892
+ * @order 4
893
+ *
894
+ */
895
+
896
+ android_setReconnectCount(maxCount: number): this;
897
+ /** {zh}
898
+ * @platform android
899
+ * @detail api
900
+ * @brief 获取推流器推流失败后尝试重连的次数。
901
+ * @order 5
902
+ * @return <br>
903
+ * 重连次数。
904
+ *
905
+ */
906
+
907
+ android_getReconnectCount(): number;
908
+ /** {zh}
909
+ * @platform android
910
+ * @detail api
911
+ * @brief 获取视频采集参数,用于调整和设置视频采集相关的参数。
912
+ * @order 7
913
+ * @return 视频采集参数配置对象,详情请参见 [VeLiveVideoCaptureConfiguration](#VeLivePusherDef-VeLiveVideoCaptureConfiguration)。
914
+ *
915
+ */
916
+
917
+ android_getVideoCaptureConfig(): $p_a.VeLiveVideoCaptureConfiguration;
918
+ /** {zh}
919
+ * @platform android
920
+ * @detail api
921
+ * @brief 设置音频采集参数,用于调整和设置音频采集相关的参数。
922
+ * @order 7
923
+ * @param config 音频采集参数,详情请参见 [VeLiveAudioCaptureConfiguration](#VeLivePusherDef-VeLiveAudioCaptureConfiguration)。
924
+ * @return 推流引擎初始化配置对象,详情请参见 [VeLiveAudioCaptureConfiguration](#VeLivePusherDef-VeLiveAudioCaptureConfiguration)。
925
+ *
926
+ */
927
+
928
+ android_setAudioCaptureConfig(config: $p_a.VeLiveAudioCaptureConfiguration): this;
929
+ /** {zh}
930
+ * @platform android
931
+ * @detail api
932
+ * @brief 获取音频采集参数,用于调整和设置音频采集相关的参数。
933
+ * @order 8
934
+ * @return 音频采集参数配置对象,详情请参见 [VeLiveAudioCaptureConfiguration](#VeLivePusherDef-VeLiveAudioCaptureConfiguration)。
935
+ *
936
+ */
937
+
938
+ android_getAudioCaptureConfig(): $p_a.VeLiveAudioCaptureConfiguration;
939
+ /** {zh}
940
+ * @platform android
941
+ * @detail api
942
+ * @brief 设置应用上下文。
943
+ * @order 9
944
+ * @param context 应用上下文。
945
+ * @return 推流引擎初始化配置对象,详情请参见 [VeLivePusherConfiguration](#VeLivePusherConfiguration)。
946
+ *
947
+ */
948
+
949
+ android_setContext(context: $p_a.Context): this;
950
+ /** {zh}
951
+ * @platform android
952
+ * @detail api
953
+ * @brief 获取应用上下文。
954
+ * @order 10
955
+ * @return <br>
956
+ * 应用上下文。
957
+ *
958
+ */
959
+
960
+ android_getContext(): $p_a.Context;
961
+ /** {zh}
962
+ * @platform android
963
+ * @detail api
964
+ * @brief 设置扩展参数,默认不需要设置。如果需要使用,您可通过提交工单联系[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076)。
965
+ * @order 11
966
+ * @param params 扩展参数。
967
+ * @return
968
+ * 推流引擎初始化配置对象,详情请参见 [VeLivePusherConfiguration](#VeLivePusherConfiguration)。
969
+ *
970
+ */
971
+
972
+ android_setExtraParameters(params: string): this;
973
+ /** {zh}
974
+ * @platform android
975
+ * @detail api
976
+ * @brief 获取扩展参数。
977
+ * @order 12
978
+ * @return <br>
979
+ * 扩展参数。
980
+ *
981
+ */
982
+
983
+ android_getExtraParams(): $p_a.LiveSdkSetting;
984
+ /** {zh}
985
+ * @platform android
986
+ * @detail api
987
+ * @brief 构造推流引擎。
988
+ * @order 1
989
+ * @return 推流引擎,详情请参见 [VeLivePusher](147517#VeLivePusher)。
990
+ *
991
+ */
992
+
993
+ android_build(): $p_a.VeLivePusher;
994
+ }
995
+ /** {zh}
996
+ * @detail api
997
+ * @brief 相机设备管理对象。
998
+ */
999
+ export declare class VeLiveCameraDevice {
1000
+ protected _instance: any;
1001
+ protected __init(...args: any[]): void;
1002
+ protected __new_instance(...args: any[]): any;
1003
+ /** {zh}
1004
+ * @platform android
1005
+ * @detail api
1006
+ * @brief 获取相机支持帧率范围。
1007
+ * @notes <br>需要在调用 [startVideoCapture](#VeLivePusher-startvideocapture) 启动相机采集后,调用本方法。
1008
+ * @order 3
1009
+ * @return <br>
1010
+ * 相机支持帧率范围。
1011
+ *
1012
+ */
1013
+
1014
+ android_getRealFpsRange(): Array<$p_a.int>;
1015
+ /** {zh}
1016
+ * @detail api
1017
+ * @brief 开启/关闭闪光灯。
1018
+ * @notes <br>需要在调用 [startVideoCapture](#VeLivePusher-startvideocapture) 启动相机采集后,调用本方法。
1019
+ * @order 8
1020
+ * @param enable 是否开启闪光灯。默认为 false。 <br>
1021
+ * - true:开启;
1022
+ * - false:关闭。
1023
+ * @return <br>
1024
+ * - 0:开启/关闭成功;
1025
+ * - ≠0:开启/关闭失败。
1026
+ *
1027
+ */
1028
+
1029
+ enableTorch(enable: boolean): number;
1030
+ /** {zh}
1031
+ * @detail api
1032
+ * @brief 设置摄像头的缩放倍数。
1033
+ * @notes <br>需要在调用 [startVideoCapture](#VeLivePusher-startvideocapture) 启动相机采集后,调用本方法。
1034
+ * @order 5
1035
+ * @param ratio 缩放倍数。默认为原尺寸。缩放倍数的取值范围为 [[getMinZoomRatio](#VeLiveCameraDevice-getminzoomratio),[getMaxZoomRatio](#VeLiveCameraDevice-getmaxzoomratio)]。
1036
+ * @return <br>
1037
+ * - 0:缩放成功;
1038
+ * - ≠0:缩放失败。
1039
+ *
1040
+ */
1041
+
1042
+ setZoomRatio(ratio: number): number;
1043
+ /** {zh}
1044
+ * @detail api
1045
+ * @brief 获取摄像头当前的缩放倍数。
1046
+ * @notes <br>需要在调用 [startVideoCapture](#VeLivePusher-startvideocapture) 启动相机采集后,调用本方法。
1047
+ * @order 4
1048
+ * @return <br>
1049
+ * - ≤0:表示不支持缩放;
1050
+ * - >0:支持缩放,数值表示当前缩放倍数。
1051
+ *
1052
+ */
1053
+
1054
+ getCurrentZoomRatio(): number;
1055
+ /** {zh}
1056
+ * @detail api
1057
+ * @brief 获取摄像头的最大缩放倍数。
1058
+ * @notes <br>需要在调用 [startVideoCapture](#VeLivePusher-startvideocapture) 启动相机采集后,调用本方法。
1059
+ * @order 6
1060
+ * @return <br>
1061
+ * - ≤0:表示不支持缩放;
1062
+ * - >0:支持缩放,数值表示最大缩放倍数。
1063
+ *
1064
+ */
1065
+
1066
+ getMaxZoomRatio(): number;
1067
+ /** {zh}
1068
+ * @detail api
1069
+ * @brief 获取摄像头的最小缩放倍数。
1070
+ * @notes <br>需要在调用 [startVideoCapture](#VeLivePusher-startvideocapture) 启动相机采集后,调用本方法。
1071
+ * @order 7
1072
+ * @return <br>
1073
+ * - ≤0:表示不支持缩放;
1074
+ * - >0:支持缩放,数值表示最小缩放倍数。
1075
+ *
1076
+ */
1077
+
1078
+ getMinZoomRatio(): number;
1079
+ /** {zh}
1080
+ * @detail api
1081
+ * @brief 是否支持自动对焦。
1082
+ * @notes <br>需要在调用 [startVideoCapture](#VeLivePusher-startvideocapture) 启动相机采集后,调用本方法。
1083
+ * @order 9
1084
+ * @return <br>
1085
+ * - true:支持;
1086
+ * - false:不支持。
1087
+ *
1088
+ */
1089
+
1090
+ isAutoFocusEnabled(): boolean;
1091
+ /** {zh}
1092
+ * @detail api
1093
+ * @brief 开启/关闭自动对焦功能。
1094
+ * @notes <br>需要在调用 [startVideoCapture](#VeLivePusher-startvideocapture) 启动相机采集后,调用本方法。
1095
+ * @order 10
1096
+ * @param enable 是否开启自动对焦,默认为 true。
1097
+ * - true:开启;
1098
+ * - false:关闭。
1099
+ * @return <br>
1100
+ * - 0:开启/关闭成功;
1101
+ * - ≠0:开启/关闭失败。
1102
+ *
1103
+ */
1104
+
1105
+ enableAutoFocus(enable: boolean): number;
1106
+ /** {zh}
1107
+ * @detail api
1108
+ * @brief 设置摄像头的对焦位置。
1109
+ * @notes 需要在调用 [startVideoCapture](#VeLivePusher-startvideocapture) 启动相机采集后,调用本方法。
1110
+ * @order 11
1111
+ * @param viewW 当前视图宽度。
1112
+ * @param viewH 当前视图高度。
1113
+ * @param x 以左上角为原点,对焦点距当前视图的横向坐标值。
1114
+ * @param y 以左上角为原点,对焦点距当前视图的纵向坐标值。
1115
+ * @return <br>
1116
+ * - 0:设置成功;
1117
+ * - ≠0:设置失败。
1118
+ *
1119
+ */
1120
+
1121
+ setFocusPosition(viewW: number, viewH: number, x: number, y: number): number;
1122
+ /** {zh}
1123
+ * @detail api
1124
+ * @brief 检查当前使用的摄像头是否支持手动设置曝光点。
1125
+ * @notes 必须已调用 [startVideoCapture](#VeLivePusher-startvideocapture) 使用 SDK 内部采集模块进行视频采集时,才能检查曝光点设置能力。
1126
+ * @order 12
1127
+ * @return - YES:支持;
1128
+ * - NO:不支持。
1129
+ *
1130
+ */
1131
+
1132
+ isExposurePositionSupported(): boolean;
1133
+ /** {zh}
1134
+ * @detail api
1135
+ * @brief 设置当前使用的摄像头的曝光点。
1136
+ * @notes - 必须已调用 [startVideoCapture](#VeLivePusher-startvideocapture) 使用 SDK 内部采集模块进行视频采集,并且使用 SDK 内部渲染时,才能设置曝光点;
1137
+ * - 调用 [stopVideoCapture](#VeLivePusher-stopvideocapture) 关闭内部采集后,设置的曝光点失效。
1138
+ * @order 13
1139
+ * @param viewW 当前视图宽度。
1140
+ * @param viewH 当前视图高度。
1141
+ * @param x 以左上角为原点,对焦点距当前视图的横向坐标值。
1142
+ * @param y 以左上角为原点,对焦点距当前视图的纵向坐标值。
1143
+ * @return - =0:成功;
1144
+ * - ≠0:失败。
1145
+ *
1146
+ */
1147
+
1148
+ setExposurePosition(viewW: number, viewH: number, x: number, y: number): number;
1149
+ /** {zh}
1150
+ * @detail api
1151
+ * @brief 获取摄像头的最小曝光补偿值。
1152
+ * @notes 需要在调用 [startVideoCapture](#VeLivePusher-startvideocapture) 启动相机采集后,调用本方法。
1153
+ * @order 14
1154
+ * @return - ≤0:表示不支持曝光补偿;
1155
+ * - >0:支持曝光补偿,数值表示最小曝光补偿。
1156
+ *
1157
+ */
1158
+
1159
+ getMinExposureCompensation(): number;
1160
+ /** {zh}
1161
+ * @detail api
1162
+ * @brief 获取摄像头的最大曝光补偿值。
1163
+ * @notes 需要在调用 [startVideoCapture](#VeLivePusher-startvideocapture) 启动相机采集后,调用本方法。
1164
+ * @order 15
1165
+ * @return - ≤0:表示不支持曝光补偿;
1166
+ * - >0:支持曝光补偿,数值表示最大曝光补偿。
1167
+ *
1168
+ */
1169
+
1170
+ getMaxExposureCompensation(): number;
1171
+ /** {zh}
1172
+ * @detail api
1173
+ * @brief 设置当前使用的摄像头的曝光补偿。
1174
+ * @notes - 必须已调用 [startVideoCapture](#VeLivePusher-startvideocapture) 使用 SDK 内部采集模块进行视频采集时,才能设置曝光补偿。
1175
+ * - 调用 [stopVideoCapture](#VeLivePusher-stopvideocapture) 关闭内部采集后,设置的曝光补偿失效。
1176
+ * @order 16
1177
+ * @param value 曝光补偿值,取值范围 [[getMinExposureCompensation](#VeLiveCameraDevice-getminexposurecompensation),[getMaxExposureCompensation](#VeLiveCameraDevice-getmaxexposurecompensation)],0 为系统默认值,表示没有曝光补偿。
1178
+ * @return - =0:设置成功;
1179
+ * - ≠0:设置失败。
1180
+ *
1181
+ */
1182
+
1183
+ setExposureCompensation(value: number): number;
1184
+ /** {zh}
1185
+ * @platform ios
1186
+ * @detail api
1187
+ * @brief 是否支持闪光灯。
1188
+ * @notes 需要在调用 [startVideoCapture:](#VeLivePusher-startvideocapture) 启动相机采集后,调用本方法。
1189
+ * @order 49
1190
+ * @return <br>
1191
+ * - YES:支持;
1192
+ * - NO:不支持。
1193
+ */
1194
+
1195
+ ios_isTorchSupported(): boolean;
1196
+ /** {zh}
1197
+ * @platform ios
1198
+ * @detail api
1199
+ * @brief 设置相机参数。
1200
+ * @notes 需要在调用 [startVideoCapture:](#VeLivePusher-startvideocapture) 启动相机采集后,调用本方法。
1201
+ * @order 64
1202
+ * @param parameter 相机参数字典,包含要设置的参数名称(键)和对应的值
1203
+ */
1204
+
1205
+ ios_setParameter(parameter: $p_i.NSDictionary): void;
1206
+ /** {zh}
1207
+ * @platform ios
1208
+ * @detail api
1209
+ * @brief 获取相机参数。
1210
+ * @notes 需要在调用 [startVideoCapture:](#VeLivePusher-startvideocapture) 启动相机采集后,调用本方法。
1211
+ * @order 65
1212
+ * @param key 需要获取的相机参数的名称。
1213
+ * @return <br>
1214
+ * 相机参数的值,具体类型需要根据参数名称确定。
1215
+ */
1216
+
1217
+ ios_getParameter(key: string): $p_i.id;
1218
+ }
1219
+ /** {zh}
1220
+ * @detail api
1221
+ * @brief 视频特效管理对象。用于管理和设置视频特效,包括美颜、美形、美体、美妆、滤镜等。
1222
+ */
1223
+ export declare class VeLiveVideoEffectManager {
1224
+ protected _instance: any;
1225
+ protected __init(...args: any[]): void;
1226
+ protected __new_instance(...args: any[]): any;
1227
+ /** {zh}
1228
+ * @detail api
1229
+ * @brief 视频特效许可证配置,用于初始化视频特效管理对象。
1230
+ * @order 89
1231
+ * @param config 特效初始化配置,详情请参见 [VeLiveVideoEffectLicenseConfiguration](147521#VeLivePusherDef-VeLiveVideoEffectLicenseConfiguration)。
1232
+ * @return <br>
1233
+ * - 0:调用成功;
1234
+ * - -1:调用失败。
1235
+ *
1236
+ */
1237
+
1238
+ setupWithConfig(config: VeLiveVideoEffectLicenseConfiguration): number;
1239
+ /** {zh}
1240
+ * @detail api
1241
+ * @brief 如果您使用在线 License 认证方式,在许可证过期后,可调用该方法更新 License;
1242
+ * @notes - 需要通过调用 [setupWithConfig](#VeLiveVideoEffectManager-setupwithconfig) 设置视频特效许可证后调用;
1243
+ * - 本方法为异步操作。
1244
+ * @order 90
1245
+ * @param callback 结果回调信息
1246
+ *
1247
+ */
1248
+
1249
+ updateLicense(callback: (result: number, message: string) => void): void;
1250
+ /** {zh}
1251
+ * @detail api
1252
+ * @brief 创建/销毁特效引擎。
1253
+ * @notes - 该方法需要在调用 [setupWithConfig](#VeLiveVideoEffectManager-setupwithconfig) 和 [setAlgorithmModelPath](#VeLiveVideoEffectManager-setalgorithmmodelpath) 后调用;
1254
+ * - 该方法不直接开启/关闭视频特效,您需要在调用该方法后,调用 [setComposeNodes](#VeLiveVideoEffectManager-setcomposenodes) 开启视频特效;
1255
+ * - 通用场景下,特效引擎会随 EffectManager 销毁而销毁。如果您对性能有较高要求,也可以在不使用特效相关功能时,调用该方法销毁特效引擎;
1256
+ * - 如果重复创建/销毁特效引擎,会产生时间消耗。
1257
+ * @order 92
1258
+ * @param enable 是否创建特效引擎。默认为 false。 <br>
1259
+ * - true:创建;
1260
+ * - false:销毁。
1261
+ * @param callback 视频特效回调 [VeLiveVideoEffectCallback](147519#VeLivePusherDef-VeLiveVideoEffectCallback)。
1262
+ * @return - 0:成功;
1263
+ * - -1:失败。
1264
+ *
1265
+ */
1266
+
1267
+ setEnable(enable: boolean, callback: (result: number, msg: string) => void): void;
1268
+ /** {zh}
1269
+ * @platform android
1270
+ * @detail api
1271
+ * @brief 设置特效算法模型包的路径。
1272
+ * @notes <br>需要通过调用 [setupWithConfig](#VeLiveVideoEffectManager-setupwithconfig) 设置视频特效许可证后调用。
1273
+ * @order 91
1274
+ * @param path 特效算法模型包的路径
1275
+ * @return <br>
1276
+ * - 0:调用成功;
1277
+ * - -1:调用失败。
1278
+ *
1279
+ */
1280
+
1281
+ android_setAlgorithmModelPath(path: string): number;
1282
+ /** {zh}
1283
+ * @detail api
1284
+ * @brief 设置视频特效组合。支持设置 ComposeMakeup.bundle 中的功能,包括美颜、美形、美体、美妆等。
1285
+ * @notes <br>
1286
+ * - 需要在调用 [setEnable](#VeLiveVideoEffectManager-setenable) 创建特效引擎后,调用本方法;
1287
+ * - 重复调用本方法,仅最后一次调用生效;
1288
+ * - 如果需要在当前的视频特效组合中叠加特效,可调用 [appendComposeNodes](#VeLiveVideoEffectManager-appendcomposenodes) 方法。
1289
+ * @order 93
1290
+ * @param nodes 视频特效素材包路径数组
1291
+ * @return <br>
1292
+ * - 0:调用成功;
1293
+ * - -1:调用失败。
1294
+ *
1295
+ */
1296
+
1297
+ setComposeNodes(nodes: Array<string>): number;
1298
+ /** {zh}
1299
+ * @detail api
1300
+ * @brief 在已有的视频特效组合上,叠加视频特效素材包,您可以调用 [setComposeNodes](#VeLiveVideoEffectManager-setcomposenodes) 设置视频特效组合。
1301
+ * @notes 需要在调用 [setEnable](#VeLiveVideoEffectManager-setenable) 创建特效引擎后,调用本方法。
1302
+ * @order 94
1303
+ * @param nodes 视频特效素材包路径数组
1304
+ * @return <br>
1305
+ * - 0:调用成功;
1306
+ * - -1:调用失败。
1307
+ *
1308
+ */
1309
+
1310
+ appendComposeNodes(nodes: Array<string>): number;
1311
+ /** {zh}
1312
+ * @detail api
1313
+ * @brief 调用本方法,可移除调用 [setComposeNodes](#VeLiveVideoEffectManager-setcomposenodes) 和 [appendComposeNodes](#VeLiveVideoEffectManager-appendcomposenodes) 设置的视频特效资源。
1314
+ * @notes 需要在调用 [setEnable](#VeLiveVideoEffectManager-setenable) 创建特效引擎后,调用本方法。
1315
+ * @order 94
1316
+ * @param nodes 视频特效素材包路径数组
1317
+ * @return <br>
1318
+ * - 0:调用成功;
1319
+ * - -1:调用失败。
1320
+ *
1321
+ */
1322
+
1323
+ removeComposeNodes(nodes: Array<string>): number;
1324
+ /** {zh}
1325
+ * @detail api
1326
+ * @brief 设置视频特效强度。
1327
+ * @notes <br>
1328
+ * - 需要在调用 [setComposeNodes](#VeLiveVideoEffectManager-setcomposenodes) 设置视频特效组合或调用 [appendComposeNodes](#VeLiveVideoEffectManager-appendcomposenodes) 叠加视频特效素材包后,调用本方法;
1329
+ * - 该方法仅适用于同时含有上述三个参数的特效资源,对于没有强度参数的特效(如贴纸),该方法无效。
1330
+ * @order 95
1331
+ * @param node 视频特效素材包路径
1332
+ * @param key 需要设置的素材 key 名称
1333
+ * @param intensity 需要设置的强度值。取值范围为 [0.0,1.0]
1334
+ * @return <br>
1335
+ * - 0:调用成功;
1336
+ * - -1:调用失败。
1337
+ *
1338
+ */
1339
+
1340
+ updateComposerNodeIntensity(node: string, key: string, intensity: number): number;
1341
+ /** {zh}
1342
+ * @detail api
1343
+ * @brief 设置颜色滤镜。
1344
+ * @notes <br>请在调用 [setEnable](#VeLiveVideoEffectManager-setenable) 开启视频特效后,调用该方法。
1345
+ * @order 96
1346
+ * @param path 滤镜资源包绝对路径
1347
+ * @return <br>
1348
+ * - 0:调用成功;
1349
+ * - -1:调用失败。
1350
+ *
1351
+ */
1352
+
1353
+ setFilter(path: string): number;
1354
+ /** {zh}
1355
+ * @detail api
1356
+ * @brief 设置已启用的颜色滤镜强度。
1357
+ * @notes <br>请在调用 [setFilter](#VeLiveVideoEffectManager-setfilter) 设置颜色滤镜后调用。
1358
+ * @order 97
1359
+ * @param intensity 滤镜强度,取值范围为 [0.0,1.0]。
1360
+ * @return - 0:调用成功;
1361
+ * - -1:调用失败。
1362
+ *
1363
+ */
1364
+
1365
+ updateFilterIntensity(intensity: number): number;
1366
+ /** {zh}
1367
+ * @detail api
1368
+ * @brief 设置贴纸特效。
1369
+ * @notes <br>请在调用 [setEnable](#VeLiveVideoEffectManager-setenable) 开启视频特效后,调用该方法。
1370
+ * @order 98
1371
+ * @param path 贴纸素材包的绝对路径
1372
+ * @return <br>
1373
+ * - 0:调用成功;
1374
+ * - -1:调用失败。
1375
+ *
1376
+ */
1377
+
1378
+ setSticker(path: string): number;
1379
+ /** {zh}
1380
+ * @detail api
1381
+ * @brief 智能美化特效的高级功能。
1382
+ * @notes 请在调用 [setEnable](#VeLiveVideoEffectManager-setenable) 开启视频特效后,调用该方法,不要在主线程中频繁执行同步操作。
1383
+ * @order 99
1384
+ * @param callback 将 handle 作为参数的回调函数。
1385
+ * @param isGLThread 是否在 GL 线程回调 callback。
1386
+ * @param isAsync 是否同步执行 callback。
1387
+ *
1388
+ */
1389
+
1390
+ setAdvancedFeature(callback: (handle: void) => void, isGLThread: boolean, isAsync: boolean): number;
1391
+ /** {zh}
1392
+ * @platform ios
1393
+ * @detail api
1394
+ * @brief 设置特效算法模型包的路径。
1395
+ * @notes <br>
1396
+ * 需要通过调用 setupWithConfig:{@link #VeLiveVideoEffectManager#setupWithConfig} 设置视频特效许可证后调用。
1397
+ * @order 4
1398
+ * @param path 特效算法模型包的路径。
1399
+ * @return <br>
1400
+ * - 0:调用成功;
1401
+ * - -1:调用失败。
1402
+ */
1403
+
1404
+ ios_setAlgoModelPath(path: string): number;
1405
+ }
1406
+ /** {zh}
1407
+ * @detail api
1408
+ * @brief 音频设备管理类。该类提供了用于管理和控制音频设备,包括设置音量、获取当前音量的方法。
1409
+ */
1410
+ export declare class VeLiveAudioDevice {
1411
+ protected _instance: any;
1412
+ protected __init(...args: any[]): void;
1413
+ protected __new_instance(...args: any[]): any;
1414
+ /** {zh}
1415
+ * @detail api
1416
+ * @brief 设置音量响度。
1417
+ * @order 74
1418
+ * @param level 音量响度等级,取值范围为 [0.0,4.0]。
1419
+ *
1420
+ */
1421
+
1422
+ setVoiceLoudness(level: number): void;
1423
+ /** {zh}
1424
+ * @detail api
1425
+ * @brief 获取当前音量响度。
1426
+ * @order 75
1427
+ * @return <br>
1428
+ * 当前音量响度等级。
1429
+ *
1430
+ */
1431
+
1432
+ getVoiceLoudness(): number;
1433
+ /** {zh}
1434
+ * @platform ios
1435
+ * @detail api
1436
+ * @brief 查询是否支持硬件耳返。
1437
+ * @return <br>
1438
+ * - YES:支持;
1439
+ * - NO:不支持。
1440
+ * @order 62
1441
+ */
1442
+
1443
+ ios_isSupportHardwareEcho(): boolean;
1444
+ /** {zh}
1445
+ * @platform ios
1446
+ * @detail api
1447
+ * @brief 是否开启耳返功能。
1448
+ * @param enable 耳返功能开关。默认值为 NO。<br>
1449
+ * - YES:开启;
1450
+ * - NO:关闭。
1451
+ * @notes
1452
+ * 需要在调用 [startAudioCapture:](#VeLivePusher-startaudiocapture) 启动音频采集后,调用本方法。
1453
+ * @order 64
1454
+ */
1455
+
1456
+ ios_enableEcho(enable: boolean): void;
1457
+ /** {zh}
1458
+ * @platform ios
1459
+ * @detail api
1460
+ * @brief 获取当前耳返开启状态。
1461
+ * @notes
1462
+ * 需要在调用 [startAudioCapture:](#VeLivePusher-startaudiocapture) 启动音频采集后,调用本方法。
1463
+ * @order 65
1464
+ * @return <br>
1465
+ * - YES:开启;
1466
+ * - NO:关闭。
1467
+ */
1468
+
1469
+ ios_isEnableEcho(): boolean;
1470
+ }