@volcengine/react-native-live-push 1.1.3-rc.0 → 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,1068 @@
1
+ import { int, float, String, EGLContext, View, Bitmap, long } from './types';
2
+ import { VeLiveVideoEffectLicenseConfiguration, VeLivePusherLogLevel, VeLivePusherRenderMode, VeLiveVideoMirrorType, VeLiveVideoCaptureType, VeLiveAudioCaptureType, VeLiveVideoEncoderConfiguration, VeLiveAudioEncoderConfiguration, VeLiveFileRecorderConfiguration, VeLiveVideoFrame, VeLiveAudioFrame, VeLiveOrientation } from './keytype';
3
+ import { VeLiveVideoEffectCallback, VeLiveVideoEffectHandleCallback, VeLivePusherObserver, VeLivePusherStatisticsObserver, VeLiveFileRecordingListener, VeLiveVideoFrameFilter, VeLiveAudioFrameFilter, VeLiveVideoFrameListener, VeLiveAudioFrameListener, VeLiveSnapshotListener, VeLiveMediaPlayerListener, VeLiveMediaPlayerFrameListener } from './callback';
4
+ export declare class VeLiveCameraDevice {
5
+ /** {zh}
6
+ * @detail api
7
+ * @brief 获取相机支持帧率范围。
8
+ * @notes <br>需要在调用 [startVideoCapture](#VeLivePusher-startvideocapture) 启动相机采集后,调用本方法。
9
+ * @order 3
10
+ * @return <br>
11
+ * 相机支持帧率范围。
12
+ *
13
+ */
14
+
15
+ getRealFpsRange(): Array<int>;
16
+ /** {zh}
17
+ * @detail api
18
+ * @brief 开启/关闭闪光灯。
19
+ * @notes <br>需要在调用 [startVideoCapture](#VeLivePusher-startvideocapture) 启动相机采集后,调用本方法。
20
+ * @order 8
21
+ * @param enable 是否开启闪光灯。默认为 false。 <br>
22
+ * - true:开启;
23
+ * - false:关闭。
24
+ * @return <br>
25
+ * - 0:开启/关闭成功;
26
+ * - ≠0:开启/关闭失败。
27
+ *
28
+ */
29
+
30
+ enableTorch(enable: boolean): int;
31
+ /** {zh}
32
+ * @detail api
33
+ * @brief 设置摄像头的缩放倍数。
34
+ * @notes <br>需要在调用 [startVideoCapture](#VeLivePusher-startvideocapture) 启动相机采集后,调用本方法。
35
+ * @order 5
36
+ * @param ratio 缩放倍数。默认为原尺寸。缩放倍数的取值范围为 [[getMinZoomRatio](#VeLiveCameraDevice-getminzoomratio),[getMaxZoomRatio](#VeLiveCameraDevice-getmaxzoomratio)]。
37
+ * @return <br>
38
+ * - 0:缩放成功;
39
+ * - ≠0:缩放失败。
40
+ *
41
+ */
42
+
43
+ setZoomRatio(ratio: float): int;
44
+ /** {zh}
45
+ * @detail api
46
+ * @brief 获取摄像头当前的缩放倍数。
47
+ * @notes <br>需要在调用 [startVideoCapture](#VeLivePusher-startvideocapture) 启动相机采集后,调用本方法。
48
+ * @order 4
49
+ * @return <br>
50
+ * - ≤0:表示不支持缩放;
51
+ * - >0:支持缩放,数值表示当前缩放倍数。
52
+ *
53
+ */
54
+
55
+ getCurrentZoomRatio(): float;
56
+ /** {zh}
57
+ * @detail api
58
+ * @brief 获取摄像头的最大缩放倍数。
59
+ * @notes <br>需要在调用 [startVideoCapture](#VeLivePusher-startvideocapture) 启动相机采集后,调用本方法。
60
+ * @order 6
61
+ * @return <br>
62
+ * - ≤0:表示不支持缩放;
63
+ * - >0:支持缩放,数值表示最大缩放倍数。
64
+ *
65
+ */
66
+
67
+ getMaxZoomRatio(): float;
68
+ /** {zh}
69
+ * @detail api
70
+ * @brief 获取摄像头的最小缩放倍数。
71
+ * @notes <br>需要在调用 [startVideoCapture](#VeLivePusher-startvideocapture) 启动相机采集后,调用本方法。
72
+ * @order 7
73
+ * @return <br>
74
+ * - ≤0:表示不支持缩放;
75
+ * - >0:支持缩放,数值表示最小缩放倍数。
76
+ *
77
+ */
78
+
79
+ getMinZoomRatio(): float;
80
+ /** {zh}
81
+ * @detail api
82
+ * @brief 是否支持自动对焦。
83
+ * @notes <br>需要在调用 [startVideoCapture](#VeLivePusher-startvideocapture) 启动相机采集后,调用本方法。
84
+ * @order 9
85
+ * @return <br>
86
+ * - true:支持;
87
+ * - false:不支持。
88
+ *
89
+ */
90
+
91
+ isAutoFocusEnabled(): boolean;
92
+ /** {zh}
93
+ * @detail api
94
+ * @brief 开启/关闭自动对焦功能。
95
+ * @notes <br>需要在调用 [startVideoCapture](#VeLivePusher-startvideocapture) 启动相机采集后,调用本方法。
96
+ * @order 10
97
+ * @param enable 是否开启自动对焦,默认为 true。
98
+ * - true:开启;
99
+ * - false:关闭。
100
+ * @return <br>
101
+ * - 0:开启/关闭成功;
102
+ * - ≠0:开启/关闭失败。
103
+ *
104
+ */
105
+
106
+ enableAutoFocus(enable: boolean): int;
107
+ /** {zh}
108
+ * @detail api
109
+ * @brief 设置摄像头的对焦位置。
110
+ * @notes 需要在调用 [startVideoCapture](#VeLivePusher-startvideocapture) 启动相机采集后,调用本方法。
111
+ * @order 11
112
+ * @param viewW 当前视图宽度。
113
+ * @param viewH 当前视图高度。
114
+ * @param x 以左上角为原点,对焦点距当前视图的横向坐标值。
115
+ * @param y 以左上角为原点,对焦点距当前视图的纵向坐标值。
116
+ * @return <br>
117
+ * - 0:设置成功;
118
+ * - ≠0:设置失败。
119
+ *
120
+ */
121
+
122
+ setFocusPosition(viewW: int, viewH: int, x: int, y: int): int;
123
+ /** {zh}
124
+ * @detail api
125
+ * @brief 检查当前使用的摄像头是否支持手动设置曝光点。
126
+ * @notes 必须已调用 [startVideoCapture](#VeLivePusher-startvideocapture) 使用 SDK 内部采集模块进行视频采集时,才能检查曝光点设置能力。
127
+ * @order 12
128
+ * @return - YES:支持;
129
+ * - NO:不支持。
130
+ *
131
+ */
132
+
133
+ isExposurePositionSupported(): boolean;
134
+ /** {zh}
135
+ * @detail api
136
+ * @brief 设置当前使用的摄像头的曝光点。
137
+ * @notes - 必须已调用 [startVideoCapture](#VeLivePusher-startvideocapture) 使用 SDK 内部采集模块进行视频采集,并且使用 SDK 内部渲染时,才能设置曝光点;
138
+ * - 调用 [stopVideoCapture](#VeLivePusher-stopvideocapture) 关闭内部采集后,设置的曝光点失效。
139
+ * @order 13
140
+ * @param viewW 当前视图宽度。
141
+ * @param viewH 当前视图高度。
142
+ * @param x 以左上角为原点,对焦点距当前视图的横向坐标值。
143
+ * @param y 以左上角为原点,对焦点距当前视图的纵向坐标值。
144
+ * @return - =0:成功;
145
+ * - ≠0:失败。
146
+ *
147
+ */
148
+
149
+ setExposurePosition(viewW: int, viewH: int, x: int, y: int): int;
150
+ /** {zh}
151
+ * @detail api
152
+ * @brief 获取摄像头的最小曝光补偿值。
153
+ * @notes 需要在调用 [startVideoCapture](#VeLivePusher-startvideocapture) 启动相机采集后,调用本方法。
154
+ * @order 14
155
+ * @return - ≤0:表示不支持曝光补偿;
156
+ * - >0:支持曝光补偿,数值表示最小曝光补偿。
157
+ *
158
+ */
159
+
160
+ getMinExposureCompensation(): float;
161
+ /** {zh}
162
+ * @detail api
163
+ * @brief 获取摄像头的最大曝光补偿值。
164
+ * @notes 需要在调用 [startVideoCapture](#VeLivePusher-startvideocapture) 启动相机采集后,调用本方法。
165
+ * @order 15
166
+ * @return - ≤0:表示不支持曝光补偿;
167
+ * - >0:支持曝光补偿,数值表示最大曝光补偿。
168
+ *
169
+ */
170
+
171
+ getMaxExposureCompensation(): float;
172
+ /** {zh}
173
+ * @detail api
174
+ * @brief 设置当前使用的摄像头的曝光补偿。
175
+ * @notes - 必须已调用 [startVideoCapture](#VeLivePusher-startvideocapture) 使用 SDK 内部采集模块进行视频采集时,才能设置曝光补偿。
176
+ * - 调用 [stopVideoCapture](#VeLivePusher-stopvideocapture) 关闭内部采集后,设置的曝光补偿失效。
177
+ * @order 16
178
+ * @param value 曝光补偿值,取值范围 [[getMinExposureCompensation](#VeLiveCameraDevice-getminexposurecompensation),[getMaxExposureCompensation](#VeLiveCameraDevice-getmaxexposurecompensation)],0 为系统默认值,表示没有曝光补偿。
179
+ * @return - =0:设置成功;
180
+ * - ≠0:设置失败。
181
+ *
182
+ */
183
+
184
+ setExposureCompensation(value: float): int;
185
+ }
186
+ export declare class VeLiveVideoEffectManager {
187
+ /** {zh}
188
+ * @detail api
189
+ * @brief 视频特效许可证配置,用于初始化视频特效管理对象。
190
+ * @order 89
191
+ * @param config 特效初始化配置,详情请参见 [VeLiveVideoEffectLicenseConfiguration](147521#VeLivePusherDef-VeLiveVideoEffectLicenseConfiguration)。
192
+ * @return <br>
193
+ * - 0:调用成功;
194
+ * - -1:调用失败。
195
+ *
196
+ */
197
+
198
+ setupWithConfig(config: VeLiveVideoEffectLicenseConfiguration): int;
199
+ /** {zh}
200
+ * @detail api
201
+ * @brief 如果您使用在线 License 认证方式,在许可证过期后,可调用该方法更新 License;
202
+ * @notes - 需要通过调用 [setupWithConfig](#VeLiveVideoEffectManager-setupwithconfig) 设置视频特效许可证后调用;
203
+ * - 本方法为异步操作。
204
+ * @order 90
205
+ * @param callback 结果回调信息
206
+ *
207
+ */
208
+
209
+ updateLicense(callback: VeLiveVideoEffectCallback): void;
210
+ /** {zh}
211
+ * @detail api
212
+ * @brief 创建/销毁特效引擎。
213
+ * @notes - 该方法需要在调用 [setupWithConfig](#VeLiveVideoEffectManager-setupwithconfig) 和 [setAlgorithmModelPath](#VeLiveVideoEffectManager-setalgorithmmodelpath) 后调用;
214
+ * - 该方法不直接开启/关闭视频特效,您需要在调用该方法后,调用 [setComposeNodes](#VeLiveVideoEffectManager-setcomposenodes) 开启视频特效;
215
+ * - 通用场景下,特效引擎会随 EffectManager 销毁而销毁。如果您对性能有较高要求,也可以在不使用特效相关功能时,调用该方法销毁特效引擎;
216
+ * - 如果重复创建/销毁特效引擎,会产生时间消耗。
217
+ * @order 92
218
+ * @param enable 是否创建特效引擎。默认为 false。 <br>
219
+ * - true:创建;
220
+ * - false:销毁。
221
+ * @param callback 视频特效回调 [VeLiveVideoEffectCallback](147519#VeLivePusherDef-VeLiveVideoEffectCallback)。
222
+ * @return - 0:成功;
223
+ * - -1:失败。
224
+ *
225
+ */
226
+
227
+ setEnable(enable: boolean, callback: VeLiveVideoEffectCallback): void;
228
+ /** {zh}
229
+ * @detail api
230
+ * @brief 设置特效算法模型包的路径。
231
+ * @notes <br>需要通过调用 [setupWithConfig](#VeLiveVideoEffectManager-setupwithconfig) 设置视频特效许可证后调用。
232
+ * @order 91
233
+ * @param path 特效算法模型包的路径
234
+ * @return <br>
235
+ * - 0:调用成功;
236
+ * - -1:调用失败。
237
+ *
238
+ */
239
+
240
+ setAlgorithmModelPath(path: String): int;
241
+ /** {zh}
242
+ * @detail api
243
+ * @brief 设置视频特效组合。支持设置 ComposeMakeup.bundle 中的功能,包括美颜、美形、美体、美妆等。
244
+ * @notes <br>
245
+ * - 需要在调用 [setEnable](#VeLiveVideoEffectManager-setenable) 创建特效引擎后,调用本方法;
246
+ * - 重复调用本方法,仅最后一次调用生效;
247
+ * - 如果需要在当前的视频特效组合中叠加特效,可调用 [appendComposeNodes](#VeLiveVideoEffectManager-appendcomposenodes) 方法。
248
+ * @order 93
249
+ * @param nodes 视频特效素材包路径数组
250
+ * @return <br>
251
+ * - 0:调用成功;
252
+ * - -1:调用失败。
253
+ *
254
+ */
255
+
256
+ setComposeNodes(nodes: Array<String>): int;
257
+ /** {zh}
258
+ * @detail api
259
+ * @brief 在已有的视频特效组合上,叠加视频特效素材包,您可以调用 [setComposeNodes](#VeLiveVideoEffectManager-setcomposenodes) 设置视频特效组合。
260
+ * @notes 需要在调用 [setEnable](#VeLiveVideoEffectManager-setenable) 创建特效引擎后,调用本方法。
261
+ * @order 94
262
+ * @param nodes 视频特效素材包路径数组
263
+ * @return <br>
264
+ * - 0:调用成功;
265
+ * - -1:调用失败。
266
+ *
267
+ */
268
+
269
+ appendComposeNodes(nodes: Array<String>): int;
270
+ /** {zh}
271
+ * @detail api
272
+ * @brief 调用本方法,可移除调用 [setComposeNodes](#VeLiveVideoEffectManager-setcomposenodes) 和 [appendComposeNodes](#VeLiveVideoEffectManager-appendcomposenodes) 设置的视频特效资源。
273
+ * @notes 需要在调用 [setEnable](#VeLiveVideoEffectManager-setenable) 创建特效引擎后,调用本方法。
274
+ * @order 94
275
+ * @param nodes 视频特效素材包路径数组
276
+ * @return <br>
277
+ * - 0:调用成功;
278
+ * - -1:调用失败。
279
+ *
280
+ */
281
+
282
+ removeComposeNodes(nodes: Array<String>): int;
283
+ /** {zh}
284
+ * @detail api
285
+ * @brief 设置视频特效强度。
286
+ * @notes <br>
287
+ * - 需要在调用 [setComposeNodes](#VeLiveVideoEffectManager-setcomposenodes) 设置视频特效组合或调用 [appendComposeNodes](#VeLiveVideoEffectManager-appendcomposenodes) 叠加视频特效素材包后,调用本方法;
288
+ * - 该方法仅适用于同时含有上述三个参数的特效资源,对于没有强度参数的特效(如贴纸),该方法无效。
289
+ * @order 95
290
+ * @param node 视频特效素材包路径
291
+ * @param key 需要设置的素材 key 名称
292
+ * @param intensity 需要设置的强度值。取值范围为 [0.0,1.0]
293
+ * @return <br>
294
+ * - 0:调用成功;
295
+ * - -1:调用失败。
296
+ *
297
+ */
298
+
299
+ updateComposerNodeIntensity(node: String, key: String, intensity: float): int;
300
+ /** {zh}
301
+ * @detail api
302
+ * @brief 设置颜色滤镜。
303
+ * @notes <br>请在调用 [setEnable](#VeLiveVideoEffectManager-setenable) 开启视频特效后,调用该方法。
304
+ * @order 96
305
+ * @param path 滤镜资源包绝对路径
306
+ * @return <br>
307
+ * - 0:调用成功;
308
+ * - -1:调用失败。
309
+ *
310
+ */
311
+
312
+ setFilter(path: String): int;
313
+ /** {zh}
314
+ * @detail api
315
+ * @brief 设置已启用的颜色滤镜强度。
316
+ * @notes <br>请在调用 [setFilter](#VeLiveVideoEffectManager-setfilter) 设置颜色滤镜后调用。
317
+ * @order 97
318
+ * @param intensity 滤镜强度,取值范围为 [0.0,1.0]。
319
+ * @return - 0:调用成功;
320
+ * - -1:调用失败。
321
+ *
322
+ */
323
+
324
+ updateFilterIntensity(intensity: float): int;
325
+ /** {zh}
326
+ * @detail api
327
+ * @brief 设置贴纸特效。
328
+ * @notes <br>请在调用 [setEnable](#VeLiveVideoEffectManager-setenable) 开启视频特效后,调用该方法。
329
+ * @order 98
330
+ * @param path 贴纸素材包的绝对路径
331
+ * @return <br>
332
+ * - 0:调用成功;
333
+ * - -1:调用失败。
334
+ *
335
+ */
336
+
337
+ setSticker(path: String): int;
338
+ /** {zh}
339
+ * @detail api
340
+ * @brief 智能美化特效的高级功能。
341
+ * @notes 请在调用 [setEnable](#VeLiveVideoEffectManager-setenable) 开启视频特效后,调用该方法,不要在主线程中频繁执行同步操作。
342
+ * @order 99
343
+ * @param callback 将 handle 作为参数的回调函数。
344
+ * @param isGLThread 是否在 GL 线程回调 callback。
345
+ * @param isAsync 是否同步执行 callback。
346
+ *
347
+ */
348
+
349
+ setAdvancedFeature(callback: VeLiveVideoEffectHandleCallback, isGLThread: boolean, isAsync: boolean): int;
350
+ }
351
+ export declare class VeLivePusher {
352
+ /** {zh}
353
+ * @detail api
354
+ * @hidden
355
+ * @brief 获取当前 SDK 版本号。
356
+ * @return <br>
357
+ * 当前 SDK 版本号。
358
+ *
359
+ */
360
+
361
+ static getVersion(): String;
362
+ /** {zh}
363
+ * @detail api
364
+ * @brief 设置输出到控制台的日志等级。
365
+ * @order 49
366
+ * @param logLevel 输出的日志级别。级别详情请参见 [VeLivePusherLogLevel](147521#VeLivePusherLogLevel)。
367
+ *
368
+ */
369
+
370
+ static setLogLevel(logLevel: VeLivePusherLogLevel): void;
371
+ /** {zh}
372
+ * @detail api
373
+ * @brief 设置 OpenGL 的上下文。
374
+ * @order 50
375
+ * @param context OpenGL 上下文。
376
+ *
377
+ */
378
+
379
+ static setEGLContext(context: EGLContext): void;
380
+ /** {zh}
381
+ * @detail api
382
+ * @brief 停止采集和推流,并销毁推流器。通常在调用 [stopPush](#VeLivePusher-stoppush) 结束推流后调用此方法进行清理。
383
+ * @order 4
384
+ *
385
+ */
386
+
387
+ release(): void;
388
+ /** {zh}
389
+ * @detail api
390
+ * @brief 设置推流器回调,通过设置回调,监听推流器的推流错误、状态、网络质量、设备、首帧等回调事件。
391
+ * @notes <br>
392
+ * - 需要在创建推流引擎后,调用本方法;
393
+ * - 重复调用本方法,仅最后一次调用生效。
394
+ * @order 2
395
+ * @param observer 推流器回调对象,详细信息请参见 [VeLivePusherObserver](147519#VeLivePusherObserver)。
396
+ *
397
+ */
398
+
399
+ setObserver(observer: VeLivePusherObserver): void;
400
+ /** {zh}
401
+ * @detail api
402
+ * @brief 设置推流器周期性回调,用于定期获取推流状态信息。
403
+ * @notes <br>
404
+ * - 需要在创建推流引擎后,调用本方法;
405
+ * - 重复调用本方法,仅最后一次调用生效。
406
+ * @order 3
407
+ * @param observer 推流器周期性回调对象,详细信息请参见 [VeLivePusherStatisticsObserver](147519#VeLivePusherDef-VeLivePusherStatisticsObserver)。
408
+ * @param interval 周期性回调的时间间隔,单位为 s,默认值为 5。
409
+ *
410
+ */
411
+
412
+ setStatisticsObserver(observer: VeLivePusherStatisticsObserver, interval: int): void;
413
+ /** {zh}
414
+ * @detail api
415
+ * @brief 设置本地摄像头预览视图。摄像头采集到的画面,经过美颜、脸形调整、滤镜等多种效果叠加之后,最终会显示到传入的 View 上。
416
+ * @param view 摄像头预览视图
417
+ * @order 5
418
+ *
419
+ */
420
+
421
+ setRenderView(view: View): Promise<void>;
422
+ /** {zh}
423
+ * @detail api
424
+ * @brief 设置本地预览画面的填充模式。
425
+ * @param mode 填充模式。
426
+ * @order 6
427
+ *
428
+ */
429
+
430
+ setRenderFillMode(mode: VeLivePusherRenderMode): void;
431
+ /** {zh}
432
+ * @detail api
433
+ * @brief 开启/关闭镜像。
434
+ * @notes <br>
435
+ * 用于配置视频镜像效果,影响采集、预览和推流画面。
436
+ * @order 7
437
+ * @param type 镜像类型,详细信息请参见 [VeLiveVideoMirrorType](147521#VeLiveVideoMirrorType)。
438
+ * @param mirror 是否开启镜像。<br>
439
+ * - true:开启;
440
+ * - false:关闭。
441
+ *
442
+ */
443
+
444
+ setVideoMirror(type: VeLiveVideoMirrorType, mirror: boolean): void;
445
+ /** {zh}
446
+ * @detail api
447
+ * @brief 开始视频采集。
448
+ * @notes <br>调用该接口后,可以通过调用接口 [stopVideoCapture](#VeLivePusher-stopvideocapture) 停止视频采集。
449
+ * @order 8
450
+ * @param type 视频采集类型,详细信息请参见 VeLiveVideoCaptureType{@link #VeLiveVideoCaptureType}
451
+ *
452
+ */
453
+
454
+ startVideoCapture(type: VeLiveVideoCaptureType): void;
455
+ /** {zh}
456
+ * @detail api
457
+ * @brief 停止视频采集。
458
+ * @notes <br>调用该接口后,可以通过调用接口 [startVideoCapture](#VeLivePusher-startvideocapture) 开始视频采集。
459
+ * @order 10
460
+ *
461
+ */
462
+
463
+ stopVideoCapture(): void;
464
+ /** {zh}
465
+ * @detail api
466
+ * @brief 开始音频采集。
467
+ * @notes <br>调用该接口后,可以通过调用接口 [stopAudioCapture](#VeLivePusher-stopaudiocapture) 停止音频采集。
468
+ * @order 9
469
+ * @param type 音频采集类型,详细信息请参见 [VeLiveAudioCaptureType](147521#VeLiveAudioCaptureType)。
470
+ *
471
+ */
472
+
473
+ startAudioCapture(type: VeLiveAudioCaptureType): void;
474
+ /** {zh}
475
+ * @detail api
476
+ * @brief 停止音频采集。
477
+ * @notes <br>调用该接口后,可以通过调用接口 [startAudioCapture](#VeLivePusher-startaudiocapture) 开始音频采集。
478
+ * @order 11
479
+ *
480
+ */
481
+
482
+ stopAudioCapture(): void;
483
+ /** {zh}
484
+ * @detail api
485
+ * @brief 切换视频采集类型。
486
+ * @notes <br>该接口必须在调用接口 [startVideoCapture](#VeLivePusher-startvideocapture) 后调用才能生效。
487
+ * @order 12
488
+ * @param type 视频采集类型,详细信息请参见 [VeLiveVideoCaptureType](147521#VeLiveVideoCaptureType)。
489
+ *
490
+ */
491
+
492
+ switchVideoCapture(type: VeLiveVideoCaptureType): void;
493
+ /** {zh}
494
+ * @detail api
495
+ * @brief 切换音频采集类型。
496
+ * @notes <br>该接口必须在调用接口 [startVideoCapture](#VeLivePusher-startvideocapture) 后调用才能生效。
497
+ * @order 13
498
+ * @param type 音频采集类型,详细信息请参见 [VeLiveAudioCaptureType](147521#VeLiveAudioCaptureType)。
499
+ *
500
+ */
501
+
502
+ switchAudioCapture(type: VeLiveAudioCaptureType): void;
503
+ /** {zh}
504
+ * @detail api
505
+ * @brief 获取当前视频采集类型。
506
+ * @order 14
507
+ * @return 视频采集类型,详细信息请参见 [VeLiveVideoCaptureType](147521#VeLiveVideoCaptureType)。
508
+ *
509
+ */
510
+
511
+ getCurrentVideoCaptureType(): VeLiveVideoCaptureType;
512
+ /** {zh}
513
+ * @detail api
514
+ * @brief 获取当前音频采集类型。
515
+ * @order 15
516
+ * @return <br>音频采集类型,详细信息请参见 [VeLiveAudioCaptureType](147521#VeLiveAudioCaptureType)。
517
+ *
518
+ */
519
+
520
+ getCurrentAudioCaptureType(): VeLiveAudioCaptureType;
521
+ /** {zh}
522
+ * @detail api
523
+ * @brief 自定义静态图,适用于静态图推流采集类型。使用该接口时,需要将视频采集类型设置为 VeLiveVideoCaptureCustomImage,您可调用 [startVideoCapture](#VeLivePusher-startvideocapture) 方法,将 [VeLiveVideoCaptureType](147521#VeLiveVideoCaptureType) 设置为 VeLiveVideoCaptureCustomImage。
524
+ * @order 16
525
+ * @param image 静态图片,用于在静态图推流采集类型下设置静态图。
526
+ *
527
+ */
528
+
529
+ updateCustomImage(image: Bitmap): Promise<void>;
530
+ /** {zh}
531
+ * @detail api
532
+ * @brief 获取相机设备管理对象 `VeLiveCameraDevice`。通过设备管理,您可以使用以下功能。
533
+ * - 控制闪光灯开关
534
+ * - 设置摄像头缩放比例
535
+ * - 设置自动对焦
536
+ * @notes <br>
537
+ * 该接口需要在 startVideoCapture{@link #startVideoCapture} 方法中设置 VeLiveVideoCaptureType{@link #VeLiveVideoCaptureType} 为 VeLiveVideoCaptureFrontCamera 或 VeLiveVideoCaptureBackCamera。
538
+ * @order 17
539
+ * @return 相机设备管理对象 [VeLiveCameraDevice](#VeLiveCameraDevice)。
540
+ *
541
+ */
542
+
543
+ getCameraDevice(): VeLiveCameraDevice;
544
+ /** {zh}
545
+ * @detail api
546
+ * @brief 设置推流视频编码参数。
547
+ * @notes 该接口可在推流开始前或开始后调用。
548
+ * @order 18
549
+ * @param config 推流视频参数,支持设置推流视频分辨率、编码格式、目标码率和视频 GOP 大小等信息。详情请参见 [VeLiveVideoEncoderConfiguration](147521#VeLivePusherDef-VeLiveVideoEncoderConfiguration)。
550
+ *
551
+ */
552
+
553
+ setVideoEncoderConfiguration(config: VeLiveVideoEncoderConfiguration): void;
554
+ /** {zh}
555
+ * @detail api
556
+ * @brief 获取推流视频编码参数。
557
+ * @order 19
558
+ * @return 推流视频参数,支持设置推流视频分辨率、编码格式、目标码率和视频 GOP 大小等信息。详情请参见 [VeLiveVideoEncoderConfiguration](147521#VeLivePusherDef-VeLiveVideoEncoderConfiguration)。
559
+ *
560
+ */
561
+
562
+ getVideoEncoderConfiguration(): VeLiveVideoEncoderConfiguration;
563
+ /** {zh}
564
+ * @detail api
565
+ * @brief 设置推流音频编码参数。
566
+ * @notes <br>该接口需要在 [startPush](#VeLivePusher-startpush) 或 [startPushWithUrls](#VeLivePusher-startpushwithurls) 方法之前调用。
567
+ * @order 20
568
+ * @param config 推流音频编码参数,详情请参见 [VeLiveAudioEncoderConfiguration](147521#VeLivePusherDef-VeLiveAudioEncoderConfiguration)。
569
+ *
570
+ */
571
+
572
+ setAudioEncoderConfiguration(config: VeLiveAudioEncoderConfiguration): void;
573
+ /** {zh}
574
+ * @detail api
575
+ * @brief 获取推流音频编码参数。
576
+ * @order 21
577
+ * @return 推流音频编码参数,详情请参见 [VeLiveAudioEncoderConfiguration](147521#VeLivePusherDef-VeLiveAudioEncoderConfiguration)。
578
+ *
579
+ */
580
+
581
+ getAudioEncoderConfiguration(): VeLiveAudioEncoderConfiguration;
582
+ /** {zh}
583
+ * @detail api
584
+ * @brief 开始推流。
585
+ * @order 22
586
+ * @param url 推流地址,用于将直播流推送到目标服务器。
587
+ *
588
+ */
589
+
590
+ startPush(url: String): void;
591
+ /** {zh}
592
+ * @detail api
593
+ * @brief 开始推流,支持备用推流地址。
594
+ * @notes <br>
595
+ * 当主推流地址不可用时,会自动切换到备用推流地址继续推流。
596
+ * @order 23
597
+ * @param urls 推流地址列表,包含一个或多个推流地址。
598
+ *
599
+ */
600
+
601
+ startPushWithUrls(urls: Array<String>): void;
602
+ /** {zh}
603
+ * @detail api
604
+ * @brief 停止推流。
605
+ * @notes <br>停止推流后,可以通过调用 [startPush](#VeLivePusher-startpush) 或 [startPushWithUrls](#VeLivePusher-startpushwithurls) 方法重新开始推流。
606
+ * @order 24
607
+ *
608
+ */
609
+
610
+ stopPush(): void;
611
+ /** {zh}
612
+ * @detail api
613
+ * @brief 当前是否正在推流中,可用来查询推流器的当前状态。
614
+ * @order 25
615
+ * @return <br>
616
+ * 是否正在推流。<br>
617
+ * - true:正在推流中;
618
+ * - false:已经停止推流。
619
+ *
620
+ */
621
+
622
+ isPushing(): boolean;
623
+ /** {zh}
624
+ * @detail api
625
+ * @brief 设置推流水印。
626
+ * @order 26
627
+ * @param image 水印图片。取值为 null 时,表示禁用水印。
628
+ * @param x 水印的水平偏移量,即水印图片相对视频流左上角的横向偏移与视频流宽度的比值,取值范围为 [0.0,1.0]。
629
+ * @param y 水印的垂直偏移量,即水印图片相对视频流左上角的纵向偏移与视频流高度的比值,取值范围为 [0.0,1.0]。
630
+ * @param scale 水印图片的缩放比例,取值范围为 [0.0,1.0]。
631
+ * @return <br>
632
+ * - 0:水印设置成功;
633
+ * - <0:水印设置失败。
634
+ *
635
+ */
636
+
637
+ setWatermark(image: Bitmap, x: float, y: float, scale: float): Promise<int>;
638
+ /** {zh}
639
+ * @detail api
640
+ * @brief 开始本地文件录制。
641
+ * @order 27
642
+ * @param path 录制文件保存路径,不能为空。
643
+ * @param config 文件录制设置,详情请参见 [VeLiveFileRecorderConfiguration](147521#VeLivePusherDef-VeLiveFileRecorderConfiguration)。
644
+ * @param listener 本地文件录制的监听,详情请参见 [VeLiveFileRecordingListener](147519#VeLivePusherDef-VeLiveFileRecordingListener)。
645
+ *
646
+ */
647
+
648
+ startFileRecording(path: String, config: VeLiveFileRecorderConfiguration, listener: VeLiveFileRecordingListener): void;
649
+ /** {zh}
650
+ * @detail api
651
+ * @brief 停止本地文件录制。
652
+ * @notes <br>该接口需要在 [startFileRecording](#VeLivePusher-startfilerecording) 方法之后调用。
653
+ * @order 28
654
+ *
655
+ */
656
+
657
+ stopFileRecording(): void;
658
+ /** {zh}
659
+ * @detail api
660
+ * @brief 高级配置。
661
+ * @order 29
662
+ * @param key 推流高级配置为 JSON 格式的字符串,此参数为 JSON 结构中的 Key。您可通过提交工单联系[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076),了解配置方法。
663
+ * @param value 推流高级配置为 JSON 格式的字符串,此参数为 JSON 结构中的 Value。您可通过提交工单联系[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076),了解配置方法。
664
+ * @return <br>
665
+ * - 0:成功;
666
+ * - -1:失败,参数错误。
667
+ *
668
+ */
669
+
670
+ setProperty(key: String, value: Object): int;
671
+ /** {zh}
672
+ * @detail api
673
+ * @brief 推送外部视频帧数据。
674
+ * @notes <br>
675
+ * 调用该接口时,需要将视频采集类型设置为 VeLiveVideoCaptureExternal,您可调用 startVideoCapture{@link #startVideoCapture} 方法,将 VeLiveVideoCaptureType{@link #VeLiveVideoCaptureType} 设置为 VeLiveVideoCaptureExternal。
676
+ * @order 30
677
+ * @param frame 视频帧的数据信息,详情请参见 [VeLiveVideoFrame](147521#VeLiveVideoFrame)。
678
+ * @return - 0:成功;
679
+ * - <0:失败。
680
+ *
681
+ */
682
+
683
+ pushExternalVideoFrame(frame: VeLiveVideoFrame): int;
684
+ /** {zh}
685
+ * @detail api
686
+ * @brief 推送外部音频帧数据。
687
+ * @notes 该接口需要在 startAudioCapture 方法中设置 [VeLiveAudioCaptureType](147521#VeLiveAudioCaptureType) 为 VeLiveAudioCaptureExternal。
688
+ * @order 31
689
+ * @param frame 外部音频数据。详情请参见 [VeLiveAudioFrame](147521#VeLiveAudioFrame)。
690
+ * @return <br>
691
+ * - 0:成功;
692
+ * - <0:失败。
693
+ *
694
+ */
695
+
696
+ pushExternalAudioFrame(frame: VeLiveAudioFrame): int;
697
+ /** {zh}
698
+ * @detail api
699
+ * @brief 设置推流视频帧朝向。默认为竖屏推流。
700
+ * @order 32
701
+ * @param orientation 视频帧朝向,详情请参见 [VeLiveOrientation](147521#VeLiveOrientation)。
702
+ *
703
+ */
704
+
705
+ setOrientation(orientation: VeLiveOrientation): void;
706
+ /** {zh}
707
+ * @detail api
708
+ * @brief 通过视频帧发送 SEI 消息。
709
+ * @notes <br>该接口需要在调用 [startPush](#VeLivePusher-startpush) 或 [startPushWithUrls](#VeLivePusher-startpushwithurls) 方法之后调用。
710
+ * @order 33
711
+ * @param key SEI 消息为 JSON 格式的字符串。此参数为 JSON 结构中的 Key。
712
+ * @param value SEI 消息为 JSON 格式的字符串。此参数为 JSON 结构中的 Value。
713
+ * @param repeat 消息发送重复的次数。例如,`repeat` 取值为 20,`isKeyFrame` 取值为 YES,则会在视频帧开始的连续 20 个关键帧中添加 SEI 消息。
714
+ * @param isKeyFrame 是否仅在关键帧中包含 SEI 消息。<br>
715
+ * - true:仅在关键帧中包含;
716
+ * - false:所有帧中均包含。
717
+ * @param allowsCovered 是否允许覆盖。<br>
718
+ * - true:允许;
719
+ * - false:不允许。
720
+ * @return <br>
721
+ * - 0:成功;
722
+ * - <0:失败。
723
+ *
724
+ */
725
+
726
+ sendSeiMessage(key: String, value: Object, repeat: int, isKeyFrame: boolean, allowsCovered: boolean): int;
727
+ /** {zh}
728
+ * @detail api
729
+ * @brief 设置静音。
730
+ * @param mute 是否设置为静音。默认为正常推流。<br>
731
+ * - true:静音推流;
732
+ * - false:正常推流。
733
+ * @order 34
734
+ *
735
+ */
736
+
737
+ setMute(mute: boolean): void;
738
+ /** {zh}
739
+ * @detail api
740
+ * @brief 当前是否是静音状态。
741
+ * @order 35
742
+ * @return <br>
743
+ * - true:当前是静音状态;
744
+ * - false:当前非静音状态。
745
+ *
746
+ */
747
+
748
+ isMute(): boolean;
749
+ /** {zh}
750
+ * @detail api
751
+ * @brief 获取视频特效管理对象 `VeLiveVideoEffectManager`。通过视频特效管理,您可以使用以下功能。
752
+ * - 设置美颜
753
+ * - 设置特效
754
+ * - 设置素材
755
+ * - 设置贴图
756
+ * - 设置滤镜
757
+ * @notes 该接口需要集成智能美化特效 SDK 后才能使用。
758
+ * @order 36
759
+ * @return 视频特效管理对象 [VeLiveVideoEffectManager](#VeLiveVideoEffectManager)。
760
+ *
761
+ */
762
+
763
+ getVideoEffectManager(): VeLiveVideoEffectManager;
764
+ /** {zh}
765
+ * @detail api
766
+ * @brief 自定义视频处理。
767
+ * @order 37
768
+ * @param filter 视频数据处理回调,详情请参见 [VeLiveVideoFrameFilter](147519#VeLivePusherDef-VeLiveVideoFrameFilter)。
769
+ *
770
+ */
771
+
772
+ setVideoFrameFilter(filter: VeLiveVideoFrameFilter): void;
773
+ /** {zh}
774
+ * @detail api
775
+ * @brief 获取音频模块管理对象。
776
+ * @notes <br>
777
+ * 该接口需要在 startAudioCapture{@link #startAudioCapture} 方法中设置 VeLiveAudioCaptureType{@link #VeLiveAudioCaptureType} 为 VeLiveAudioCaptureMicrophone。
778
+ * @order 38
779
+ * @return 音频模块管理对象 [VeLiveAudioDevice](#VeLiveAudioDevice)。
780
+ *
781
+ */
782
+
783
+ getAudioDevice(): VeLiveAudioDevice;
784
+ /** {zh}
785
+ * @detail api
786
+ * @brief 自定义音频处理。
787
+ * @order 39
788
+ * @param filter 音频帧滤镜对象 VeLiveAudioFrameFilter 。
789
+ *
790
+ */
791
+
792
+ setAudioFrameFilter(filter: VeLiveAudioFrameFilter): void;
793
+ /** {zh}
794
+ * @detail api
795
+ * @brief 创建播放器。
796
+ * @order 1
797
+ * @return 播放器管理对象 [VeLiveMediaPlayer](#VeLiveMediaPlayer)。
798
+ *
799
+ */
800
+
801
+ createPlayer(): VeLiveMediaPlayer;
802
+ /** {zh}
803
+ * @detail api
804
+ * @brief 开始系统音频采集。
805
+ * @order 41
806
+ *
807
+ */
808
+
809
+ startMixSystemAudio(): void;
810
+ /** {zh}
811
+ * @detail api
812
+ * @brief 停止系统音频采集。
813
+ * @order 42
814
+ *
815
+ */
816
+
817
+ stopMixSystemAudio(): void;
818
+ /** {zh}
819
+ * @detail api
820
+ * @brief 获取当前是否处于屏幕采集状态。
821
+ * @order 43
822
+ *
823
+ */
824
+
825
+ isScreenRecording(): boolean;
826
+ /** {zh}
827
+ * @detail api
828
+ * @brief 添加视频帧的监听回调,用于获取推流器输出的视频帧。
829
+ * @order 44
830
+ * @param listener 视频帧的监听回调,详细信息请参见 [VeLiveVideoFrameListener](147519#VeLivePusherDef-VeLiveVideoFrameListener)。
831
+ * @return <br>
832
+ * - 0:成功;
833
+ * - <0:失败。
834
+ *
835
+ */
836
+
837
+ addVideoFrameListener(listener: VeLiveVideoFrameListener): int;
838
+ /** {zh}
839
+ * @detail api
840
+ * @brief 移除已添加的视频帧监听回调。
841
+ * @notes <br>
842
+ * 如果没有添加过此监听回调或者监听回调已被移除,调用此方法将返回失败。
843
+ * @order 45
844
+ * @param listener 视频帧的监听回调,详细信息请参见 [VeLiveVideoFrameListener](147519#VeLivePusherDef-VeLiveVideoFrameListener)。
845
+ * @return <br>
846
+ * - 0:成功;
847
+ * - <0:失败。
848
+ *
849
+ */
850
+
851
+ removeVideoFrameListener(listener: VeLiveVideoFrameListener): int;
852
+ /** {zh}
853
+ * @detail api
854
+ * @brief 添加音频帧的监听回调,用于获取推流器输出的音频帧。
855
+ * @order 46
856
+ * @param listener 音频帧监听回调,详细信息请参见 [VeLiveAudioFrameListener](147519#VeLivePusherDef-VeLiveAudioFrameListener)。
857
+ * @return <br>
858
+ * - 0:成功;
859
+ * - <0:失败。
860
+ *
861
+ */
862
+
863
+ addAudioFrameListener(listener: VeLiveAudioFrameListener): int;
864
+ /** {zh}
865
+ * @detail api
866
+ * @brief 移除已添加的音频帧监听回调。
867
+ * @notes <br>
868
+ * 如果没有添加过此监听回调或者监听回调已被移除,调用此方法将返回失败。
869
+ * @order 47
870
+ * @param listener 音频帧的监听回调,详细信息请参见 [VeLiveAudioFrameListener](147519#VeLivePusherDef-VeLiveAudioFrameListener)。
871
+ * @return <br>
872
+ * - 0:成功;
873
+ * - <0:失败。
874
+ *
875
+ */
876
+
877
+ removeAudioFrameListener(listener: VeLiveAudioFrameListener): int;
878
+ /** {zh}
879
+ * @detail api
880
+ * @brief 视频截图。
881
+ * @order 48
882
+ * @param listener 截图监听对象,详情请参见 [VeLiveSnapshotListener](147519#VeLivePusherDef-VeLiveSnapshotListener)。
883
+ *
884
+ */
885
+
886
+ snapshot(listener: VeLiveSnapshotListener): void;
887
+ }
888
+ export declare class VeLiveMediaPlayer {
889
+ /** {zh}
890
+ * @detail api
891
+ * @brief 销毁播放器实例。
892
+ * @order 1
893
+ *
894
+ */
895
+
896
+ release(): void;
897
+ /** {zh}
898
+ * @detail api
899
+ * @brief 设置播放状态的监听。
900
+ * @notes <br>
901
+ * 重复调用本方法,仅最后一次调用生效。
902
+ * @order 4
903
+ * @param listener 播放状态监听。详情请参见 [VeLiveMediaPlayerListener](147519#VeLivePusherDef-VeLiveMediaPlayerListener)。
904
+ *
905
+ */
906
+
907
+ setListener(listener: VeLiveMediaPlayerListener): void;
908
+ /** {zh}
909
+ * @detail api
910
+ * @brief 设置文件路径。支持的文件格式包括 MP3、AAC、M4A、WAV。
911
+ * @order 2
912
+ * @param url 文件路径。
913
+ * @return <br>
914
+ * - 0:成功;
915
+ * - ≠0:失败。
916
+ *
917
+ */
918
+
919
+ prepare(url: String): int;
920
+ /** {zh}
921
+ * @detail api
922
+ * @brief 开始播放。
923
+ * @notes <br>
924
+ * 需要在调用 start{@link #start} 开始播放后,调用本方法。
925
+ * @order 12
926
+ *
927
+ */
928
+
929
+ start(): int;
930
+ /** {zh}
931
+ * @detail api
932
+ * @brief 停止播放。
933
+ * @notes <br>
934
+ * 需要在调用 start{@link #start} 开始播放后,调用本方法。
935
+ * @order 13
936
+ * @return <br>
937
+ * - 0:成功;
938
+ * - ≠0:失败。
939
+ *
940
+ */
941
+
942
+ stop(): int;
943
+ /** {zh}
944
+ * @detail api
945
+ * @brief 暂停播放。
946
+ * @notes <br>需要在调用 [start](#VeLiveMediaPlayer-start)[start](#VeLiveMediaPlayer-start) 开始播放后,调用本方法。
947
+ * @order 14
948
+ *
949
+ */
950
+
951
+ pause(): void;
952
+ /** {zh}
953
+ * @detail api
954
+ * @brief 恢复播放。
955
+ * @notes <br>需要在调用 [pause](#VeLiveMediaPlayer-pause) 暂停播放后,调用本方法。
956
+ * @order 15
957
+ *
958
+ */
959
+
960
+ resume(): void;
961
+ /** {zh}
962
+ * @detail api
963
+ * @brief 获取文件的总时长,单位为 ms。
964
+ * @notes <br>需要在调用 [start](#VeLiveMediaPlayer-start) 开始播放后,调用本方法。
965
+ * @order 3
966
+ * @return <br>
967
+ * - >0:成功,音频文件时长;
968
+ * - ≤0:失败。
969
+ *
970
+ */
971
+
972
+ getDuration(): long;
973
+ /** {zh}
974
+ * @detail api
975
+ * @brief 设置播放进度。
976
+ * @order 5
977
+ * @param posMs 播放时间,单位为 ms。
978
+ * @return <br>
979
+ * - 0:成功;
980
+ * - ≠0:失败。
981
+ *
982
+ */
983
+
984
+ seek(posMs: long): int;
985
+ /** {zh}
986
+ * @detail api
987
+ * @brief 开启/关闭音频是否混音到直播流。
988
+ * @param enable 开启/关闭,默认为 false。 <br>
989
+ * - ture:开启;
990
+ * - false:关闭。
991
+ * @order 6
992
+ *
993
+ */
994
+
995
+ enableMixer(enable: boolean): void;
996
+ /** {zh}
997
+ * @detail api
998
+ * @brief 开启/关闭自动音量均衡。
999
+ * @order 7
1000
+ * @param sourceLufs 源响度。
1001
+ * @param targetLufs 目标响度。
1002
+ *
1003
+ */
1004
+
1005
+ enableAutoEq(sourceLufs: float, targetLufs: float): void;
1006
+ /** {zh}
1007
+ * @detail api
1008
+ * @brief 设置音视频帧回调的监听。
1009
+ * @notes <br>
1010
+ * 重复调用本方法,仅最后一次调用生效。
1011
+ * @order 8
1012
+ * @param listener 音视频帧回调监听。详情请参见 [VeLiveMediaPlayerFrameListener](147519#VeLivePusherDef-VeLiveMediaPlayerFrameListener)。
1013
+ *
1014
+ */
1015
+
1016
+ setFrameListener(listener: VeLiveMediaPlayerFrameListener): void;
1017
+ /** {zh}
1018
+ * @detail api
1019
+ * @brief 设置播放音频的音量。
1020
+ * @order 9
1021
+ * @param volume 播放音频音量,取值范围为 [0.0,4.0]。
1022
+ *
1023
+ */
1024
+
1025
+ setBGMVolume(volume: float): void;
1026
+ /** {zh}
1027
+ * @detail api
1028
+ * @brief 设置音频采集音量。
1029
+ * @notes <br>需要在调用 [start](#VeLiveMediaPlayer-start) 开始播放背景音乐后,调用本方法。
1030
+ * @order 10
1031
+ * @param volume 音频采集音量,取值范围为 [0.0,4.0]。
1032
+ *
1033
+ */
1034
+
1035
+ setVoiceVolume(volume: float): void;
1036
+ /** {zh}
1037
+ * @detail api
1038
+ * @brief 设置是否循环播放。
1039
+ * @param loop 是否循环播放。默认为 false。<br>
1040
+ * - true:循环播放;
1041
+ * - false:不循环播放。
1042
+ * @order 11
1043
+ *
1044
+ */
1045
+
1046
+ enableBGMLoop(loop: boolean): void;
1047
+ }
1048
+ export declare class VeLiveAudioDevice {
1049
+ /** {zh}
1050
+ * @detail api
1051
+ * @brief 设置音量响度。
1052
+ * @order 74
1053
+ * @param level 音量响度等级,取值范围为 [0.0,4.0]。
1054
+ *
1055
+ */
1056
+
1057
+ setVoiceLoudness(level: float): void;
1058
+ /** {zh}
1059
+ * @detail api
1060
+ * @brief 获取当前音量响度。
1061
+ * @order 75
1062
+ * @return <br>
1063
+ * 当前音量响度等级。
1064
+ *
1065
+ */
1066
+
1067
+ getVoiceLoudness(): float;
1068
+ }