@tarojs/taro 3.4.0-beta.2 → 3.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/package.json +5 -7
  2. package/types/api/ai/face.d.ts +133 -0
  3. package/types/api/ai/visionkit.d.ts +303 -0
  4. package/types/api/base/crypto.d.ts +90 -0
  5. package/types/api/base/debug.d.ts +152 -13
  6. package/types/api/base/env.d.ts +2 -1
  7. package/types/api/base/index.d.ts +10 -2
  8. package/types/api/base/performance.d.ts +195 -0
  9. package/types/api/base/system.d.ts +539 -101
  10. package/types/api/base/update.d.ts +59 -7
  11. package/types/api/base/weapp/app-event.d.ts +49 -26
  12. package/types/api/base/weapp/life-cycle.d.ts +141 -1
  13. package/types/api/canvas/index.d.ts +171 -136
  14. package/types/api/cloud/index.d.ts +2 -2
  15. package/types/api/device/accelerometer.d.ts +3 -3
  16. package/types/api/device/accessibility.d.ts +26 -0
  17. package/types/api/device/battery.d.ts +2 -2
  18. package/types/api/device/{ble.d.ts → bluetooth-ble.d.ts} +228 -62
  19. package/types/api/device/bluetooth-peripheral.d.ts +430 -0
  20. package/types/api/device/bluetooth.d.ts +67 -2
  21. package/types/api/device/calendar.d.ts +88 -0
  22. package/types/api/device/contact.d.ts +74 -50
  23. package/types/api/device/gyroscope.d.ts +5 -5
  24. package/types/api/device/iBeacon.d.ts +33 -19
  25. package/types/api/{ui → device}/keyboard.d.ts +0 -0
  26. package/types/api/device/{performance.d.ts → memory.d.ts} +4 -4
  27. package/types/api/device/motion.d.ts +3 -3
  28. package/types/api/device/network.d.ts +53 -12
  29. package/types/api/device/nfc.d.ts +1089 -13
  30. package/types/api/device/scan.d.ts +1 -1
  31. package/types/api/device/screen.d.ts +40 -12
  32. package/types/api/device/wifi.d.ts +41 -6
  33. package/types/api/files/index.d.ts +371 -184
  34. package/types/api/location/index.d.ts +116 -55
  35. package/types/api/media/audio.d.ts +653 -60
  36. package/types/api/media/background-audio.d.ts +47 -41
  37. package/types/api/media/camera.d.ts +38 -19
  38. package/types/api/media/editor.d.ts +22 -2
  39. package/types/api/media/image.d.ts +54 -105
  40. package/types/api/media/live.d.ts +66 -6
  41. package/types/api/media/map.d.ts +469 -49
  42. package/types/api/media/media-recorder.d.ts +92 -0
  43. package/types/api/media/recorder.d.ts +20 -20
  44. package/types/api/media/video-decoder.d.ts +117 -0
  45. package/types/api/media/video-processing.d.ts +11 -7
  46. package/types/api/media/video.d.ts +327 -39
  47. package/types/api/media/voip.d.ts +290 -0
  48. package/types/api/{open-api/navigate.d.ts → navigate/index.d.ts} +63 -27
  49. package/types/api/network/download.d.ts +39 -16
  50. package/types/api/network/request.d.ts +143 -38
  51. package/types/api/network/tcp.d.ts +181 -0
  52. package/types/api/network/udp.d.ts +154 -83
  53. package/types/api/network/upload.d.ts +41 -25
  54. package/types/api/network/websocket.d.ts +16 -15
  55. package/types/api/open-api/authorize.d.ts +41 -2
  56. package/types/api/open-api/channels.d.ts +178 -0
  57. package/types/api/open-api/customer-service.d.ts +1 -1
  58. package/types/api/open-api/facial.d.ts +3 -0
  59. package/types/api/open-api/favorites.d.ts +100 -0
  60. package/types/api/open-api/group.d.ts +59 -0
  61. package/types/api/open-api/invoice.d.ts +2 -2
  62. package/types/api/open-api/license-plate.d.ts +27 -0
  63. package/types/api/open-api/login.d.ts +21 -0
  64. package/types/api/open-api/redpackage.d.ts +24 -0
  65. package/types/api/open-api/settings.d.ts +76 -14
  66. package/types/api/open-api/soter.d.ts +2 -2
  67. package/types/api/open-api/subscribe-message.d.ts +88 -3
  68. package/types/api/open-api/user-info.d.ts +55 -18
  69. package/types/api/open-api/werun.d.ts +33 -6
  70. package/types/api/payment/index.d.ts +119 -0
  71. package/types/api/route/index.d.ts +13 -9
  72. package/types/api/share/index.d.ts +192 -9
  73. package/types/api/storage/index.d.ts +29 -83
  74. package/types/api/swan/index.d.ts +1 -1
  75. package/types/api/ui/animation.d.ts +84 -70
  76. package/types/api/ui/background.d.ts +4 -2
  77. package/types/api/ui/custom-component.d.ts +1 -1
  78. package/types/api/ui/fonts.d.ts +27 -31
  79. package/types/api/ui/navigation-bar.d.ts +1 -0
  80. package/types/api/ui/scroll.d.ts +73 -7
  81. package/types/api/ui/sticky.d.ts +4 -4
  82. package/types/api/ui/tab-bar.d.ts +7 -7
  83. package/types/api/ui/window.d.ts +22 -2
  84. package/types/api/worker/index.d.ts +9 -1
  85. package/types/api/wxml/index.d.ts +143 -105
  86. package/types/compile.d.ts +111 -106
  87. package/types/global.d.ts +142 -111
  88. package/types/taro.api.d.ts +79 -62
  89. package/types/taro.component.d.ts +82 -60
  90. package/types/taro.config.d.ts +174 -170
  91. package/types/taro.extend.d.ts +0 -17
  92. package/types/taro.hooks.d.ts +12 -12
  93. package/types/taro.lifecycle.d.ts +7 -0
  94. package/h5.js +0 -4
  95. package/types/api/open-api/payment.d.ts +0 -61
@@ -14,87 +14,135 @@ declare module '../../index' {
14
14
  }
15
15
  }
16
16
 
17
- namespace chooseVideo {
17
+ namespace openVideoEditor {
18
18
  interface Option {
19
- /** 默认拉起的是前置或者后置摄像头。部分 Android 手机下由于系统 ROM 不支持无法生效 */
20
- camera?: keyof camera
21
- /** 接口调用结束的回调函数(调用成功、失败都会执行) */
22
- complete?: (res: TaroGeneral.CallbackResult) => void
23
- /** 是否压缩所选择的视频文件 */
24
- compressed?: boolean
19
+ /** 视频源的路径,只支持本地路径 */
20
+ filePath: string
21
+ /** 接口调用成功的回调函数 */
22
+ success?: (result: SuccessCallbackResult) => void
25
23
  /** 接口调用失败的回调函数 */
26
24
  fail?: (res: TaroGeneral.CallbackResult) => void
27
- /** 拍摄视频最长拍摄时间,单位秒 */
28
- maxDuration?: number
29
- /** 视频选择的来源 */
30
- sourceType?: Array<keyof sourceType>
25
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
26
+ complete?: (res: TaroGeneral.CallbackResult) => void
27
+ }
28
+ interface SuccessCallbackResult extends TaroGeneral.CallbackResult {
29
+ /** 剪辑后生成的视频文件的时长,单位毫秒(ms) */
30
+ duration: number
31
+ /** 剪辑后生成的视频文件大小,单位字节数(byte) */
32
+ size: number
33
+ /** 编辑后生成的视频文件的临时路径 */
34
+ tempFilePath: string
35
+ /** 编辑后生成的缩略图文件的临时路径 */
36
+ tempThumbPath: string
37
+ }
38
+ }
39
+
40
+ namespace getVideoInfo {
41
+ interface Option {
42
+ /** 视频文件路径,可以是临时文件路径也可以是永久文件路径 */
43
+ src: string
31
44
  /** 接口调用成功的回调函数 */
32
45
  success?: (result: SuccessCallbackResult) => void
46
+ /** 接口调用失败的回调函数 */
47
+ fail?: (res: TaroGeneral.CallbackResult) => void
48
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
49
+ complete?: (res: TaroGeneral.CallbackResult) => void
33
50
  }
34
51
  interface SuccessCallbackResult extends TaroGeneral.CallbackResult {
35
- /** 选定视频的时间长度 */
52
+ /** 画面方向 */
53
+ orientation: keyof Orientation
54
+ /** 视频格式 */
55
+ type: string
56
+ /** 视频长度 */
36
57
  duration: number
37
- /** 返回选定视频的高度 */
38
- height: number
39
- /** 选定视频的数据量大小 */
58
+ /** 视频大小,单位 kB */
40
59
  size: number
41
- /** 选定视频的临时文件路径 */
42
- tempFilePath: string
43
- /** 返回选定视频的宽度 */
60
+ /** 视频的长,单位 px */
61
+ height: number
62
+ /** 视频的宽,单位 px */
44
63
  width: number
45
- /** 调用结果 */
46
- errMsg: string
64
+ /** 视频帧率 */
65
+ fps: number
66
+ /** 视频码率,单位 kbps */
67
+ bitrate: number
47
68
  }
48
- interface camera {
49
- /** 默认拉起后置摄像头 */
50
- back
51
- /** 默认拉起前置摄像头 */
52
- front
53
- }
54
- interface sourceType {
55
- /** 从相册选择视频 */
56
- album
57
- /** 使用相机拍摄视频 */
58
- camera
69
+ interface Orientation {
70
+ /** 默认 */
71
+ up
72
+ /** 180 度旋转 */
73
+ down
74
+ /** 逆时针旋转 90 度 */
75
+ left
76
+ /** 顺时针旋转 90 度 */
77
+ right
78
+ /** up,但水平翻转 */
79
+ 'up-mirrored'
80
+ /** 同 down,但水平翻转 */
81
+ 'down-mirrored'
82
+ /** 同 left,但垂直翻转 */
83
+ 'left-mirrored'
84
+ /** 同 right,但垂直翻转 */
85
+ 'right-mirrored'
59
86
  }
60
87
  }
61
88
 
89
+ /** VideoContext 实例,可通过 [Taro.createVideoContext](./createVideoContext) 获取。
90
+ *
91
+ * VideoContext 通过 id 跟一个 video 组件绑定,操作对应的 video 组件。
92
+ * @supported weapp, h5, rn
93
+ * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/video/VideoContext.html
94
+ */
62
95
  interface VideoContext {
96
+ /** 退出后台音频播放模式。
97
+ * @supported weapp
98
+ * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/video/VideoContext.exitBackgroundPlayback.html
99
+ */
100
+ exitBackgroundPlayback(): void
63
101
  /** 退出全屏
64
- * @supported weapp, h5
102
+ * @supported weapp, h5, rn
65
103
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/video/VideoContext.exitFullScreen.html
66
104
  */
67
105
  exitFullScreen(): void
106
+ /** 退出小窗,该方法可在任意页面调用
107
+ * @supported weapp
108
+ * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/video/VideoContext.exitPictureInPicture.html
109
+ */
110
+ exitPictureInPicture(option: VideoContext.ExitPictureInPictureOption): void
68
111
  /** 隐藏状态栏,仅在iOS全屏下有效
69
112
  * @supported weapp
70
113
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/video/VideoContext.hideStatusBar.html
71
114
  */
72
115
  hideStatusBar(): void
73
116
  /** 暂停视频
74
- * @supported weapp, h5
117
+ * @supported weapp, h5, rn
75
118
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/video/VideoContext.pause.html
76
119
  */
77
120
  pause(): void
78
121
  /** 播放视频
79
- * @supported weapp, h5
122
+ * @supported weapp, h5, rn
80
123
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/video/VideoContext.play.html
81
124
  */
82
125
  play(): void
83
126
  /** 设置倍速播放
84
- * @supported weapp
127
+ * @supported weapp, h5, rn
85
128
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/video/VideoContext.playbackRate.html
86
129
  */
87
130
  playbackRate(
88
131
  /** 倍率,支持 0.5/0.8/1.0/1.25/1.5,2.6.3 起支持 2.0 倍速 */
89
132
  rate: number,
90
133
  ): void
134
+ /** 进入后台音频播放模式。
135
+ * @supported weapp
136
+ * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/video/VideoContext.requestBackgroundPlayback.html
137
+ */
138
+ requestBackgroundPlayback(): void
91
139
  /** 进入全屏
92
- * @supported weapp, h5
140
+ * @supported weapp, h5, rn
93
141
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/video/VideoContext.requestFullScreen.html
94
142
  */
95
143
  requestFullScreen(option: VideoContext.RequestFullScreenOption): void
96
144
  /** 跳转到指定位置
97
- * @supported weapp, h5
145
+ * @supported weapp, h5, rn
98
146
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/video/VideoContext.seek.html
99
147
  */
100
148
  seek(
@@ -115,13 +163,21 @@ declare module '../../index' {
115
163
  */
116
164
  showStatusBar(): void
117
165
  /** 停止视频
118
- * @supported weapp, h5
166
+ * @supported weapp, h5, rn
119
167
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/video/VideoContext.stop.html
120
168
  */
121
169
  stop(): void
122
170
  }
123
171
 
124
172
  namespace VideoContext {
173
+ interface ExitPictureInPictureOption {
174
+ /** 接口调用成功的回调函数 */
175
+ success?: (result: TaroGeneral.CallbackResult) => void
176
+ /** 接口调用失败的回调函数 */
177
+ fail?: (res: TaroGeneral.CallbackResult) => void
178
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
179
+ complete?: (res: TaroGeneral.CallbackResult) => void
180
+ }
125
181
  interface RequestFullScreenOption {
126
182
  /** 设置全屏时视频的方向,不指定则根据宽高比自动判断。
127
183
  *
@@ -140,6 +196,147 @@ declare module '../../index' {
140
196
  }
141
197
  }
142
198
 
199
+ namespace compressVideo {
200
+ interface Option {
201
+ /** 视频文件路径,可以是临时文件路径也可以是永久文件路径 */
202
+ src: string
203
+ /** 压缩质量 */
204
+ quality: keyof Quality
205
+ /** 码率,单位 kbps */
206
+ bitrate: number
207
+ /** 帧率 */
208
+ fps: number
209
+ /** 相对于原视频的分辨率比例,取值范围(0, 1] */
210
+ resolution: number
211
+ /** 接口调用成功的回调函数 */
212
+ success?: (result: SuccessCallbackResult) => void
213
+ /** 接口调用失败的回调函数 */
214
+ fail?: (res: TaroGeneral.CallbackResult) => void
215
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
216
+ complete?: (res: TaroGeneral.CallbackResult) => void
217
+ }
218
+ interface SuccessCallbackResult extends TaroGeneral.CallbackResult {
219
+ /** 压缩后的临时文件地址 */
220
+ tempFilePath: string
221
+ /** 压缩后的大小,单位 kB */
222
+ size: number
223
+ }
224
+ interface Quality {
225
+ /** 低 */
226
+ low
227
+ /** 中 */
228
+ medium
229
+ /** 高 */
230
+ high
231
+ }
232
+ }
233
+
234
+ namespace chooseVideo {
235
+ interface Option {
236
+ /** 默认拉起的是前置或者后置摄像头。部分 Android 手机下由于系统 ROM 不支持无法生效 */
237
+ camera?: keyof Camera
238
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
239
+ complete?: (res: TaroGeneral.CallbackResult) => void
240
+ /** 是否压缩所选择的视频文件 */
241
+ compressed?: boolean
242
+ /** 接口调用失败的回调函数 */
243
+ fail?: (res: TaroGeneral.CallbackResult) => void
244
+ /** 拍摄视频最长拍摄时间,单位秒 */
245
+ maxDuration?: number
246
+ /** 视频选择的来源 */
247
+ sourceType?: Array<keyof sourceType>
248
+ /** 接口调用成功的回调函数 */
249
+ success?: (result: SuccessCallbackResult) => void
250
+ }
251
+ interface SuccessCallbackResult extends TaroGeneral.CallbackResult {
252
+ /** 选定视频的时间长度 */
253
+ duration: number
254
+ /** 返回选定视频的高度 */
255
+ height: number
256
+ /** 选定视频的数据量大小 */
257
+ size: number
258
+ /** 选定视频的临时文件路径 */
259
+ tempFilePath: string
260
+ /** 返回选定视频的宽度 */
261
+ width: number
262
+ /** 调用结果 */
263
+ errMsg: string
264
+ }
265
+ interface Camera {
266
+ /** 默认拉起后置摄像头 */
267
+ back
268
+ /** 默认拉起前置摄像头 */
269
+ front
270
+ }
271
+ interface sourceType {
272
+ /** 从相册选择视频 */
273
+ album
274
+ /** 使用相机拍摄视频 */
275
+ camera
276
+ }
277
+ }
278
+
279
+
280
+ namespace chooseMedia {
281
+ interface Option {
282
+ /** 最多可以选择的文件个数 */
283
+ count?: number
284
+ /** 文件类型 */
285
+ mediaType?: Array<keyof mediaType>
286
+ /** 图片和视频选择的来源 */
287
+ sourceType?: Array<keyof sourceType>
288
+ /** 拍摄视频最长拍摄时间,单位秒。时间范围为 3s 至 30s 之间 */
289
+ maxDuration?: number
290
+ /** 仅对 mediaType 为 image 时有效,是否压缩所选文件 */
291
+ sizeType?: Array<'original' | 'compressed'>
292
+ /** 仅在 sourceType 为 camera 时生效,使用前置或后置摄像头 */
293
+ camera?: string
294
+ /** 接口调用失败的回调函数 */
295
+ fail?: (res: TaroGeneral.CallbackResult) => void
296
+ /** 接口调用成功的回调函数 */
297
+ success?: (result: SuccessCallbackResult) => void
298
+ }
299
+ interface SuccessCallbackResult extends TaroGeneral.CallbackResult {
300
+ /** 本地临时文件列表 */
301
+ tempFiles: ChooseMedia[]
302
+ /** 文件类型,有效值有 image 、video */
303
+ type: string
304
+ }
305
+ /** 本地临时文件列表 */
306
+ interface ChooseMedia {
307
+ /** 本地临时文件路径 (本地路径) */
308
+ tempFilePath: string
309
+ /** 本地临时文件大小,单位 B */
310
+ size: number
311
+ /** 视频的时间长度 */
312
+ duration: number
313
+ /** 视频的高度 */
314
+ height: number
315
+ /** 视频的宽度 */
316
+ width: number
317
+ /** 视频缩略图临时文件路径 */
318
+ thumbTempFilePath: string
319
+ }
320
+ interface mediaType {
321
+ /** 只能拍摄视频或从相册选择视频 */
322
+ video
323
+ /** 只能拍摄图片或从相册选择图片 */
324
+ image
325
+ }
326
+ interface sourceType {
327
+ /** 从相册选择 */
328
+ album
329
+ /** 使用相机拍摄 */
330
+ camera
331
+ }
332
+ interface camera {
333
+ /** 使用后置摄像头 */
334
+ back
335
+ /** 使用前置摄像头 */
336
+ front
337
+ }
338
+ }
339
+
143
340
  interface TaroStatic {
144
341
  /**
145
342
  * 保存视频到系统相册。支持mp4视频格式。需要[用户授权](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/authorize.html) scope.writePhotosAlbum
@@ -161,8 +358,48 @@ declare module '../../index' {
161
358
  */
162
359
  saveVideoToPhotosAlbum(option: saveVideoToPhotosAlbum.Option): Promise<TaroGeneral.CallbackResult>
163
360
 
361
+ /** 打开视频编辑器
362
+ * @supported weapp
363
+ * @example
364
+ * ```tsx
365
+ * Taro.openVideoEditor({
366
+ * filePath: ''
367
+ * })
368
+ * ```
369
+ * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/video/wx.openVideoEditor.html
370
+ */
371
+ openVideoEditor(option: openVideoEditor.Option): Promise<openVideoEditor.SuccessCallbackResult>
372
+
373
+ /** 获取视频详细信息
374
+ * @supported weapp
375
+ * @example
376
+ * ```tsx
377
+ * Taro.downloadFile({
378
+ * url: 'https://mock.taro.org/mock_video.mp4',
379
+ * success(res) {
380
+ * Taro.getVideoInfo({
381
+ * src: res.tempFilePath,
382
+ * success (res) {
383
+ * console.log('获取文件地址成功')
384
+ * console.log(res)
385
+ * },
386
+ * fail (res) {
387
+ * console.log('获取文件地址失败')
388
+ * console.log(res)
389
+ * },
390
+ * complete (res) {
391
+ * console.log('获取文件地址')
392
+ * }
393
+ * })
394
+ * }
395
+ * })
396
+ * ```
397
+ * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/video/wx.getVideoInfo.html
398
+ */
399
+ getVideoInfo(option: getVideoInfo.Option): Promise<getVideoInfo.SuccessCallbackResult>
400
+
164
401
  /** 创建 video 上下文 VideoContext 对象。
165
- * @supported weapp, h5
402
+ * @supported weapp, h5, rn
166
403
  * @example
167
404
  * ```tsx
168
405
  * videoContext = Taro.createVideoContext('myVideo')
@@ -176,6 +413,37 @@ declare module '../../index' {
176
413
  component?: TaroGeneral.IAnyObject,
177
414
  ): VideoContext
178
415
 
416
+ /** 压缩视频接口。
417
+ * 开发者可指定压缩质量 `quality` 进行压缩。当需要更精细的控制时,可指定 `bitrate`、`fps`、和 `resolution`,当 `quality` 传入时,这三个参数将被忽略。原视频的相关信息可通过 [getVideoInfo](/docs/apis/media/video/getVideoInfo) 获取。
418
+ * @supported weapp
419
+ * @example
420
+ * ```tsx
421
+ * Taro.chooseVideo({
422
+ * sourceType: ['album', 'camera'],
423
+ * maxDuration: 60,
424
+ * camera: 'back',
425
+ * compressed: false,
426
+ * success (res) {
427
+ * Taro.compressVideo({
428
+ * src: res.tempFilePath,
429
+ * quality: quality,
430
+ * bitrate: 1032,
431
+ * fps: 24,
432
+ * resolution:0.5,
433
+ * success (res) {
434
+ * console.log("压缩成功")
435
+ * },
436
+ * fail (err) {
437
+ * console.log("压缩失败")
438
+ * }
439
+ * })
440
+ * }
441
+ * })
442
+ * ```
443
+ * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/video/wx.compressVideo.html
444
+ */
445
+ compressVideo(option: compressVideo.Option): Promise<compressVideo.SuccessCallbackResult>
446
+
179
447
  /** 拍摄视频或从手机相册中选视频。
180
448
  * @supported weapp, rn
181
449
  * @example
@@ -192,5 +460,25 @@ declare module '../../index' {
192
460
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/video/wx.chooseVideo.html
193
461
  */
194
462
  chooseVideo(option: chooseVideo.Option): Promise<chooseVideo.SuccessCallbackResult>
463
+
464
+ /** 拍摄或从手机相册中选择图片或视频。
465
+ * @supported weapp, rn
466
+ * @example
467
+ * ```tsx
468
+ * Taro.chooseMedia({
469
+ * count: 9,
470
+ * mediaType: ['image','video'],
471
+ * sourceType: ['album', 'camera'],
472
+ * maxDuration: 30,
473
+ * camera: 'back',
474
+ * success: (res) => {
475
+ * console.log(res.tempFiles)
476
+ * console.log(res.type)
477
+ * }
478
+ * })
479
+ * ```
480
+ * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/video/wx.chooseMedia.html
481
+ */
482
+ chooseMedia(option: chooseMedia.Option): Promise<chooseMedia.SuccessCallbackResult>
195
483
  }
196
484
  }