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