@ray-js/api 1.7.70 → 1.7.71
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/@types/AIKit.d.ts +5509 -610
- package/@types/AIStreamKit.d.ts +2641 -0
- package/@types/AVideoKit.d.ts +1827 -0
- package/@types/BaseKit.d.ts +8682 -1893
- package/@types/BizKit.d.ts +6639 -1038
- package/@types/CategoryCommonBizKit.d.ts +1459 -0
- package/@types/CommunityKit.d.ts +154 -0
- package/@types/DeviceKit.d.ts +18475 -5662
- package/@types/GroupCITestKit.d.ts +651 -0
- package/@types/HealthKit.d.ts +2290 -357
- package/@types/HomeKit.d.ts +4068 -182
- package/@types/IPCKit.d.ts +4327 -1227
- package/@types/LightKit.d.ts +125 -0
- package/@types/MapKit.d.ts +1560 -204
- package/@types/MediaKit.d.ts +136 -16
- package/@types/MediaPlayerKit.d.ts +47 -0
- package/@types/MiniKit.d.ts +2976 -628
- package/@types/OutdoorKit.d.ts +1337 -24
- package/@types/P2PKit.d.ts +622 -103
- package/@types/PayKit.d.ts +115 -0
- package/@types/PlayNetKit.d.ts +3454 -1309
- package/@types/SweeperKit.d.ts +154 -0
- package/@types/ThirdAuthKit.d.ts +324 -0
- package/@types/ThirdPartyDeviceKit.d.ts +410 -0
- package/@types/WearKit.d.ts +10177 -375
- package/@types/gateway.d.ts +349 -61
- package/@types/health.d.ts +486 -304
- package/lib/AIKit-1.6.0.d.ts +265 -41
- package/lib/AIKit-1.6.0.js +374 -120
- package/lib/BaseKit-3.17.7.d.ts +704 -0
- package/lib/BaseKit-3.17.7.js +720 -1
- package/lib/BizKit-4.10.4.d.ts +336 -0
- package/lib/BizKit-4.10.4.js +342 -5
- package/lib/DeviceKit-4.13.1.d.ts +996 -0
- package/lib/DeviceKit-4.13.1.js +1247 -249
- package/lib/HealthKit-6.5.0.d.ts +210 -44
- package/lib/HealthKit-6.5.0.js +295 -128
- package/lib/HomeKit-3.1.4.d.ts +20 -6
- package/lib/HomeKit-3.1.4.js +29 -14
- package/lib/IPCKit-6.4.5.d.ts +375 -77
- package/lib/IPCKit-6.4.5.js +525 -228
- package/lib/MapKit-3.4.13.d.ts +70 -16
- package/lib/MapKit-3.4.13.js +98 -47
- package/lib/MediaKit-3.4.1.d.ts +5 -3
- package/lib/MediaKit-3.4.1.js +7 -6
- package/lib/MiniKit-3.14.1.d.ts +300 -0
- package/lib/MiniKit-3.14.1.js +302 -0
- package/lib/OutdoorKit-1.0.4.d.ts +55 -13
- package/lib/OutdoorKit-1.0.4.js +78 -35
- package/lib/P2PKit-2.0.3.d.ts +125 -27
- package/lib/P2PKit-2.0.3.js +175 -78
- package/lib/PlayNetKit-1.3.30.d.ts +290 -60
- package/lib/PlayNetKit-1.3.30.js +407 -176
- package/lib/WearKit-1.1.6.d.ts +125 -27
- package/lib/WearKit-1.1.6.js +176 -77
- package/lib/all-kits.d.ts +10 -10
- package/lib/all-kits.js +10 -10
- package/lib/cloud/core.d.ts +31 -1
- package/lib/cloud/core.js +31 -1
- package/lib/cloud/device.d.ts +155 -24
- package/lib/cloud/device.js +153 -22
- package/lib/cloud/gateway.d.ts +254 -0
- package/lib/cloud/gateway.js +269 -9
- package/lib/cloud/health.d.ts +1 -0
- package/lib/cloud/health.js +121 -0
- package/lib/cloud/interface.d.ts +222 -44
- package/lib/cloud/interface.js +15 -2
- package/lib/cloud/laser-clean/deleteCleaningRecord/index.d.ts +27 -0
- package/lib/cloud/laser-clean/deleteCleaningRecord/index.js +28 -0
- package/lib/cloud/laser-clean/deleteCleaningRecord/type.d.ts +7 -0
- package/lib/cloud/laser-clean/deleteCleaningRecord/type.js +1 -0
- package/lib/cloud/laser-clean/deleteGyroCleanRecord/index.d.ts +27 -0
- package/lib/cloud/laser-clean/deleteGyroCleanRecord/index.js +28 -0
- package/lib/cloud/laser-clean/deleteGyroCleanRecord/type.d.ts +7 -0
- package/lib/cloud/laser-clean/deleteGyroCleanRecord/type.js +1 -0
- package/lib/cloud/laser-clean/deleteMultipleMapFiles/index.d.ts +27 -0
- package/lib/cloud/laser-clean/deleteMultipleMapFiles/index.js +28 -0
- package/lib/cloud/laser-clean/deleteMultipleMapFiles/type.d.ts +7 -0
- package/lib/cloud/laser-clean/deleteMultipleMapFiles/type.js +1 -0
- package/lib/cloud/laser-clean/getCleaningRecords/index.d.ts +30 -0
- package/lib/cloud/laser-clean/getCleaningRecords/index.js +31 -0
- package/lib/cloud/laser-clean/getCleaningRecords/type.d.ts +39 -0
- package/lib/cloud/laser-clean/getCleaningRecords/type.js +1 -0
- package/lib/cloud/laser-clean/getGyroCleanRecordDetail/index.d.ts +29 -0
- package/lib/cloud/laser-clean/getGyroCleanRecordDetail/index.js +30 -0
- package/lib/cloud/laser-clean/getGyroCleanRecordDetail/type.d.ts +30 -0
- package/lib/cloud/laser-clean/getGyroCleanRecordDetail/type.js +1 -0
- package/lib/cloud/laser-clean/getGyroCleanRecords/index.d.ts +29 -0
- package/lib/cloud/laser-clean/getGyroCleanRecords/index.js +30 -0
- package/lib/cloud/laser-clean/getGyroCleanRecords/type.d.ts +35 -0
- package/lib/cloud/laser-clean/getGyroCleanRecords/type.js +1 -0
- package/lib/cloud/laser-clean/getGyroLatestCleanMap/index.d.ts +28 -0
- package/lib/cloud/laser-clean/getGyroLatestCleanMap/index.js +29 -0
- package/lib/cloud/laser-clean/getGyroLatestCleanMap/type.d.ts +28 -0
- package/lib/cloud/laser-clean/getGyroLatestCleanMap/type.js +1 -0
- package/lib/cloud/laser-clean/getMultipleMapFiles/index.d.ts +24 -0
- package/lib/cloud/laser-clean/getMultipleMapFiles/index.js +25 -0
- package/lib/cloud/laser-clean/getMultipleMapFiles/type.d.ts +29 -0
- package/lib/cloud/laser-clean/getMultipleMapFiles/type.js +1 -0
- package/lib/cloud/laser-clean/getSweeperStorageConfig/index.d.ts +24 -0
- package/lib/cloud/laser-clean/getSweeperStorageConfig/index.js +25 -0
- package/lib/cloud/laser-clean/getSweeperStorageConfig/type.d.ts +26 -0
- package/lib/cloud/laser-clean/getSweeperStorageConfig/type.js +1 -0
- package/lib/cloud/laser-clean/getVoiceList/index.d.ts +28 -0
- package/lib/cloud/laser-clean/getVoiceList/index.js +29 -0
- package/lib/cloud/laser-clean/getVoiceList/type.d.ts +48 -0
- package/lib/cloud/laser-clean/getVoiceList/type.js +1 -0
- package/lib/cloud/laser-clean/index.d.ts +1 -1
- package/lib/cloud/laser-clean/index.js +1 -1
- package/lib/cloud/laser-clean/map.d.ts +5 -7
- package/lib/cloud/laser-clean/map.js +5 -9
- package/lib/cloud/laser-clean/record.d.ts +5 -6
- package/lib/cloud/laser-clean/record.js +5 -7
- package/lib/cloud/laser-clean/renameHistoryMap/index.d.ts +28 -0
- package/lib/cloud/laser-clean/renameHistoryMap/index.js +29 -0
- package/lib/cloud/laser-clean/renameHistoryMap/type.d.ts +9 -0
- package/lib/cloud/laser-clean/renameHistoryMap/type.js +1 -0
- package/lib/cloud/laser-clean/voice.d.ts +1 -3
- package/lib/cloud/laser-clean/voice.js +1 -4
- package/lib/cloud/linkage.d.ts +271 -53
- package/lib/cloud/linkage.js +256 -51
- package/lib/cloud/remoteGroup.d.ts +37 -0
- package/lib/cloud/remoteGroup.js +37 -0
- package/lib/cloud/timer.d.ts +104 -26
- package/lib/cloud/timer.js +104 -26
- package/lib/getApp/index.thing.d.ts +47 -1
- package/lib/getApp/index.thing.js +40 -2
- package/lib/getBoundingClientRect/index.thing.d.ts +101 -1
- package/lib/getBoundingClientRect/index.thing.js +59 -0
- package/lib/getCurrentPages/index.thing.d.ts +40 -15
- package/lib/getCurrentPages/index.thing.js +36 -15
- package/lib/getCustomConfig/index.d.ts +5 -2
- package/lib/getCustomConfig/index.thing.d.ts +68 -2
- package/lib/getCustomConfig/index.thing.js +62 -0
- package/lib/getCustomConfig/index.wechat.d.ts +5 -2
- package/lib/getCustomConfig/type.d.ts +26 -15
- package/lib/getElementById/index.thing.d.ts +42 -1
- package/lib/getElementById/index.thing.js +40 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +4 -2
- package/lib/nativeRouters/common.d.ts +8 -0
- package/lib/nativeRouters/device.d.ts +137 -5
- package/lib/nativeRouters/device.js +138 -6
- package/lib/nativeRouters/gw.d.ts +58 -8
- package/lib/nativeRouters/gw.js +57 -8
- package/lib/nativeRouters/outdoors.d.ts +16 -3
- package/lib/nativeRouters/outdoors.js +16 -3
- package/lib/nativeRouters/remoteGroup.d.ts +23 -0
- package/lib/nativeRouters/remoteGroup.js +23 -0
- package/lib/nativeRouters/root.d.ts +19 -0
- package/lib/nativeRouters/root.js +17 -0
- package/lib/openGroupCreate/index.d.ts +45 -0
- package/lib/openGroupCreate/index.js +32 -0
- package/package.json +5 -5
|
@@ -0,0 +1,1827 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AVideoKit
|
|
3
|
+
*
|
|
4
|
+
* @version 1.0.12
|
|
5
|
+
*/
|
|
6
|
+
declare namespace ty.avideo {
|
|
7
|
+
/**
|
|
8
|
+
* 初始化音频处理器
|
|
9
|
+
* @public
|
|
10
|
+
* @since AVideoKit 1.0.0
|
|
11
|
+
* @platform iOS Android
|
|
12
|
+
*/
|
|
13
|
+
export function initAudioProcessor(params: {
|
|
14
|
+
/**
|
|
15
|
+
* 8000 16000 32000 supported only.
|
|
16
|
+
* @since AVideoKit 1.0.0
|
|
17
|
+
*/
|
|
18
|
+
sampleRate: number
|
|
19
|
+
/**
|
|
20
|
+
* mono supported only (1).
|
|
21
|
+
* @since AVideoKit 1.0.0
|
|
22
|
+
*/
|
|
23
|
+
channels: number
|
|
24
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
25
|
+
complete?: () => void
|
|
26
|
+
/** 接口调用成功的回调函数 */
|
|
27
|
+
success?: (params: null) => void
|
|
28
|
+
/** 接口调用失败的回调函数 */
|
|
29
|
+
fail?: (params: {
|
|
30
|
+
/** 错误信息 */
|
|
31
|
+
errorMsg: string
|
|
32
|
+
/** 错误码 */
|
|
33
|
+
errorCode: string | number
|
|
34
|
+
/** 错误扩展 */
|
|
35
|
+
innerError: {
|
|
36
|
+
/** 错误扩展码 */
|
|
37
|
+
errorCode: string | number
|
|
38
|
+
/** 错误扩展信息 */
|
|
39
|
+
errorMsg: string
|
|
40
|
+
}
|
|
41
|
+
}) => void
|
|
42
|
+
}): void
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* 设置 vad 级别
|
|
46
|
+
* @public
|
|
47
|
+
* @since AVideoKit 1.0.0
|
|
48
|
+
* @platform iOS Android
|
|
49
|
+
*/
|
|
50
|
+
export function setAudioProcessorVadLevel(params?: {
|
|
51
|
+
/**
|
|
52
|
+
* vad 级别
|
|
53
|
+
* @since AVideoKit 1.0.0
|
|
54
|
+
* @defaultValue VadLevel.vzero
|
|
55
|
+
*/
|
|
56
|
+
level?: VadLevel
|
|
57
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
58
|
+
complete?: () => void
|
|
59
|
+
/** 接口调用成功的回调函数 */
|
|
60
|
+
success?: (params: number) => void
|
|
61
|
+
/** 接口调用失败的回调函数 */
|
|
62
|
+
fail?: (params: {
|
|
63
|
+
/** 错误信息 */
|
|
64
|
+
errorMsg: string
|
|
65
|
+
/** 错误码 */
|
|
66
|
+
errorCode: string | number
|
|
67
|
+
/** 错误扩展 */
|
|
68
|
+
innerError: {
|
|
69
|
+
/** 错误扩展码 */
|
|
70
|
+
errorCode: string | number
|
|
71
|
+
/** 错误扩展信息 */
|
|
72
|
+
errorMsg: string
|
|
73
|
+
}
|
|
74
|
+
}) => void
|
|
75
|
+
}): void
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* 设置 vad 开关
|
|
79
|
+
* @public
|
|
80
|
+
* @since AVideoKit 1.0.0
|
|
81
|
+
* @platform iOS Android
|
|
82
|
+
*/
|
|
83
|
+
export function enableAudioProcessorVad(params: {
|
|
84
|
+
/**
|
|
85
|
+
* 开关
|
|
86
|
+
* @since AVideoKit 1.0.0
|
|
87
|
+
*/
|
|
88
|
+
enable: boolean
|
|
89
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
90
|
+
complete?: () => void
|
|
91
|
+
/** 接口调用成功的回调函数 */
|
|
92
|
+
success?: (params: number) => void
|
|
93
|
+
/** 接口调用失败的回调函数 */
|
|
94
|
+
fail?: (params: {
|
|
95
|
+
/** 错误信息 */
|
|
96
|
+
errorMsg: string
|
|
97
|
+
/** 错误码 */
|
|
98
|
+
errorCode: string | number
|
|
99
|
+
/** 错误扩展 */
|
|
100
|
+
innerError: {
|
|
101
|
+
/** 错误扩展码 */
|
|
102
|
+
errorCode: string | number
|
|
103
|
+
/** 错误扩展信息 */
|
|
104
|
+
errorMsg: string
|
|
105
|
+
}
|
|
106
|
+
}) => void
|
|
107
|
+
}): void
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* 检测声音
|
|
111
|
+
* @public
|
|
112
|
+
* @since AVideoKit 1.0.0
|
|
113
|
+
* @platform iOS Android
|
|
114
|
+
*/
|
|
115
|
+
export function audioProcessorDetectVoice(params: {
|
|
116
|
+
/**
|
|
117
|
+
* The audio data input. PCM only supported
|
|
118
|
+
* @since AVideoKit 1.0.0
|
|
119
|
+
*/
|
|
120
|
+
strem: number[]
|
|
121
|
+
/**
|
|
122
|
+
* The lenght of frame, 10ms、20ms、30ms supported only
|
|
123
|
+
* @since AVideoKit 1.0.0
|
|
124
|
+
*/
|
|
125
|
+
length: number
|
|
126
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
127
|
+
complete?: () => void
|
|
128
|
+
/** 接口调用成功的回调函数 */
|
|
129
|
+
success?: (params: number) => void
|
|
130
|
+
/** 接口调用失败的回调函数 */
|
|
131
|
+
fail?: (params: {
|
|
132
|
+
/** 错误信息 */
|
|
133
|
+
errorMsg: string
|
|
134
|
+
/** 错误码 */
|
|
135
|
+
errorCode: string | number
|
|
136
|
+
/** 错误扩展 */
|
|
137
|
+
innerError: {
|
|
138
|
+
/** 错误扩展码 */
|
|
139
|
+
errorCode: string | number
|
|
140
|
+
/** 错误扩展信息 */
|
|
141
|
+
errorMsg: string
|
|
142
|
+
}
|
|
143
|
+
}) => void
|
|
144
|
+
}): void
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* 设置 vad 引擎参数
|
|
148
|
+
* @public
|
|
149
|
+
* @since AVideoKit 1.0.0
|
|
150
|
+
* @platform iOS Android
|
|
151
|
+
*/
|
|
152
|
+
export function setAudioProcessorArichmetic(params: {
|
|
153
|
+
/**
|
|
154
|
+
* json string, for example:
|
|
155
|
+
* {
|
|
156
|
+
* "anc": {
|
|
157
|
+
* "Enable": true,//是否开启降噪
|
|
158
|
+
* "Level": 1 //降噪等级目前从低到高支持(0,1,2,3)
|
|
159
|
+
* },
|
|
160
|
+
* "agc": {
|
|
161
|
+
* "Enable": true//是否开始增益
|
|
162
|
+
* },
|
|
163
|
+
* "aec": {
|
|
164
|
+
* "Enable": true//是否开启回声消除
|
|
165
|
+
* }
|
|
166
|
+
* }
|
|
167
|
+
* @since AVideoKit 1.0.0
|
|
168
|
+
*/
|
|
169
|
+
arithMeticSettting: string
|
|
170
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
171
|
+
complete?: () => void
|
|
172
|
+
/** 接口调用成功的回调函数 */
|
|
173
|
+
success?: (params: number) => void
|
|
174
|
+
/** 接口调用失败的回调函数 */
|
|
175
|
+
fail?: (params: {
|
|
176
|
+
/** 错误信息 */
|
|
177
|
+
errorMsg: string
|
|
178
|
+
/** 错误码 */
|
|
179
|
+
errorCode: string | number
|
|
180
|
+
/** 错误扩展 */
|
|
181
|
+
innerError: {
|
|
182
|
+
/** 错误扩展码 */
|
|
183
|
+
errorCode: string | number
|
|
184
|
+
/** 错误扩展信息 */
|
|
185
|
+
errorMsg: string
|
|
186
|
+
}
|
|
187
|
+
}) => void
|
|
188
|
+
}): void
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* process stream.
|
|
192
|
+
* @public
|
|
193
|
+
* @since AVideoKit 1.0.0
|
|
194
|
+
* @platform iOS Android
|
|
195
|
+
*/
|
|
196
|
+
export function audioProcessorProcessStream(params: {
|
|
197
|
+
/**
|
|
198
|
+
* recordData
|
|
199
|
+
* @since AVideoKit 1.0.0
|
|
200
|
+
*/
|
|
201
|
+
recordData: number[]
|
|
202
|
+
/**
|
|
203
|
+
* The lenght of frame, 10ms、20ms、30ms supported only
|
|
204
|
+
* @since AVideoKit 1.0.0
|
|
205
|
+
*/
|
|
206
|
+
length: number
|
|
207
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
208
|
+
complete?: () => void
|
|
209
|
+
/** 接口调用成功的回调函数 */
|
|
210
|
+
success?: (params: {
|
|
211
|
+
/**
|
|
212
|
+
* The processed stream
|
|
213
|
+
* @since AVideoKit 1.0.0
|
|
214
|
+
*/
|
|
215
|
+
stream: number[]
|
|
216
|
+
}) => void
|
|
217
|
+
/** 接口调用失败的回调函数 */
|
|
218
|
+
fail?: (params: {
|
|
219
|
+
/** 错误信息 */
|
|
220
|
+
errorMsg: string
|
|
221
|
+
/** 错误码 */
|
|
222
|
+
errorCode: string | number
|
|
223
|
+
/** 错误扩展 */
|
|
224
|
+
innerError: {
|
|
225
|
+
/** 错误扩展码 */
|
|
226
|
+
errorCode: string | number
|
|
227
|
+
/** 错误扩展信息 */
|
|
228
|
+
errorMsg: string
|
|
229
|
+
}
|
|
230
|
+
}) => void
|
|
231
|
+
}): void
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* process reverse stream.
|
|
235
|
+
* @public
|
|
236
|
+
* @since AVideoKit 1.0.0
|
|
237
|
+
* @platform iOS Android
|
|
238
|
+
*/
|
|
239
|
+
export function audioProcessorProcessReverseStream(params: {
|
|
240
|
+
/**
|
|
241
|
+
* playbackData
|
|
242
|
+
* @since AVideoKit 1.0.0
|
|
243
|
+
*/
|
|
244
|
+
playbackData: number[]
|
|
245
|
+
/**
|
|
246
|
+
* The lenght of frame, 10ms、20ms、30ms supported only
|
|
247
|
+
* @since AVideoKit 1.0.0
|
|
248
|
+
*/
|
|
249
|
+
length: number
|
|
250
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
251
|
+
complete?: () => void
|
|
252
|
+
/** 接口调用成功的回调函数 */
|
|
253
|
+
success?: (params: {
|
|
254
|
+
/**
|
|
255
|
+
* The processed reverse stream
|
|
256
|
+
* @since AVideoKit 1.0.0
|
|
257
|
+
*/
|
|
258
|
+
stream: number[]
|
|
259
|
+
}) => void
|
|
260
|
+
/** 接口调用失败的回调函数 */
|
|
261
|
+
fail?: (params: {
|
|
262
|
+
/** 错误信息 */
|
|
263
|
+
errorMsg: string
|
|
264
|
+
/** 错误码 */
|
|
265
|
+
errorCode: string | number
|
|
266
|
+
/** 错误扩展 */
|
|
267
|
+
innerError: {
|
|
268
|
+
/** 错误扩展码 */
|
|
269
|
+
errorCode: string | number
|
|
270
|
+
/** 错误扩展信息 */
|
|
271
|
+
errorMsg: string
|
|
272
|
+
}
|
|
273
|
+
}) => void
|
|
274
|
+
}): void
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* 解码 mp3 数据
|
|
278
|
+
* @public
|
|
279
|
+
* @since AVideoKit 1.0.0
|
|
280
|
+
* @platform iOS Android
|
|
281
|
+
*/
|
|
282
|
+
export function DecodeMp3Frame(params: {
|
|
283
|
+
/**
|
|
284
|
+
* The audio data input. PCM only supported
|
|
285
|
+
* @since AVideoKit 1.0.0
|
|
286
|
+
*/
|
|
287
|
+
stream: number[]
|
|
288
|
+
/**
|
|
289
|
+
* The lenght of frame, 10ms、20ms、30ms supported only
|
|
290
|
+
* @since AVideoKit 1.0.0
|
|
291
|
+
*/
|
|
292
|
+
length: number
|
|
293
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
294
|
+
complete?: () => void
|
|
295
|
+
/** 接口调用成功的回调函数 */
|
|
296
|
+
success?: (params: {
|
|
297
|
+
/**
|
|
298
|
+
* 状态码
|
|
299
|
+
* @since AVideoKit 1.0.0
|
|
300
|
+
*/
|
|
301
|
+
status_code: number
|
|
302
|
+
/**
|
|
303
|
+
* 采样率
|
|
304
|
+
* @since AVideoKit 1.0.0
|
|
305
|
+
*/
|
|
306
|
+
sampleRate: number
|
|
307
|
+
/**
|
|
308
|
+
* 声道数
|
|
309
|
+
* @since AVideoKit 1.0.0
|
|
310
|
+
*/
|
|
311
|
+
channelCount: number
|
|
312
|
+
/**
|
|
313
|
+
* 数据包长度
|
|
314
|
+
* @since AVideoKit 1.0.0
|
|
315
|
+
*/
|
|
316
|
+
packetLength: number
|
|
317
|
+
/**
|
|
318
|
+
* 解码后的数据
|
|
319
|
+
* @since AVideoKit 1.0.0
|
|
320
|
+
*/
|
|
321
|
+
packet_data: number[]
|
|
322
|
+
}) => void
|
|
323
|
+
/** 接口调用失败的回调函数 */
|
|
324
|
+
fail?: (params: {
|
|
325
|
+
/** 错误信息 */
|
|
326
|
+
errorMsg: string
|
|
327
|
+
/** 错误码 */
|
|
328
|
+
errorCode: string | number
|
|
329
|
+
/** 错误扩展 */
|
|
330
|
+
innerError: {
|
|
331
|
+
/** 错误扩展码 */
|
|
332
|
+
errorCode: string | number
|
|
333
|
+
/** 错误扩展信息 */
|
|
334
|
+
errorMsg: string
|
|
335
|
+
}
|
|
336
|
+
}) => void
|
|
337
|
+
}): void
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* 初始化 mp3 编码器
|
|
341
|
+
* @public
|
|
342
|
+
* @since AVideoKit 1.0.0
|
|
343
|
+
* @platform iOS Android
|
|
344
|
+
*/
|
|
345
|
+
export function initMp3Encoder(params: {
|
|
346
|
+
/**
|
|
347
|
+
* 8000 16000 32000 supported only.
|
|
348
|
+
* @since AVideoKit 1.0.0
|
|
349
|
+
*/
|
|
350
|
+
sampleRate: number
|
|
351
|
+
/**
|
|
352
|
+
* mono supported only (1).
|
|
353
|
+
* @since AVideoKit 1.0.0
|
|
354
|
+
*/
|
|
355
|
+
channels: number
|
|
356
|
+
/**
|
|
357
|
+
* bitRate
|
|
358
|
+
* @since AVideoKit 1.0.0
|
|
359
|
+
*/
|
|
360
|
+
bitRate: number
|
|
361
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
362
|
+
complete?: () => void
|
|
363
|
+
/** 接口调用成功的回调函数 */
|
|
364
|
+
success?: (params: null) => void
|
|
365
|
+
/** 接口调用失败的回调函数 */
|
|
366
|
+
fail?: (params: {
|
|
367
|
+
/** 错误信息 */
|
|
368
|
+
errorMsg: string
|
|
369
|
+
/** 错误码 */
|
|
370
|
+
errorCode: string | number
|
|
371
|
+
/** 错误扩展 */
|
|
372
|
+
innerError: {
|
|
373
|
+
/** 错误扩展码 */
|
|
374
|
+
errorCode: string | number
|
|
375
|
+
/** 错误扩展信息 */
|
|
376
|
+
errorMsg: string
|
|
377
|
+
}
|
|
378
|
+
}) => void
|
|
379
|
+
}): void
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* 解码 mp3 数据
|
|
383
|
+
* @public
|
|
384
|
+
* @since AVideoKit 1.0.0
|
|
385
|
+
* @platform iOS Android
|
|
386
|
+
*/
|
|
387
|
+
export function encodeMp3Frame(params: {
|
|
388
|
+
/**
|
|
389
|
+
* pcm data
|
|
390
|
+
* @since AVideoKit 1.0.0
|
|
391
|
+
*/
|
|
392
|
+
pcm: number[]
|
|
393
|
+
/**
|
|
394
|
+
* The lenght of frame, 10ms、20ms、30ms supported only
|
|
395
|
+
* @since AVideoKit 1.0.0
|
|
396
|
+
*/
|
|
397
|
+
inLength: number
|
|
398
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
399
|
+
complete?: () => void
|
|
400
|
+
/** 接口调用成功的回调函数 */
|
|
401
|
+
success?: (params: {
|
|
402
|
+
/**
|
|
403
|
+
* 音频流数据
|
|
404
|
+
* @since AVideoKit 1.0.0
|
|
405
|
+
*/
|
|
406
|
+
data: number[]
|
|
407
|
+
}) => void
|
|
408
|
+
/** 接口调用失败的回调函数 */
|
|
409
|
+
fail?: (params: {
|
|
410
|
+
/** 错误信息 */
|
|
411
|
+
errorMsg: string
|
|
412
|
+
/** 错误码 */
|
|
413
|
+
errorCode: string | number
|
|
414
|
+
/** 错误扩展 */
|
|
415
|
+
innerError: {
|
|
416
|
+
/** 错误扩展码 */
|
|
417
|
+
errorCode: string | number
|
|
418
|
+
/** 错误扩展信息 */
|
|
419
|
+
errorMsg: string
|
|
420
|
+
}
|
|
421
|
+
}) => void
|
|
422
|
+
}): void
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* 初始化 opus packer
|
|
426
|
+
* @public
|
|
427
|
+
* @since AVideoKit 1.0.0
|
|
428
|
+
* @platform iOS Android
|
|
429
|
+
*/
|
|
430
|
+
export function initOpusPacker(params: {
|
|
431
|
+
/**
|
|
432
|
+
* 8000 16000 32000 supported only.
|
|
433
|
+
* @since AVideoKit 1.0.0
|
|
434
|
+
*/
|
|
435
|
+
sampleRate: number
|
|
436
|
+
/**
|
|
437
|
+
* mono supported only (1).
|
|
438
|
+
* @since AVideoKit 1.0.0
|
|
439
|
+
*/
|
|
440
|
+
channels: number
|
|
441
|
+
/**
|
|
442
|
+
* frameSize
|
|
443
|
+
* @since AVideoKit 1.0.0
|
|
444
|
+
*/
|
|
445
|
+
frameSize: number
|
|
446
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
447
|
+
complete?: () => void
|
|
448
|
+
/** 接口调用成功的回调函数 */
|
|
449
|
+
success?: (params: null) => void
|
|
450
|
+
/** 接口调用失败的回调函数 */
|
|
451
|
+
fail?: (params: {
|
|
452
|
+
/** 错误信息 */
|
|
453
|
+
errorMsg: string
|
|
454
|
+
/** 错误码 */
|
|
455
|
+
errorCode: string | number
|
|
456
|
+
/** 错误扩展 */
|
|
457
|
+
innerError: {
|
|
458
|
+
/** 错误扩展码 */
|
|
459
|
+
errorCode: string | number
|
|
460
|
+
/** 错误扩展信息 */
|
|
461
|
+
errorMsg: string
|
|
462
|
+
}
|
|
463
|
+
}) => void
|
|
464
|
+
}): void
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* getStartPage
|
|
468
|
+
* @public
|
|
469
|
+
* @since AVideoKit 1.0.0
|
|
470
|
+
* @platform iOS Android
|
|
471
|
+
*/
|
|
472
|
+
export function opusPackerGetStartPage(params?: {
|
|
473
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
474
|
+
complete?: () => void
|
|
475
|
+
/** 接口调用成功的回调函数 */
|
|
476
|
+
success?: (params: {
|
|
477
|
+
/**
|
|
478
|
+
* 音频流数据
|
|
479
|
+
* @since AVideoKit 1.0.0
|
|
480
|
+
*/
|
|
481
|
+
data: number[]
|
|
482
|
+
}) => void
|
|
483
|
+
/** 接口调用失败的回调函数 */
|
|
484
|
+
fail?: (params: {
|
|
485
|
+
/** 错误信息 */
|
|
486
|
+
errorMsg: string
|
|
487
|
+
/** 错误码 */
|
|
488
|
+
errorCode: string | number
|
|
489
|
+
/** 错误扩展 */
|
|
490
|
+
innerError: {
|
|
491
|
+
/** 错误扩展码 */
|
|
492
|
+
errorCode: string | number
|
|
493
|
+
/** 错误扩展信息 */
|
|
494
|
+
errorMsg: string
|
|
495
|
+
}
|
|
496
|
+
}) => void
|
|
497
|
+
}): void
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* packOpusData
|
|
501
|
+
* @public
|
|
502
|
+
* @since AVideoKit 1.0.0
|
|
503
|
+
* @platform iOS Android
|
|
504
|
+
*/
|
|
505
|
+
export function packOpusData(params: {
|
|
506
|
+
/**
|
|
507
|
+
* The audio data input. PCM only supported
|
|
508
|
+
* @since AVideoKit 1.0.0
|
|
509
|
+
*/
|
|
510
|
+
stream: number[]
|
|
511
|
+
/**
|
|
512
|
+
* The lenght of frame, 10ms、20ms、30ms supported only
|
|
513
|
+
* @since AVideoKit 1.0.0
|
|
514
|
+
*/
|
|
515
|
+
length: number
|
|
516
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
517
|
+
complete?: () => void
|
|
518
|
+
/** 接口调用成功的回调函数 */
|
|
519
|
+
success?: (params: {
|
|
520
|
+
/**
|
|
521
|
+
* 音频流数据
|
|
522
|
+
* @since AVideoKit 1.0.0
|
|
523
|
+
*/
|
|
524
|
+
data: number[]
|
|
525
|
+
}) => void
|
|
526
|
+
/** 接口调用失败的回调函数 */
|
|
527
|
+
fail?: (params: {
|
|
528
|
+
/** 错误信息 */
|
|
529
|
+
errorMsg: string
|
|
530
|
+
/** 错误码 */
|
|
531
|
+
errorCode: string | number
|
|
532
|
+
/** 错误扩展 */
|
|
533
|
+
innerError: {
|
|
534
|
+
/** 错误扩展码 */
|
|
535
|
+
errorCode: string | number
|
|
536
|
+
/** 错误扩展信息 */
|
|
537
|
+
errorMsg: string
|
|
538
|
+
}
|
|
539
|
+
}) => void
|
|
540
|
+
}): void
|
|
541
|
+
|
|
542
|
+
/**
|
|
543
|
+
* getEndPage
|
|
544
|
+
* @public
|
|
545
|
+
* @since AVideoKit 1.0.0
|
|
546
|
+
* @platform iOS Android
|
|
547
|
+
*/
|
|
548
|
+
export function opusPackerGetEndPage(params?: {
|
|
549
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
550
|
+
complete?: () => void
|
|
551
|
+
/** 接口调用成功的回调函数 */
|
|
552
|
+
success?: (params: {
|
|
553
|
+
/**
|
|
554
|
+
* 音频流数据
|
|
555
|
+
* @since AVideoKit 1.0.0
|
|
556
|
+
*/
|
|
557
|
+
data: number[]
|
|
558
|
+
}) => void
|
|
559
|
+
/** 接口调用失败的回调函数 */
|
|
560
|
+
fail?: (params: {
|
|
561
|
+
/** 错误信息 */
|
|
562
|
+
errorMsg: string
|
|
563
|
+
/** 错误码 */
|
|
564
|
+
errorCode: string | number
|
|
565
|
+
/** 错误扩展 */
|
|
566
|
+
innerError: {
|
|
567
|
+
/** 错误扩展码 */
|
|
568
|
+
errorCode: string | number
|
|
569
|
+
/** 错误扩展信息 */
|
|
570
|
+
errorMsg: string
|
|
571
|
+
}
|
|
572
|
+
}) => void
|
|
573
|
+
}): void
|
|
574
|
+
|
|
575
|
+
/**
|
|
576
|
+
* 解包opus数据
|
|
577
|
+
* @public
|
|
578
|
+
* @since AVideoKit 1.0.0
|
|
579
|
+
* @platform iOS Android
|
|
580
|
+
*/
|
|
581
|
+
export function unpackOpusData(params: {
|
|
582
|
+
/**
|
|
583
|
+
* The audio data input. PCM only supported
|
|
584
|
+
* @since AVideoKit 1.0.0
|
|
585
|
+
*/
|
|
586
|
+
stream: number[]
|
|
587
|
+
/**
|
|
588
|
+
* The lenght of frame, 10ms、20ms、30ms supported only
|
|
589
|
+
* @since AVideoKit 1.0.0
|
|
590
|
+
*/
|
|
591
|
+
length: number
|
|
592
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
593
|
+
complete?: () => void
|
|
594
|
+
/** 接口调用成功的回调函数 */
|
|
595
|
+
success?: (params: {
|
|
596
|
+
/**
|
|
597
|
+
* 状态码
|
|
598
|
+
* @since AVideoKit 1.0.0
|
|
599
|
+
*/
|
|
600
|
+
status_code: number
|
|
601
|
+
/**
|
|
602
|
+
* 采样率
|
|
603
|
+
* @since AVideoKit 1.0.0
|
|
604
|
+
*/
|
|
605
|
+
sampleRate: number
|
|
606
|
+
/**
|
|
607
|
+
* 声道数
|
|
608
|
+
* @since AVideoKit 1.0.0
|
|
609
|
+
*/
|
|
610
|
+
channelCount: number
|
|
611
|
+
/**
|
|
612
|
+
* 数据包长度
|
|
613
|
+
* @since AVideoKit 1.0.0
|
|
614
|
+
*/
|
|
615
|
+
packetLength: number
|
|
616
|
+
/**
|
|
617
|
+
* 解包后的数据
|
|
618
|
+
* @since AVideoKit 1.0.0
|
|
619
|
+
*/
|
|
620
|
+
packet_data: number[]
|
|
621
|
+
}) => void
|
|
622
|
+
/** 接口调用失败的回调函数 */
|
|
623
|
+
fail?: (params: {
|
|
624
|
+
/** 错误信息 */
|
|
625
|
+
errorMsg: string
|
|
626
|
+
/** 错误码 */
|
|
627
|
+
errorCode: string | number
|
|
628
|
+
/** 错误扩展 */
|
|
629
|
+
innerError: {
|
|
630
|
+
/** 错误扩展码 */
|
|
631
|
+
errorCode: string | number
|
|
632
|
+
/** 错误扩展信息 */
|
|
633
|
+
errorMsg: string
|
|
634
|
+
}
|
|
635
|
+
}) => void
|
|
636
|
+
}): void
|
|
637
|
+
|
|
638
|
+
/**
|
|
639
|
+
* 初始化音频文件录制器
|
|
640
|
+
* @public
|
|
641
|
+
* @since AVideoKit 1.0.0
|
|
642
|
+
* @platform iOS Android
|
|
643
|
+
*/
|
|
644
|
+
export function initAudioFileRecorder(params: {
|
|
645
|
+
/**
|
|
646
|
+
* recorder初始化参数
|
|
647
|
+
* @since AVideoKit 1.0.0
|
|
648
|
+
*/
|
|
649
|
+
options: string
|
|
650
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
651
|
+
complete?: () => void
|
|
652
|
+
/** 接口调用成功的回调函数 */
|
|
653
|
+
success?: (params: null) => void
|
|
654
|
+
/** 接口调用失败的回调函数 */
|
|
655
|
+
fail?: (params: {
|
|
656
|
+
/** 错误信息 */
|
|
657
|
+
errorMsg: string
|
|
658
|
+
/** 错误码 */
|
|
659
|
+
errorCode: string | number
|
|
660
|
+
/** 错误扩展 */
|
|
661
|
+
innerError: {
|
|
662
|
+
/** 错误扩展码 */
|
|
663
|
+
errorCode: string | number
|
|
664
|
+
/** 错误扩展信息 */
|
|
665
|
+
errorMsg: string
|
|
666
|
+
}
|
|
667
|
+
}) => void
|
|
668
|
+
}): void
|
|
669
|
+
|
|
670
|
+
/**
|
|
671
|
+
* 开始录制
|
|
672
|
+
* @public
|
|
673
|
+
* @since AVideoKit 1.0.0
|
|
674
|
+
* @platform iOS Android
|
|
675
|
+
*/
|
|
676
|
+
export function startAudioFileRecord(params: {
|
|
677
|
+
/**
|
|
678
|
+
* 录制文件名
|
|
679
|
+
* @since AVideoKit 1.0.0
|
|
680
|
+
*/
|
|
681
|
+
fileName: string
|
|
682
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
683
|
+
complete?: () => void
|
|
684
|
+
/** 接口调用成功的回调函数 */
|
|
685
|
+
success?: (params: null) => void
|
|
686
|
+
/** 接口调用失败的回调函数 */
|
|
687
|
+
fail?: (params: {
|
|
688
|
+
/** 错误信息 */
|
|
689
|
+
errorMsg: string
|
|
690
|
+
/** 错误码 */
|
|
691
|
+
errorCode: string | number
|
|
692
|
+
/** 错误扩展 */
|
|
693
|
+
innerError: {
|
|
694
|
+
/** 错误扩展码 */
|
|
695
|
+
errorCode: string | number
|
|
696
|
+
/** 错误扩展信息 */
|
|
697
|
+
errorMsg: string
|
|
698
|
+
}
|
|
699
|
+
}) => void
|
|
700
|
+
}): void
|
|
701
|
+
|
|
702
|
+
/**
|
|
703
|
+
* 停止录制
|
|
704
|
+
* @public
|
|
705
|
+
* @since AVideoKit 1.0.0
|
|
706
|
+
* @platform iOS Android
|
|
707
|
+
*/
|
|
708
|
+
export function stopAudioFileRecord(params?: {
|
|
709
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
710
|
+
complete?: () => void
|
|
711
|
+
/** 接口调用成功的回调函数 */
|
|
712
|
+
success?: (params: null) => void
|
|
713
|
+
/** 接口调用失败的回调函数 */
|
|
714
|
+
fail?: (params: {
|
|
715
|
+
/** 错误信息 */
|
|
716
|
+
errorMsg: string
|
|
717
|
+
/** 错误码 */
|
|
718
|
+
errorCode: string | number
|
|
719
|
+
/** 错误扩展 */
|
|
720
|
+
innerError: {
|
|
721
|
+
/** 错误扩展码 */
|
|
722
|
+
errorCode: string | number
|
|
723
|
+
/** 错误扩展信息 */
|
|
724
|
+
errorMsg: string
|
|
725
|
+
}
|
|
726
|
+
}) => void
|
|
727
|
+
}): void
|
|
728
|
+
|
|
729
|
+
/**
|
|
730
|
+
* 反初始化
|
|
731
|
+
* @public
|
|
732
|
+
* @since AVideoKit 1.0.0
|
|
733
|
+
* @platform iOS Android
|
|
734
|
+
*/
|
|
735
|
+
export function deinitAudioFileRecorder(params?: {
|
|
736
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
737
|
+
complete?: () => void
|
|
738
|
+
/** 接口调用成功的回调函数 */
|
|
739
|
+
success?: (params: null) => void
|
|
740
|
+
/** 接口调用失败的回调函数 */
|
|
741
|
+
fail?: (params: {
|
|
742
|
+
/** 错误信息 */
|
|
743
|
+
errorMsg: string
|
|
744
|
+
/** 错误码 */
|
|
745
|
+
errorCode: string | number
|
|
746
|
+
/** 错误扩展 */
|
|
747
|
+
innerError: {
|
|
748
|
+
/** 错误扩展码 */
|
|
749
|
+
errorCode: string | number
|
|
750
|
+
/** 错误扩展信息 */
|
|
751
|
+
errorMsg: string
|
|
752
|
+
}
|
|
753
|
+
}) => void
|
|
754
|
+
}): void
|
|
755
|
+
|
|
756
|
+
/**
|
|
757
|
+
* 销毁音频文件录制器
|
|
758
|
+
* @public
|
|
759
|
+
* @since AVideoKit 1.0.0
|
|
760
|
+
* @platform iOS Android
|
|
761
|
+
*/
|
|
762
|
+
export function destroyAudioFileRecorder(params?: {
|
|
763
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
764
|
+
complete?: () => void
|
|
765
|
+
/** 接口调用成功的回调函数 */
|
|
766
|
+
success?: (params: null) => void
|
|
767
|
+
/** 接口调用失败的回调函数 */
|
|
768
|
+
fail?: (params: {
|
|
769
|
+
/** 错误信息 */
|
|
770
|
+
errorMsg: string
|
|
771
|
+
/** 错误码 */
|
|
772
|
+
errorCode: string | number
|
|
773
|
+
/** 错误扩展 */
|
|
774
|
+
innerError: {
|
|
775
|
+
/** 错误扩展码 */
|
|
776
|
+
errorCode: string | number
|
|
777
|
+
/** 错误扩展信息 */
|
|
778
|
+
errorMsg: string
|
|
779
|
+
}
|
|
780
|
+
}) => void
|
|
781
|
+
}): void
|
|
782
|
+
|
|
783
|
+
/**
|
|
784
|
+
* 将本地视频文件转为音频文件。
|
|
785
|
+
* 视频文件支持格式:MP4、MOV、3GP、AVI
|
|
786
|
+
* @public
|
|
787
|
+
* @since AVideoKit 1.0.1
|
|
788
|
+
* @platform iOS Android
|
|
789
|
+
*/
|
|
790
|
+
export function videoToAudio(params: {
|
|
791
|
+
/**
|
|
792
|
+
* 视频文件地址
|
|
793
|
+
* @since AVideoKit 1.0.1
|
|
794
|
+
*/
|
|
795
|
+
filePath: string
|
|
796
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
797
|
+
complete?: () => void
|
|
798
|
+
/** 接口调用成功的回调函数 */
|
|
799
|
+
success?: (params: {
|
|
800
|
+
/**
|
|
801
|
+
* 音频文件地址
|
|
802
|
+
* @since AVideoKit 1.0.1
|
|
803
|
+
*/
|
|
804
|
+
filePath: string
|
|
805
|
+
/**
|
|
806
|
+
* 音频文件总时间
|
|
807
|
+
* @since AVideoKit 1.0.1
|
|
808
|
+
*/
|
|
809
|
+
totalTime: number
|
|
810
|
+
}) => void
|
|
811
|
+
/** 接口调用失败的回调函数 */
|
|
812
|
+
fail?: (params: {
|
|
813
|
+
/** 错误信息 */
|
|
814
|
+
errorMsg: string
|
|
815
|
+
/** 错误码 */
|
|
816
|
+
errorCode: string | number
|
|
817
|
+
/** 错误扩展 */
|
|
818
|
+
innerError: {
|
|
819
|
+
/** 错误扩展码 */
|
|
820
|
+
errorCode: string | number
|
|
821
|
+
/** 错误扩展信息 */
|
|
822
|
+
errorMsg: string
|
|
823
|
+
}
|
|
824
|
+
}) => void
|
|
825
|
+
}): void
|
|
826
|
+
|
|
827
|
+
/**
|
|
828
|
+
* 确保音频文件是PCM格式
|
|
829
|
+
* 如果文件已经是PCM格式,直接返回原文件路径
|
|
830
|
+
* 如果是IMA-ADPCM格式,转换为PCM格式并返回新文件路径
|
|
831
|
+
* @public
|
|
832
|
+
* @since AVideoKit 1.0.1
|
|
833
|
+
* @platform iOS Android
|
|
834
|
+
*/
|
|
835
|
+
export function ensurePcmFormat(params: {
|
|
836
|
+
/**
|
|
837
|
+
* 视频文件地址
|
|
838
|
+
* @since AVideoKit 1.0.1
|
|
839
|
+
*/
|
|
840
|
+
filePath: string
|
|
841
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
842
|
+
complete?: () => void
|
|
843
|
+
/** 接口调用成功的回调函数 */
|
|
844
|
+
success?: (params: {
|
|
845
|
+
/**
|
|
846
|
+
* 音频文件地址
|
|
847
|
+
* @since AVideoKit 1.0.1
|
|
848
|
+
*/
|
|
849
|
+
filePath: string
|
|
850
|
+
/**
|
|
851
|
+
* 音频文件总时间
|
|
852
|
+
* @since AVideoKit 1.0.1
|
|
853
|
+
*/
|
|
854
|
+
totalTime: number
|
|
855
|
+
}) => void
|
|
856
|
+
/** 接口调用失败的回调函数 */
|
|
857
|
+
fail?: (params: {
|
|
858
|
+
/** 错误信息 */
|
|
859
|
+
errorMsg: string
|
|
860
|
+
/** 错误码 */
|
|
861
|
+
errorCode: string | number
|
|
862
|
+
/** 错误扩展 */
|
|
863
|
+
innerError: {
|
|
864
|
+
/** 错误扩展码 */
|
|
865
|
+
errorCode: string | number
|
|
866
|
+
/** 错误扩展信息 */
|
|
867
|
+
errorMsg: string
|
|
868
|
+
}
|
|
869
|
+
}) => void
|
|
870
|
+
}): void
|
|
871
|
+
|
|
872
|
+
/**
|
|
873
|
+
* 截取音频文件中一段时间的音频
|
|
874
|
+
* @public
|
|
875
|
+
* @since AVideoKit 1.0.1
|
|
876
|
+
* @platform iOS Android
|
|
877
|
+
*/
|
|
878
|
+
export function trimAudioFile(params: {
|
|
879
|
+
/**
|
|
880
|
+
* 音频文件地址
|
|
881
|
+
* @since AVideoKit 1.0.1
|
|
882
|
+
*/
|
|
883
|
+
filePath: string
|
|
884
|
+
/**
|
|
885
|
+
* 开始时间
|
|
886
|
+
* @since AVideoKit 1.0.1
|
|
887
|
+
*/
|
|
888
|
+
startTime: number
|
|
889
|
+
/**
|
|
890
|
+
* 结束时间
|
|
891
|
+
* @since AVideoKit 1.0.1
|
|
892
|
+
*/
|
|
893
|
+
endTime: number
|
|
894
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
895
|
+
complete?: () => void
|
|
896
|
+
/** 接口调用成功的回调函数 */
|
|
897
|
+
success?: (params: {
|
|
898
|
+
/**
|
|
899
|
+
* 音频文件地址
|
|
900
|
+
* @since AVideoKit 1.0.1
|
|
901
|
+
*/
|
|
902
|
+
filePath: string
|
|
903
|
+
/**
|
|
904
|
+
* 音频文件总时间
|
|
905
|
+
* @since AVideoKit 1.0.1
|
|
906
|
+
*/
|
|
907
|
+
totalTime: number
|
|
908
|
+
}) => void
|
|
909
|
+
/** 接口调用失败的回调函数 */
|
|
910
|
+
fail?: (params: {
|
|
911
|
+
/** 错误信息 */
|
|
912
|
+
errorMsg: string
|
|
913
|
+
/** 错误码 */
|
|
914
|
+
errorCode: string | number
|
|
915
|
+
/** 错误扩展 */
|
|
916
|
+
innerError: {
|
|
917
|
+
/** 错误扩展码 */
|
|
918
|
+
errorCode: string | number
|
|
919
|
+
/** 错误扩展信息 */
|
|
920
|
+
errorMsg: string
|
|
921
|
+
}
|
|
922
|
+
}) => void
|
|
923
|
+
}): void
|
|
924
|
+
|
|
925
|
+
/**
|
|
926
|
+
* 压缩音频文件
|
|
927
|
+
* @public
|
|
928
|
+
* @since AVideoKit 1.0.1
|
|
929
|
+
* @platform iOS Android
|
|
930
|
+
*/
|
|
931
|
+
export function compressAudioFile(params: {
|
|
932
|
+
/**
|
|
933
|
+
* 视频文件地址
|
|
934
|
+
* @since AVideoKit 1.0.1
|
|
935
|
+
*/
|
|
936
|
+
filePath: string
|
|
937
|
+
/**
|
|
938
|
+
* 压缩算法 ,目前只支持 IMA-ADPCM
|
|
939
|
+
* @since AVideoKit 1.0.1
|
|
940
|
+
* @defaultValue CompressionAlgorithm.NO_Algorithm
|
|
941
|
+
*/
|
|
942
|
+
compressType?: CompressionAlgorithm
|
|
943
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
944
|
+
complete?: () => void
|
|
945
|
+
/** 接口调用成功的回调函数 */
|
|
946
|
+
success?: (params: {
|
|
947
|
+
/**
|
|
948
|
+
* 音频文件地址
|
|
949
|
+
* @since AVideoKit 1.0.1
|
|
950
|
+
*/
|
|
951
|
+
filePath: string
|
|
952
|
+
/**
|
|
953
|
+
* 音频文件总时间
|
|
954
|
+
* @since AVideoKit 1.0.1
|
|
955
|
+
*/
|
|
956
|
+
totalTime: number
|
|
957
|
+
}) => void
|
|
958
|
+
/** 接口调用失败的回调函数 */
|
|
959
|
+
fail?: (params: {
|
|
960
|
+
/** 错误信息 */
|
|
961
|
+
errorMsg: string
|
|
962
|
+
/** 错误码 */
|
|
963
|
+
errorCode: string | number
|
|
964
|
+
/** 错误扩展 */
|
|
965
|
+
innerError: {
|
|
966
|
+
/** 错误扩展码 */
|
|
967
|
+
errorCode: string | number
|
|
968
|
+
/** 错误扩展信息 */
|
|
969
|
+
errorMsg: string
|
|
970
|
+
}
|
|
971
|
+
}) => void
|
|
972
|
+
}): void
|
|
973
|
+
|
|
974
|
+
/**
|
|
975
|
+
* 初始化视频编码器
|
|
976
|
+
* @public
|
|
977
|
+
* @since AVideoKit 1.0.0
|
|
978
|
+
* @platform iOS Android
|
|
979
|
+
*/
|
|
980
|
+
export function initVideoEncoder(params: {
|
|
981
|
+
/**
|
|
982
|
+
* 编码格式
|
|
983
|
+
* @since AVideoKit 1.0.0
|
|
984
|
+
* @defaultValue VideoCodecId.unknow
|
|
985
|
+
*/
|
|
986
|
+
codec?: VideoCodecId
|
|
987
|
+
/**
|
|
988
|
+
* 宽
|
|
989
|
+
* @since AVideoKit 1.0.0
|
|
990
|
+
*/
|
|
991
|
+
width: number
|
|
992
|
+
/**
|
|
993
|
+
* 高
|
|
994
|
+
* @since AVideoKit 1.0.0
|
|
995
|
+
*/
|
|
996
|
+
height: number
|
|
997
|
+
/**
|
|
998
|
+
* 帧率
|
|
999
|
+
* @since AVideoKit 1.0.0
|
|
1000
|
+
*/
|
|
1001
|
+
frameRate: number
|
|
1002
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1003
|
+
complete?: () => void
|
|
1004
|
+
/** 接口调用成功的回调函数 */
|
|
1005
|
+
success?: (params: null) => void
|
|
1006
|
+
/** 接口调用失败的回调函数 */
|
|
1007
|
+
fail?: (params: {
|
|
1008
|
+
/** 错误信息 */
|
|
1009
|
+
errorMsg: string
|
|
1010
|
+
/** 错误码 */
|
|
1011
|
+
errorCode: string | number
|
|
1012
|
+
/** 错误扩展 */
|
|
1013
|
+
innerError: {
|
|
1014
|
+
/** 错误扩展码 */
|
|
1015
|
+
errorCode: string | number
|
|
1016
|
+
/** 错误扩展信息 */
|
|
1017
|
+
errorMsg: string
|
|
1018
|
+
}
|
|
1019
|
+
}) => void
|
|
1020
|
+
}): void
|
|
1021
|
+
|
|
1022
|
+
/**
|
|
1023
|
+
* 视频编码
|
|
1024
|
+
* @public
|
|
1025
|
+
* @since AVideoKit 1.0.0
|
|
1026
|
+
* @platform iOS Android
|
|
1027
|
+
*/
|
|
1028
|
+
export function encodeVideo(params: {
|
|
1029
|
+
/**
|
|
1030
|
+
* 编码数据
|
|
1031
|
+
* @since AVideoKit 1.0.0
|
|
1032
|
+
*/
|
|
1033
|
+
pixel: number[]
|
|
1034
|
+
/**
|
|
1035
|
+
* 宽
|
|
1036
|
+
* @since AVideoKit 1.0.0
|
|
1037
|
+
*/
|
|
1038
|
+
width: number
|
|
1039
|
+
/**
|
|
1040
|
+
* 高
|
|
1041
|
+
* @since AVideoKit 1.0.0
|
|
1042
|
+
*/
|
|
1043
|
+
height: number
|
|
1044
|
+
/**
|
|
1045
|
+
* 数据格式
|
|
1046
|
+
* @since AVideoKit 1.0.0
|
|
1047
|
+
* @defaultValue PixelFormat.unknow
|
|
1048
|
+
*/
|
|
1049
|
+
pixelFormat?: PixelFormat
|
|
1050
|
+
/**
|
|
1051
|
+
* 时间戳
|
|
1052
|
+
* @since AVideoKit 1.0.0
|
|
1053
|
+
*/
|
|
1054
|
+
timestamp?: number
|
|
1055
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1056
|
+
complete?: () => void
|
|
1057
|
+
/** 接口调用成功的回调函数 */
|
|
1058
|
+
success?: (params: null) => void
|
|
1059
|
+
/** 接口调用失败的回调函数 */
|
|
1060
|
+
fail?: (params: {
|
|
1061
|
+
/** 错误信息 */
|
|
1062
|
+
errorMsg: string
|
|
1063
|
+
/** 错误码 */
|
|
1064
|
+
errorCode: string | number
|
|
1065
|
+
/** 错误扩展 */
|
|
1066
|
+
innerError: {
|
|
1067
|
+
/** 错误扩展码 */
|
|
1068
|
+
errorCode: string | number
|
|
1069
|
+
/** 错误扩展信息 */
|
|
1070
|
+
errorMsg: string
|
|
1071
|
+
}
|
|
1072
|
+
}) => void
|
|
1073
|
+
}): void
|
|
1074
|
+
|
|
1075
|
+
/**
|
|
1076
|
+
* 销毁视频编码器
|
|
1077
|
+
* @public
|
|
1078
|
+
* @since AVideoKit 1.0.0
|
|
1079
|
+
* @platform iOS Android
|
|
1080
|
+
*/
|
|
1081
|
+
export function destroyVideoEncoder(params?: {
|
|
1082
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1083
|
+
complete?: () => void
|
|
1084
|
+
/** 接口调用成功的回调函数 */
|
|
1085
|
+
success?: (params: null) => void
|
|
1086
|
+
/** 接口调用失败的回调函数 */
|
|
1087
|
+
fail?: (params: {
|
|
1088
|
+
/** 错误信息 */
|
|
1089
|
+
errorMsg: string
|
|
1090
|
+
/** 错误码 */
|
|
1091
|
+
errorCode: string | number
|
|
1092
|
+
/** 错误扩展 */
|
|
1093
|
+
innerError: {
|
|
1094
|
+
/** 错误扩展码 */
|
|
1095
|
+
errorCode: string | number
|
|
1096
|
+
/** 错误扩展信息 */
|
|
1097
|
+
errorMsg: string
|
|
1098
|
+
}
|
|
1099
|
+
}) => void
|
|
1100
|
+
}): void
|
|
1101
|
+
|
|
1102
|
+
/**
|
|
1103
|
+
* 初始化视频解码器
|
|
1104
|
+
* @public
|
|
1105
|
+
* @since AVideoKit 1.0.0
|
|
1106
|
+
* @platform iOS Android
|
|
1107
|
+
*/
|
|
1108
|
+
export function initVideoDecoder(params?: {
|
|
1109
|
+
/**
|
|
1110
|
+
* 编码格式
|
|
1111
|
+
* @since AVideoKit 1.0.0
|
|
1112
|
+
* @defaultValue VideoCodecId.unknow
|
|
1113
|
+
*/
|
|
1114
|
+
codecId?: VideoCodecId
|
|
1115
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1116
|
+
complete?: () => void
|
|
1117
|
+
/** 接口调用成功的回调函数 */
|
|
1118
|
+
success?: (params: null) => void
|
|
1119
|
+
/** 接口调用失败的回调函数 */
|
|
1120
|
+
fail?: (params: {
|
|
1121
|
+
/** 错误信息 */
|
|
1122
|
+
errorMsg: string
|
|
1123
|
+
/** 错误码 */
|
|
1124
|
+
errorCode: string | number
|
|
1125
|
+
/** 错误扩展 */
|
|
1126
|
+
innerError: {
|
|
1127
|
+
/** 错误扩展码 */
|
|
1128
|
+
errorCode: string | number
|
|
1129
|
+
/** 错误扩展信息 */
|
|
1130
|
+
errorMsg: string
|
|
1131
|
+
}
|
|
1132
|
+
}) => void
|
|
1133
|
+
}): void
|
|
1134
|
+
|
|
1135
|
+
/**
|
|
1136
|
+
* 视频解码
|
|
1137
|
+
* @public
|
|
1138
|
+
* @since AVideoKit 1.0.0
|
|
1139
|
+
* @platform iOS Android
|
|
1140
|
+
*/
|
|
1141
|
+
export function decodeVideo(params: {
|
|
1142
|
+
/**
|
|
1143
|
+
* 编码数据流
|
|
1144
|
+
* @since AVideoKit 1.0.0
|
|
1145
|
+
*/
|
|
1146
|
+
stream: number[]
|
|
1147
|
+
/**
|
|
1148
|
+
* 数据长度
|
|
1149
|
+
* @since AVideoKit 1.0.0
|
|
1150
|
+
*/
|
|
1151
|
+
length: number
|
|
1152
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1153
|
+
complete?: () => void
|
|
1154
|
+
/** 接口调用成功的回调函数 */
|
|
1155
|
+
success?: (params: null) => void
|
|
1156
|
+
/** 接口调用失败的回调函数 */
|
|
1157
|
+
fail?: (params: {
|
|
1158
|
+
/** 错误信息 */
|
|
1159
|
+
errorMsg: string
|
|
1160
|
+
/** 错误码 */
|
|
1161
|
+
errorCode: string | number
|
|
1162
|
+
/** 错误扩展 */
|
|
1163
|
+
innerError: {
|
|
1164
|
+
/** 错误扩展码 */
|
|
1165
|
+
errorCode: string | number
|
|
1166
|
+
/** 错误扩展信息 */
|
|
1167
|
+
errorMsg: string
|
|
1168
|
+
}
|
|
1169
|
+
}) => void
|
|
1170
|
+
}): void
|
|
1171
|
+
|
|
1172
|
+
/**
|
|
1173
|
+
* 销毁视频解码器
|
|
1174
|
+
* @public
|
|
1175
|
+
* @since AVideoKit 1.0.0
|
|
1176
|
+
* @platform iOS Android
|
|
1177
|
+
*/
|
|
1178
|
+
export function destroyVideoDecoder(params?: {
|
|
1179
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1180
|
+
complete?: () => void
|
|
1181
|
+
/** 接口调用成功的回调函数 */
|
|
1182
|
+
success?: (params: null) => void
|
|
1183
|
+
/** 接口调用失败的回调函数 */
|
|
1184
|
+
fail?: (params: {
|
|
1185
|
+
/** 错误信息 */
|
|
1186
|
+
errorMsg: string
|
|
1187
|
+
/** 错误码 */
|
|
1188
|
+
errorCode: string | number
|
|
1189
|
+
/** 错误扩展 */
|
|
1190
|
+
innerError: {
|
|
1191
|
+
/** 错误扩展码 */
|
|
1192
|
+
errorCode: string | number
|
|
1193
|
+
/** 错误扩展信息 */
|
|
1194
|
+
errorMsg: string
|
|
1195
|
+
}
|
|
1196
|
+
}) => void
|
|
1197
|
+
}): void
|
|
1198
|
+
|
|
1199
|
+
/**
|
|
1200
|
+
* 编码数据回调
|
|
1201
|
+
* @public
|
|
1202
|
+
* @since AVideoKit 1.0.0
|
|
1203
|
+
* @platform iOS Android
|
|
1204
|
+
*/
|
|
1205
|
+
export function onReceiveVideoEncoderEncodedStream(
|
|
1206
|
+
listener: (params: VideoEncodedStreamModel) => void
|
|
1207
|
+
): void
|
|
1208
|
+
|
|
1209
|
+
/**
|
|
1210
|
+
* 编码数据回调
|
|
1211
|
+
* @public
|
|
1212
|
+
* @since AVideoKit 1.0.0
|
|
1213
|
+
* @platform iOS Android
|
|
1214
|
+
*/
|
|
1215
|
+
export function offReceiveVideoEncoderEncodedStream(
|
|
1216
|
+
listener: (params: VideoEncodedStreamModel) => void
|
|
1217
|
+
): void
|
|
1218
|
+
|
|
1219
|
+
/**
|
|
1220
|
+
* 解码数据回调
|
|
1221
|
+
* @public
|
|
1222
|
+
* @since AVideoKit 1.0.0
|
|
1223
|
+
* @platform iOS Android
|
|
1224
|
+
*/
|
|
1225
|
+
export function onReceiveVideoDecoderDecodedStream(
|
|
1226
|
+
listener: (params: VideoDecodedStreamModel) => void
|
|
1227
|
+
): void
|
|
1228
|
+
|
|
1229
|
+
/**
|
|
1230
|
+
* 解码数据回调
|
|
1231
|
+
* @public
|
|
1232
|
+
* @since AVideoKit 1.0.0
|
|
1233
|
+
* @platform iOS Android
|
|
1234
|
+
*/
|
|
1235
|
+
export function offReceiveVideoDecoderDecodedStream(
|
|
1236
|
+
listener: (params: VideoDecodedStreamModel) => void
|
|
1237
|
+
): void
|
|
1238
|
+
|
|
1239
|
+
/** @since AVideoKit 1.0.0 */
|
|
1240
|
+
export interface InitAudioProcessorParams {
|
|
1241
|
+
/**
|
|
1242
|
+
* 8000 16000 32000 supported only.
|
|
1243
|
+
* @since AVideoKit 1.0.0
|
|
1244
|
+
*/
|
|
1245
|
+
sampleRate: number
|
|
1246
|
+
/**
|
|
1247
|
+
* mono supported only (1).
|
|
1248
|
+
* @since AVideoKit 1.0.0
|
|
1249
|
+
*/
|
|
1250
|
+
channels: number
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1253
|
+
/** @since AVideoKit 1.0.0 */
|
|
1254
|
+
export enum VadLevel {
|
|
1255
|
+
/**
|
|
1256
|
+
* 0 非常低
|
|
1257
|
+
* @since AVideoKit 1.0.0
|
|
1258
|
+
*/
|
|
1259
|
+
veryLow = 0,
|
|
1260
|
+
|
|
1261
|
+
/**
|
|
1262
|
+
* 1 低
|
|
1263
|
+
* @since AVideoKit 1.0.0
|
|
1264
|
+
*/
|
|
1265
|
+
low = 1,
|
|
1266
|
+
|
|
1267
|
+
/**
|
|
1268
|
+
* 2 中
|
|
1269
|
+
* @since AVideoKit 1.0.0
|
|
1270
|
+
*/
|
|
1271
|
+
medium = 2,
|
|
1272
|
+
|
|
1273
|
+
/**
|
|
1274
|
+
* 3 高
|
|
1275
|
+
* @since AVideoKit 1.0.0
|
|
1276
|
+
*/
|
|
1277
|
+
high = 3,
|
|
1278
|
+
|
|
1279
|
+
/**
|
|
1280
|
+
* 4 no vad
|
|
1281
|
+
* @since AVideoKit 1.0.0
|
|
1282
|
+
*/
|
|
1283
|
+
vzero = 4,
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1286
|
+
/** @since AVideoKit 1.0.0 */
|
|
1287
|
+
export interface SetVadLevelParams {
|
|
1288
|
+
/**
|
|
1289
|
+
* vad 级别
|
|
1290
|
+
* @since AVideoKit 1.0.0
|
|
1291
|
+
* @defaultValue VadLevel.vzero
|
|
1292
|
+
*/
|
|
1293
|
+
level?: VadLevel
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1296
|
+
/** @since AVideoKit 1.0.0 */
|
|
1297
|
+
export interface EnableVadParams {
|
|
1298
|
+
/**
|
|
1299
|
+
* 开关
|
|
1300
|
+
* @since AVideoKit 1.0.0
|
|
1301
|
+
*/
|
|
1302
|
+
enable: boolean
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
/** @since AVideoKit 1.0.0 */
|
|
1306
|
+
export interface VoiceDetectParams {
|
|
1307
|
+
/**
|
|
1308
|
+
* The audio data input. PCM only supported
|
|
1309
|
+
* @since AVideoKit 1.0.0
|
|
1310
|
+
*/
|
|
1311
|
+
strem: number[]
|
|
1312
|
+
/**
|
|
1313
|
+
* The lenght of frame, 10ms、20ms、30ms supported only
|
|
1314
|
+
* @since AVideoKit 1.0.0
|
|
1315
|
+
*/
|
|
1316
|
+
length: number
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1319
|
+
/** @since AVideoKit 1.0.0 */
|
|
1320
|
+
export interface SetAudioArichmeticParams {
|
|
1321
|
+
/**
|
|
1322
|
+
* json string, for example:
|
|
1323
|
+
* {
|
|
1324
|
+
* "anc": {
|
|
1325
|
+
* "Enable": true,//是否开启降噪
|
|
1326
|
+
* "Level": 1 //降噪等级目前从低到高支持(0,1,2,3)
|
|
1327
|
+
* },
|
|
1328
|
+
* "agc": {
|
|
1329
|
+
* "Enable": true//是否开始增益
|
|
1330
|
+
* },
|
|
1331
|
+
* "aec": {
|
|
1332
|
+
* "Enable": true//是否开启回声消除
|
|
1333
|
+
* }
|
|
1334
|
+
* }
|
|
1335
|
+
* @since AVideoKit 1.0.0
|
|
1336
|
+
*/
|
|
1337
|
+
arithMeticSettting: string
|
|
1338
|
+
}
|
|
1339
|
+
|
|
1340
|
+
/** @since AVideoKit 1.0.0 */
|
|
1341
|
+
export interface ProcessStreamParams {
|
|
1342
|
+
/**
|
|
1343
|
+
* recordData
|
|
1344
|
+
* @since AVideoKit 1.0.0
|
|
1345
|
+
*/
|
|
1346
|
+
recordData: number[]
|
|
1347
|
+
/**
|
|
1348
|
+
* The lenght of frame, 10ms、20ms、30ms supported only
|
|
1349
|
+
* @since AVideoKit 1.0.0
|
|
1350
|
+
*/
|
|
1351
|
+
length: number
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1354
|
+
/** @since AVideoKit 1.0.0 */
|
|
1355
|
+
export interface ProcessedStreamResponseModel {
|
|
1356
|
+
/**
|
|
1357
|
+
* The processed stream
|
|
1358
|
+
* @since AVideoKit 1.0.0
|
|
1359
|
+
*/
|
|
1360
|
+
stream: number[]
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1363
|
+
/** @since AVideoKit 1.0.0 */
|
|
1364
|
+
export interface ProcessReverseStreamParams {
|
|
1365
|
+
/**
|
|
1366
|
+
* playbackData
|
|
1367
|
+
* @since AVideoKit 1.0.0
|
|
1368
|
+
*/
|
|
1369
|
+
playbackData: number[]
|
|
1370
|
+
/**
|
|
1371
|
+
* The lenght of frame, 10ms、20ms、30ms supported only
|
|
1372
|
+
* @since AVideoKit 1.0.0
|
|
1373
|
+
*/
|
|
1374
|
+
length: number
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1377
|
+
/** @since AVideoKit 1.0.0 */
|
|
1378
|
+
export interface ProcessedReverseStreamResponseModel {
|
|
1379
|
+
/**
|
|
1380
|
+
* The processed reverse stream
|
|
1381
|
+
* @since AVideoKit 1.0.0
|
|
1382
|
+
*/
|
|
1383
|
+
stream: number[]
|
|
1384
|
+
}
|
|
1385
|
+
|
|
1386
|
+
/** @since AVideoKit 1.0.0 */
|
|
1387
|
+
export interface DecodeMp3FrameParams {
|
|
1388
|
+
/**
|
|
1389
|
+
* The audio data input. PCM only supported
|
|
1390
|
+
* @since AVideoKit 1.0.0
|
|
1391
|
+
*/
|
|
1392
|
+
stream: number[]
|
|
1393
|
+
/**
|
|
1394
|
+
* The lenght of frame, 10ms、20ms、30ms supported only
|
|
1395
|
+
* @since AVideoKit 1.0.0
|
|
1396
|
+
*/
|
|
1397
|
+
length: number
|
|
1398
|
+
}
|
|
1399
|
+
|
|
1400
|
+
/** @since AVideoKit 1.0.0 */
|
|
1401
|
+
export interface DecodeMp3FrameResponseModel {
|
|
1402
|
+
/**
|
|
1403
|
+
* 状态码
|
|
1404
|
+
* @since AVideoKit 1.0.0
|
|
1405
|
+
*/
|
|
1406
|
+
status_code: number
|
|
1407
|
+
/**
|
|
1408
|
+
* 采样率
|
|
1409
|
+
* @since AVideoKit 1.0.0
|
|
1410
|
+
*/
|
|
1411
|
+
sampleRate: number
|
|
1412
|
+
/**
|
|
1413
|
+
* 声道数
|
|
1414
|
+
* @since AVideoKit 1.0.0
|
|
1415
|
+
*/
|
|
1416
|
+
channelCount: number
|
|
1417
|
+
/**
|
|
1418
|
+
* 数据包长度
|
|
1419
|
+
* @since AVideoKit 1.0.0
|
|
1420
|
+
*/
|
|
1421
|
+
packetLength: number
|
|
1422
|
+
/**
|
|
1423
|
+
* 解码后的数据
|
|
1424
|
+
* @since AVideoKit 1.0.0
|
|
1425
|
+
*/
|
|
1426
|
+
packet_data: number[]
|
|
1427
|
+
}
|
|
1428
|
+
|
|
1429
|
+
/** @since AVideoKit 1.0.0 */
|
|
1430
|
+
export interface InitMp3EncoderParams {
|
|
1431
|
+
/**
|
|
1432
|
+
* 8000 16000 32000 supported only.
|
|
1433
|
+
* @since AVideoKit 1.0.0
|
|
1434
|
+
*/
|
|
1435
|
+
sampleRate: number
|
|
1436
|
+
/**
|
|
1437
|
+
* mono supported only (1).
|
|
1438
|
+
* @since AVideoKit 1.0.0
|
|
1439
|
+
*/
|
|
1440
|
+
channels: number
|
|
1441
|
+
/**
|
|
1442
|
+
* bitRate
|
|
1443
|
+
* @since AVideoKit 1.0.0
|
|
1444
|
+
*/
|
|
1445
|
+
bitRate: number
|
|
1446
|
+
}
|
|
1447
|
+
|
|
1448
|
+
/** @since AVideoKit 1.0.0 */
|
|
1449
|
+
export interface EncodeMp3FrameParams {
|
|
1450
|
+
/**
|
|
1451
|
+
* pcm data
|
|
1452
|
+
* @since AVideoKit 1.0.0
|
|
1453
|
+
*/
|
|
1454
|
+
pcm: number[]
|
|
1455
|
+
/**
|
|
1456
|
+
* The lenght of frame, 10ms、20ms、30ms supported only
|
|
1457
|
+
* @since AVideoKit 1.0.0
|
|
1458
|
+
*/
|
|
1459
|
+
inLength: number
|
|
1460
|
+
}
|
|
1461
|
+
|
|
1462
|
+
/** @since AVideoKit 1.0.0 */
|
|
1463
|
+
export interface IntArrayResponseModel {
|
|
1464
|
+
/**
|
|
1465
|
+
* 音频流数据
|
|
1466
|
+
* @since AVideoKit 1.0.0
|
|
1467
|
+
*/
|
|
1468
|
+
data: number[]
|
|
1469
|
+
}
|
|
1470
|
+
|
|
1471
|
+
/** @since AVideoKit 1.0.0 */
|
|
1472
|
+
export interface InitOpusPackerParams {
|
|
1473
|
+
/**
|
|
1474
|
+
* 8000 16000 32000 supported only.
|
|
1475
|
+
* @since AVideoKit 1.0.0
|
|
1476
|
+
*/
|
|
1477
|
+
sampleRate: number
|
|
1478
|
+
/**
|
|
1479
|
+
* mono supported only (1).
|
|
1480
|
+
* @since AVideoKit 1.0.0
|
|
1481
|
+
*/
|
|
1482
|
+
channels: number
|
|
1483
|
+
/**
|
|
1484
|
+
* frameSize
|
|
1485
|
+
* @since AVideoKit 1.0.0
|
|
1486
|
+
*/
|
|
1487
|
+
frameSize: number
|
|
1488
|
+
}
|
|
1489
|
+
|
|
1490
|
+
/** @since AVideoKit 1.0.0 */
|
|
1491
|
+
export interface PackOpusDataParams {
|
|
1492
|
+
/**
|
|
1493
|
+
* The audio data input. PCM only supported
|
|
1494
|
+
* @since AVideoKit 1.0.0
|
|
1495
|
+
*/
|
|
1496
|
+
stream: number[]
|
|
1497
|
+
/**
|
|
1498
|
+
* The lenght of frame, 10ms、20ms、30ms supported only
|
|
1499
|
+
* @since AVideoKit 1.0.0
|
|
1500
|
+
*/
|
|
1501
|
+
length: number
|
|
1502
|
+
}
|
|
1503
|
+
|
|
1504
|
+
/** @since AVideoKit 1.0.0 */
|
|
1505
|
+
export interface UnpackOpusDataParams {
|
|
1506
|
+
/**
|
|
1507
|
+
* The audio data input. PCM only supported
|
|
1508
|
+
* @since AVideoKit 1.0.0
|
|
1509
|
+
*/
|
|
1510
|
+
stream: number[]
|
|
1511
|
+
/**
|
|
1512
|
+
* The lenght of frame, 10ms、20ms、30ms supported only
|
|
1513
|
+
* @since AVideoKit 1.0.0
|
|
1514
|
+
*/
|
|
1515
|
+
length: number
|
|
1516
|
+
}
|
|
1517
|
+
|
|
1518
|
+
/** @since AVideoKit 1.0.0 */
|
|
1519
|
+
export interface UnpackOpusDataResponseModel {
|
|
1520
|
+
/**
|
|
1521
|
+
* 状态码
|
|
1522
|
+
* @since AVideoKit 1.0.0
|
|
1523
|
+
*/
|
|
1524
|
+
status_code: number
|
|
1525
|
+
/**
|
|
1526
|
+
* 采样率
|
|
1527
|
+
* @since AVideoKit 1.0.0
|
|
1528
|
+
*/
|
|
1529
|
+
sampleRate: number
|
|
1530
|
+
/**
|
|
1531
|
+
* 声道数
|
|
1532
|
+
* @since AVideoKit 1.0.0
|
|
1533
|
+
*/
|
|
1534
|
+
channelCount: number
|
|
1535
|
+
/**
|
|
1536
|
+
* 数据包长度
|
|
1537
|
+
* @since AVideoKit 1.0.0
|
|
1538
|
+
*/
|
|
1539
|
+
packetLength: number
|
|
1540
|
+
/**
|
|
1541
|
+
* 解包后的数据
|
|
1542
|
+
* @since AVideoKit 1.0.0
|
|
1543
|
+
*/
|
|
1544
|
+
packet_data: number[]
|
|
1545
|
+
}
|
|
1546
|
+
|
|
1547
|
+
/** @since AVideoKit 1.0.0 */
|
|
1548
|
+
export interface AudioFileRecorderInitParams {
|
|
1549
|
+
/**
|
|
1550
|
+
* recorder初始化参数
|
|
1551
|
+
* @since AVideoKit 1.0.0
|
|
1552
|
+
*/
|
|
1553
|
+
options: string
|
|
1554
|
+
}
|
|
1555
|
+
|
|
1556
|
+
/** @since AVideoKit 1.0.0 */
|
|
1557
|
+
export interface AudioFileRecorderFileName {
|
|
1558
|
+
/**
|
|
1559
|
+
* 录制文件名
|
|
1560
|
+
* @since AVideoKit 1.0.0
|
|
1561
|
+
*/
|
|
1562
|
+
fileName: string
|
|
1563
|
+
}
|
|
1564
|
+
|
|
1565
|
+
/**
|
|
1566
|
+
* 视频转音频请求参数
|
|
1567
|
+
* @since AVideoKit 1.0.1
|
|
1568
|
+
*/
|
|
1569
|
+
export interface VideoToAudioRequestBean {
|
|
1570
|
+
/**
|
|
1571
|
+
* 视频文件地址
|
|
1572
|
+
* @since AVideoKit 1.0.1
|
|
1573
|
+
*/
|
|
1574
|
+
filePath: string
|
|
1575
|
+
}
|
|
1576
|
+
|
|
1577
|
+
/** @since AVideoKit 1.0.1 */
|
|
1578
|
+
export interface AudioFileResponseBean {
|
|
1579
|
+
/**
|
|
1580
|
+
* 音频文件地址
|
|
1581
|
+
* @since AVideoKit 1.0.1
|
|
1582
|
+
*/
|
|
1583
|
+
filePath: string
|
|
1584
|
+
/**
|
|
1585
|
+
* 音频文件总时间
|
|
1586
|
+
* @since AVideoKit 1.0.1
|
|
1587
|
+
*/
|
|
1588
|
+
totalTime: number
|
|
1589
|
+
}
|
|
1590
|
+
|
|
1591
|
+
/**
|
|
1592
|
+
* 截取音频文件中一段时间的音频请求参数
|
|
1593
|
+
* @since AVideoKit 1.0.1
|
|
1594
|
+
*/
|
|
1595
|
+
export interface TrimAudioFileRequestBean {
|
|
1596
|
+
/**
|
|
1597
|
+
* 音频文件地址
|
|
1598
|
+
* @since AVideoKit 1.0.1
|
|
1599
|
+
*/
|
|
1600
|
+
filePath: string
|
|
1601
|
+
/**
|
|
1602
|
+
* 开始时间
|
|
1603
|
+
* @since AVideoKit 1.0.1
|
|
1604
|
+
*/
|
|
1605
|
+
startTime: number
|
|
1606
|
+
/**
|
|
1607
|
+
* 结束时间
|
|
1608
|
+
* @since AVideoKit 1.0.1
|
|
1609
|
+
*/
|
|
1610
|
+
endTime: number
|
|
1611
|
+
}
|
|
1612
|
+
|
|
1613
|
+
/** @since AVideoKit 1.0.1 */
|
|
1614
|
+
export enum CompressionAlgorithm {
|
|
1615
|
+
/**
|
|
1616
|
+
* 不压缩
|
|
1617
|
+
* @since AVideoKit 1.0.1
|
|
1618
|
+
*/
|
|
1619
|
+
NO_Algorithm = 0,
|
|
1620
|
+
|
|
1621
|
+
/**
|
|
1622
|
+
* ima-adpcm算法
|
|
1623
|
+
* @since AVideoKit 1.0.1
|
|
1624
|
+
*/
|
|
1625
|
+
IMA_ADPCM = 1,
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1628
|
+
/**
|
|
1629
|
+
* 压缩音频文件请求参数
|
|
1630
|
+
* @since AVideoKit 1.0.1
|
|
1631
|
+
*/
|
|
1632
|
+
export interface CompressAudioRequestBean {
|
|
1633
|
+
/**
|
|
1634
|
+
* 视频文件地址
|
|
1635
|
+
* @since AVideoKit 1.0.1
|
|
1636
|
+
*/
|
|
1637
|
+
filePath: string
|
|
1638
|
+
/**
|
|
1639
|
+
* 压缩算法 ,目前只支持 IMA-ADPCM
|
|
1640
|
+
* @since AVideoKit 1.0.1
|
|
1641
|
+
* @defaultValue CompressionAlgorithm.NO_Algorithm
|
|
1642
|
+
*/
|
|
1643
|
+
compressType?: CompressionAlgorithm
|
|
1644
|
+
}
|
|
1645
|
+
|
|
1646
|
+
/** @since AVideoKit 1.0.0 */
|
|
1647
|
+
export enum VideoCodecId {
|
|
1648
|
+
/**
|
|
1649
|
+
* unknow
|
|
1650
|
+
* @since AVideoKit 1.0.0
|
|
1651
|
+
*/
|
|
1652
|
+
unknow = -1,
|
|
1653
|
+
|
|
1654
|
+
/**
|
|
1655
|
+
* h264
|
|
1656
|
+
* @since AVideoKit 1.0.0
|
|
1657
|
+
*/
|
|
1658
|
+
h264 = 0,
|
|
1659
|
+
|
|
1660
|
+
/**
|
|
1661
|
+
* h265
|
|
1662
|
+
* @since AVideoKit 1.0.0
|
|
1663
|
+
*/
|
|
1664
|
+
h265 = 1,
|
|
1665
|
+
|
|
1666
|
+
/**
|
|
1667
|
+
* mjpeg
|
|
1668
|
+
* @since AVideoKit 1.0.0
|
|
1669
|
+
*/
|
|
1670
|
+
mjpeg = 2,
|
|
1671
|
+
}
|
|
1672
|
+
|
|
1673
|
+
/** @since AVideoKit 1.0.0 */
|
|
1674
|
+
export interface InitVideoEncoderParams {
|
|
1675
|
+
/**
|
|
1676
|
+
* 编码格式
|
|
1677
|
+
* @since AVideoKit 1.0.0
|
|
1678
|
+
* @defaultValue VideoCodecId.unknow
|
|
1679
|
+
*/
|
|
1680
|
+
codec?: VideoCodecId
|
|
1681
|
+
/**
|
|
1682
|
+
* 宽
|
|
1683
|
+
* @since AVideoKit 1.0.0
|
|
1684
|
+
*/
|
|
1685
|
+
width: number
|
|
1686
|
+
/**
|
|
1687
|
+
* 高
|
|
1688
|
+
* @since AVideoKit 1.0.0
|
|
1689
|
+
*/
|
|
1690
|
+
height: number
|
|
1691
|
+
/**
|
|
1692
|
+
* 帧率
|
|
1693
|
+
* @since AVideoKit 1.0.0
|
|
1694
|
+
*/
|
|
1695
|
+
frameRate: number
|
|
1696
|
+
}
|
|
1697
|
+
|
|
1698
|
+
/** @since AVideoKit 1.0.0 */
|
|
1699
|
+
export enum PixelFormat {
|
|
1700
|
+
/**
|
|
1701
|
+
* unknow
|
|
1702
|
+
* @since AVideoKit 1.0.0
|
|
1703
|
+
*/
|
|
1704
|
+
unknow = -1,
|
|
1705
|
+
|
|
1706
|
+
/**
|
|
1707
|
+
* yuv420p
|
|
1708
|
+
* @since AVideoKit 1.0.0
|
|
1709
|
+
*/
|
|
1710
|
+
yuv420p = 0,
|
|
1711
|
+
|
|
1712
|
+
/**
|
|
1713
|
+
* nv12cl
|
|
1714
|
+
* @since AVideoKit 1.0.0
|
|
1715
|
+
*/
|
|
1716
|
+
nv12 = 1,
|
|
1717
|
+
|
|
1718
|
+
/**
|
|
1719
|
+
* pixelBuffer
|
|
1720
|
+
* @since AVideoKit 1.0.0
|
|
1721
|
+
*/
|
|
1722
|
+
pixelBuffer = 2,
|
|
1723
|
+
}
|
|
1724
|
+
|
|
1725
|
+
/** @since AVideoKit 1.0.0 */
|
|
1726
|
+
export interface EncodeVideoParams {
|
|
1727
|
+
/**
|
|
1728
|
+
* 编码数据
|
|
1729
|
+
* @since AVideoKit 1.0.0
|
|
1730
|
+
*/
|
|
1731
|
+
pixel: number[]
|
|
1732
|
+
/**
|
|
1733
|
+
* 宽
|
|
1734
|
+
* @since AVideoKit 1.0.0
|
|
1735
|
+
*/
|
|
1736
|
+
width: number
|
|
1737
|
+
/**
|
|
1738
|
+
* 高
|
|
1739
|
+
* @since AVideoKit 1.0.0
|
|
1740
|
+
*/
|
|
1741
|
+
height: number
|
|
1742
|
+
/**
|
|
1743
|
+
* 数据格式
|
|
1744
|
+
* @since AVideoKit 1.0.0
|
|
1745
|
+
* @defaultValue PixelFormat.unknow
|
|
1746
|
+
*/
|
|
1747
|
+
pixelFormat?: PixelFormat
|
|
1748
|
+
/**
|
|
1749
|
+
* 时间戳
|
|
1750
|
+
* @since AVideoKit 1.0.0
|
|
1751
|
+
*/
|
|
1752
|
+
timestamp?: number
|
|
1753
|
+
}
|
|
1754
|
+
|
|
1755
|
+
/** @since AVideoKit 1.0.0 */
|
|
1756
|
+
export interface VideoEncodedStreamModel {
|
|
1757
|
+
/**
|
|
1758
|
+
* 数据流
|
|
1759
|
+
* @since AVideoKit 1.0.0
|
|
1760
|
+
*/
|
|
1761
|
+
stream: number[]
|
|
1762
|
+
/**
|
|
1763
|
+
* 数据流长度
|
|
1764
|
+
* @since AVideoKit 1.0.0
|
|
1765
|
+
*/
|
|
1766
|
+
streamLength: number
|
|
1767
|
+
/**
|
|
1768
|
+
* 帧类型
|
|
1769
|
+
* @since AVideoKit 1.0.0
|
|
1770
|
+
*/
|
|
1771
|
+
frameType: number
|
|
1772
|
+
/**
|
|
1773
|
+
* 时间戳
|
|
1774
|
+
* @since AVideoKit 1.0.0
|
|
1775
|
+
*/
|
|
1776
|
+
enctimestamp: number
|
|
1777
|
+
}
|
|
1778
|
+
|
|
1779
|
+
/** @since AVideoKit 1.0.0 */
|
|
1780
|
+
export interface InitVideoDecoderParams {
|
|
1781
|
+
/**
|
|
1782
|
+
* 编码格式
|
|
1783
|
+
* @since AVideoKit 1.0.0
|
|
1784
|
+
* @defaultValue VideoCodecId.unknow
|
|
1785
|
+
*/
|
|
1786
|
+
codecId?: VideoCodecId
|
|
1787
|
+
}
|
|
1788
|
+
|
|
1789
|
+
/** @since AVideoKit 1.0.0 */
|
|
1790
|
+
export interface DecodeVideoParams {
|
|
1791
|
+
/**
|
|
1792
|
+
* 编码数据流
|
|
1793
|
+
* @since AVideoKit 1.0.0
|
|
1794
|
+
*/
|
|
1795
|
+
stream: number[]
|
|
1796
|
+
/**
|
|
1797
|
+
* 数据长度
|
|
1798
|
+
* @since AVideoKit 1.0.0
|
|
1799
|
+
*/
|
|
1800
|
+
length: number
|
|
1801
|
+
}
|
|
1802
|
+
|
|
1803
|
+
/** @since AVideoKit 1.0.0 */
|
|
1804
|
+
export interface VideoDecodedStreamModel {
|
|
1805
|
+
/**
|
|
1806
|
+
* 数据流
|
|
1807
|
+
* @since AVideoKit 1.0.0
|
|
1808
|
+
*/
|
|
1809
|
+
stream: number[]
|
|
1810
|
+
/**
|
|
1811
|
+
* 宽度
|
|
1812
|
+
* @since AVideoKit 1.0.0
|
|
1813
|
+
*/
|
|
1814
|
+
width: number
|
|
1815
|
+
/**
|
|
1816
|
+
* 高度
|
|
1817
|
+
* @since AVideoKit 1.0.0
|
|
1818
|
+
*/
|
|
1819
|
+
height: number
|
|
1820
|
+
/**
|
|
1821
|
+
* 数据格式
|
|
1822
|
+
* @since AVideoKit 1.0.0
|
|
1823
|
+
* @defaultValue PixelFormat.unknow
|
|
1824
|
+
*/
|
|
1825
|
+
pixelFormat?: PixelFormat
|
|
1826
|
+
}
|
|
1827
|
+
}
|