@tarojs/components 3.5.5 → 3.5.6

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 (73) hide show
  1. package/dist/cjs/taro-input-core.cjs.entry.js +24 -3
  2. package/dist/cjs/taro-video-control_3.cjs.entry.js +21 -3
  3. package/dist/collection/components/input/input.js +24 -3
  4. package/dist/collection/components/video/video.js +23 -3
  5. package/dist/collection/utils/json-schema-to-types.js +224 -0
  6. package/dist/esm/taro-input-core.entry.js +24 -3
  7. package/dist/esm/taro-video-control_3.entry.js +21 -3
  8. package/dist/esm-es5/taro-input-core.entry.js +1 -1
  9. package/dist/esm-es5/taro-video-control_3.entry.js +1 -1
  10. package/dist/taro-components/p-0380841f.system.js +1 -1
  11. package/dist/taro-components/p-232ebfae.system.entry.js +1 -0
  12. package/dist/taro-components/{p-7e8943d8.entry.js → p-3744e978.entry.js} +1 -1
  13. package/dist/taro-components/p-56c86512.entry.js +1 -0
  14. package/dist/taro-components/{p-ed8c1bb8.system.entry.js → p-f81a74bb.system.entry.js} +1 -1
  15. package/dist/taro-components/taro-components.esm.js +1 -1
  16. package/dist/types/components/input/input.d.ts +1 -0
  17. package/dist/types/utils/json-schema-to-types.d.ts +25 -0
  18. package/dist-h5/react/components/index.js +5 -5
  19. package/package.json +9 -5
  20. package/types/Ad.d.ts +99 -9
  21. package/types/AdCustom.d.ts +1 -3
  22. package/types/Audio.d.ts +16 -16
  23. package/types/Block.d.ts +0 -2
  24. package/types/Button.d.ts +187 -47
  25. package/types/Camera.d.ts +20 -18
  26. package/types/Canvas.d.ts +52 -13
  27. package/types/Checkbox.d.ts +13 -10
  28. package/types/CheckboxGroup.d.ts +5 -7
  29. package/types/CoverImage.d.ts +44 -5
  30. package/types/CoverView.d.ts +34 -10
  31. package/types/Editor.d.ts +4 -6
  32. package/types/Form.d.ts +23 -7
  33. package/types/FunctionalPageNavigator.d.ts +5 -3
  34. package/types/Icon.d.ts +19 -7
  35. package/types/Image.d.ts +71 -14
  36. package/types/Input.d.ts +44 -33
  37. package/types/Label.d.ts +0 -3
  38. package/types/LivePlayer.d.ts +80 -24
  39. package/types/LivePusher.d.ts +78 -37
  40. package/types/Map.d.ts +208 -66
  41. package/types/MatchMedia.d.ts +8 -10
  42. package/types/MovableArea.d.ts +1 -3
  43. package/types/MovableView.d.ts +88 -30
  44. package/types/NavigationBar.d.ts +0 -2
  45. package/types/Navigator.d.ts +35 -18
  46. package/types/OfficialAccount.d.ts +10 -3
  47. package/types/OpenData.d.ts +35 -6
  48. package/types/PageContainer.d.ts +13 -10
  49. package/types/PageMeta.d.ts +27 -13
  50. package/types/Picker.d.ts +50 -14
  51. package/types/PickerView.d.ts +31 -13
  52. package/types/PickerViewColumn.d.ts +0 -2
  53. package/types/Progress.d.ts +17 -14
  54. package/types/Radio.d.ts +16 -6
  55. package/types/RadioGroup.d.ts +6 -4
  56. package/types/RichText.d.ts +53 -5
  57. package/types/RootPortal.d.ts +2 -1
  58. package/types/ScrollView.d.ts +82 -19
  59. package/types/ShareElement.d.ts +5 -7
  60. package/types/Slider.d.ts +41 -17
  61. package/types/Swiper.d.ts +100 -22
  62. package/types/SwiperItem.d.ts +6 -3
  63. package/types/Switch.d.ts +22 -8
  64. package/types/Text.d.ts +10 -6
  65. package/types/Textarea.d.ts +61 -28
  66. package/types/Video.d.ts +331 -50
  67. package/types/View.d.ts +122 -9
  68. package/types/VoipRoom.d.ts +6 -9
  69. package/types/WebView.d.ts +9 -7
  70. package/types/common.d.ts +1 -1
  71. package/types/index.vue3.d.ts +261 -138
  72. package/dist/taro-components/p-1b356f4d.entry.js +0 -1
  73. package/dist/taro-components/p-a39276ff.system.entry.js +0 -1
package/types/Video.d.ts CHANGED
@@ -1,60 +1,59 @@
1
1
  import { ComponentType } from 'react'
2
2
  import { StandardProps, CommonEventFunction } from './common'
3
-
4
3
  interface VideoProps extends StandardProps {
5
4
  /** 要播放视频的资源地址
6
- * @supported weapp, h5, swan, alipay, tt, rn
5
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
7
6
  */
8
7
  src: string
9
8
 
10
9
  /** 指定视频时长
11
- * @supported weapp, h5, swan, alipay, rn
10
+ * @supported weapp, alipay, qq, h5, rn
12
11
  */
13
12
  duration?: number
14
13
 
15
14
  /** 是否显示默认播放控件(播放/暂停按钮、播放进度、时间)
16
15
  * @default true
17
- * @supported weapp, h5, swan, alipay, tt, rn
16
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
18
17
  */
19
18
  controls?: boolean
20
19
 
21
20
  /** 弹幕列表
22
- * @supported weapp, h5, swan
21
+ * @supported weapp, swan, qq, h5
23
22
  */
24
23
  danmuList?: any[]
25
24
 
26
25
  /** 是否显示弹幕按钮,只在初始化时有效,不能动态变更
27
26
  * @default false
28
- * @supported weapp, h5, swan
27
+ * @supported weapp, swan, qq, h5
29
28
  */
30
29
  danmuBtn?: boolean
31
30
 
32
31
  /** 是否展示弹幕,只在初始化时有效,不能动态变更
33
32
  * @default false
34
- * @supported weapp, h5, swan
33
+ * @supported weapp, swan, qq, h5
35
34
  */
36
35
  enableDanmu?: boolean
37
36
 
38
37
  /** 是否自动播放
39
38
  * @default false
40
- * @supported weapp, h5, swan, alipay, tt, rn
39
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
41
40
  */
42
41
  autoplay?: boolean
43
42
 
44
43
  /** 是否循环播放
45
44
  * @default false
46
- * @supported weapp, h5, swan, alipay, tt, rn
45
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
47
46
  */
48
47
  loop?: boolean
49
48
 
50
49
  /** 是否静音播放
51
50
  * @default false
52
- * @supported weapp, h5, swan, alipay, tt, rn
51
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
53
52
  */
54
53
  muted?: boolean
55
54
 
56
55
  /** 指定视频初始播放位置
57
- * @supported weapp, h5, swan, alipay, tt, rn
56
+ * @supported weapp, alipay, swan, qq, jd, h5, rn
58
57
  */
59
58
  initialTime?: number
60
59
 
@@ -64,59 +63,59 @@ interface VideoProps extends StandardProps {
64
63
  pageGesture?: boolean
65
64
 
66
65
  /** 设置全屏时视频的方向,不指定则根据宽高比自动判断。有效值为 0(正常竖向), 90(屏幕逆时针90度), -90(屏幕顺时针90度)
67
- * @supported weapp, swan, alipay
66
+ * @supported weapp, alipay, swan, tt, qq
68
67
  */
69
68
  direction?: number
70
69
 
71
70
  /** 若不设置,宽度大于240时才会显示
72
71
  * @default true
73
- * @supported weapp, h5, swan, tt
72
+ * @supported weapp, swan, qq, h5
74
73
  */
75
74
  showProgress?: boolean
76
75
 
77
76
  /** 是否显示全屏按钮
78
77
  * @default true
79
- * @supported weapp, h5, swan, alipay, tt
78
+ * @supported weapp, alipay, swan, tt, qq, h5
80
79
  */
81
80
  showFullscreenBtn?: boolean
82
81
 
83
82
  /** 是否显示视频底部控制栏的播放按钮
84
83
  * @default true
85
- * @supported weapp, h5, swan, alipay, tt
84
+ * @supported weapp, alipay, swan, tt, qq, h5
86
85
  */
87
86
  showPlayBtn?: boolean
88
87
 
89
88
  /** 是否显示视频中间的播放按钮
90
89
  * @default true
91
- * @supported weapp, h5, swan, alipay, rn
90
+ * @supported weapp, alipay, swan, qq, h5, rn
92
91
  */
93
92
  showCenterPlayBtn?: boolean
94
93
 
95
94
  /** 是否开启控制进度的手势
96
95
  * @default true
97
- * @supported weapp, h5, swan, alipay, tt
96
+ * @supported weapp, alipay, swan, tt, qq, h5
98
97
  */
99
98
  enableProgressGesture?: boolean
100
99
 
101
100
  /** 当视频大小与 video 容器大小不一致时,视频的表现形式
102
101
  * @default "contain"
103
- * @supported weapp, h5, swan, alipay, tt
102
+ * @supported weapp, alipay, swan, tt, qq, jd, h5
104
103
  */
105
104
  objectFit?: keyof VideoProps.ObjectFit
106
105
 
107
106
  /** 视频封面的图片网络资源地址,如果 controls 属性值为 false 则设置 poster 无效
108
- * @supported weapp, h5, swan, alipay, tt, rn
107
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
109
108
  */
110
109
  poster?: string
111
110
 
112
111
  /** 是否显示静音按钮
113
112
  * @default false
114
- * @supported weapp, h5, tt
113
+ * @supported weapp, alipay, swan, tt, qq, h5
115
114
  */
116
115
  showMuteBtn?: boolean
117
116
 
118
117
  /** 视频的标题,全屏时在顶部展示
119
- * @supported weapp
118
+ * @supported weapp, swan, qq
120
119
  */
121
120
  title?: string
122
121
 
@@ -125,37 +124,37 @@ interface VideoProps extends StandardProps {
125
124
  * - `center`: 视频中间
126
125
  *
127
126
  * @default 'bottom'
128
- * @supported weapp, tt
127
+ * @supported weapp, tt, qq
129
128
  */
130
129
  playBtnPosition?: keyof VideoProps.PlayBtnPosition
131
130
 
132
131
  /** 是否开启播放手势,即双击切换播放/暂停
133
132
  * @default false
134
- * @supported weapp, h5, tt
133
+ * @supported weapp, swan, tt, qq, h5
135
134
  */
136
135
  enablePlayGesture?: boolean
137
136
 
138
137
  /** 当跳转到其它小程序页面时,是否自动暂停本页面的视频
139
138
  * @default true
140
- * @supported weapp
139
+ * @supported weapp, qq
141
140
  */
142
141
  autoPauseIfNavigate?: boolean
143
142
 
144
143
  /** 当跳转到其它微信原生页面时,是否自动暂停本页面的视频
145
144
  * @default true
146
- * @supported weapp
145
+ * @supported weapp, qq
147
146
  */
148
147
  autoPauseIfOpenNative?: boolean
149
148
 
150
149
  /** 在非全屏模式下,是否开启亮度与音量调节手势(同 `page-gesture`)
151
150
  * @default false
152
- * @supported weapp, h5, swan, tt
151
+ * @supported weapp, swan, tt, h5
153
152
  */
154
153
  vslideGesture?: boolean
155
154
 
156
155
  /** 在全屏模式下,是否开启亮度与音量调节手势
157
156
  * @default true
158
- * @supported weapp, h5, tt
157
+ * @supported weapp, swan, tt, h5
159
158
  */
160
159
  vslideGestureInFullscreen?: boolean
161
160
 
@@ -223,59 +222,51 @@ interface VideoProps extends StandardProps {
223
222
  backgroundPoster?: string
224
223
 
225
224
  /** 当开始/继续播放时触发 play 事件
226
- * @supported weapp, h5, swan, alipay, tt, rn
225
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
227
226
  */
228
227
  onPlay?: CommonEventFunction
229
228
 
230
229
  /** 当暂停播放时触发 pause 事件
231
- * @supported weapp, h5, swan, alipay, tt, rn
230
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
232
231
  */
233
232
  onPause?: CommonEventFunction
234
233
 
235
234
  /** 当播放到末尾时触发 ended 事件
236
- * @supported weapp, h5, swan, alipay, tt, rn
235
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
237
236
  */
238
237
  onEnded?: CommonEventFunction
239
238
 
240
239
  /** 播放进度变化时触发, 触发频率 250ms 一次
241
- *
242
- * event.detail = {currentTime, duration}
243
- * @supported weapp, h5, swan, alipay, tt, rn
240
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
244
241
  */
245
242
  onTimeUpdate?: CommonEventFunction<VideoProps.onTimeUpdateEventDetail>
246
243
 
247
244
  /** 当视频进入和退出全屏时触发
248
245
  *
249
- * @supported weapp, h5, swan, alipay, rn, tt
246
+ * @supported h5, rn
250
247
  */
251
248
  onFullscreenChange?: CommonEventFunction<VideoProps.onFullscreenChangeEventDetail>
252
249
 
253
250
  /** 视频出现缓冲时触发
254
251
  *
255
- * @supported weapp, swan, tt
252
+ * @supported weapp, swan, tt, qq, jd
256
253
  */
257
254
  onWaiting?: CommonEventFunction<VideoProps.onWaitingEventDetail>
258
255
 
259
256
  /** 视频播放出错时触发
260
- * @supported weapp, h5, swan, alipay, tt, rn
257
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
261
258
  */
262
259
  onError?: CommonEventFunction
263
260
 
264
261
  /** 加载进度变化时触发,只支持一段加载
265
- * @supported weapp, h5, alipay
262
+ * @supported weapp, tt, qq, h5
266
263
  */
267
264
  onProgress?: CommonEventFunction<VideoProps.onProgressEventDetail>
268
265
 
269
- /** 视频元数据加载完成时触发。event.detail = {width, height, duration}
270
- * @supported weapp, rn, tt
271
- */
272
- onLoadedMetaData?: CommonEventFunction
273
-
274
- /**
275
- * 切换 controls 显示隐藏时触发。event.detail = {show}
276
- * @supported weapp
266
+ /** 视频元数据加载完成时触发
267
+ * @supported weapp, swan, tt, jd, rn
277
268
  */
278
- onControlsToggle?: CommonEventFunction<VideoProps.onControlsToggleEventDetail>
269
+ onLoadedMetaData?: CommonEventFunction<VideoProps.onLoadedMetaDataEventDetail>
279
270
 
280
271
  /**
281
272
  * 播放器进入小窗
@@ -291,7 +282,7 @@ interface VideoProps extends StandardProps {
291
282
 
292
283
  /**
293
284
  * seek 完成时触发
294
- * @supported weapp
285
+ * @supported weapp, tt
295
286
  */
296
287
  onSeekComplete?: CommonEventFunction
297
288
 
@@ -299,50 +290,303 @@ interface VideoProps extends StandardProps {
299
290
  * @supported h5
300
291
  */
301
292
  nativeProps?: Record<string, unknown>
302
- }
303
293
 
294
+ /** 是否展示底部进度条
295
+ * @supported weapp
296
+ */
297
+ showBottomProgress?: string
298
+
299
+ /** 是否在小窗模式下显示播放进度
300
+ * @supported weapp
301
+ */
302
+ pictureInPictureShowProgress?: string
303
+
304
+ /** 格式固定为 https://servicewechat.com/{appid}/{version}/page-frame.html,其中 {appid} 为小程序的 appid,{version} 为小程序的版本号,版本号为 0 表示为开发版、体验版以及审核版本,版本号为 devtools 表示为开发者工具,其余为正式版本;
305
+ * @supported weapp
306
+ */
307
+ referrerPolicy?: 'origin' | 'no-referrer'
308
+
309
+ /** 是否是 DRM 视频源
310
+ * @supported weapp
311
+ */
312
+ isDrm?: string
313
+
314
+ /** DRM 设备身份认证 url,仅 is-drm 为 true 时生效 (Android)
315
+ * @supported weapp
316
+ */
317
+ provisionUrl?: string
318
+
319
+ /** DRM 设备身份认证 url,仅 is-drm 为 true 时生效 (iOS)
320
+ * @supported weapp
321
+ */
322
+ certificateUrl?: string
323
+
324
+ /** DRM 获取加密信息 url,仅 is-drm 为 true 时生效
325
+ * @supported weapp
326
+ */
327
+ licenseUrl?: string
328
+
329
+ /** 视频进入和退出全屏时触发
330
+ * @supported weapp, alipay, swan, tt, qq, jd
331
+ */
332
+ onFullScreenChange?: CommonEventFunction<VideoProps.onFullscreenChangeEventDetail>
333
+
334
+ /** 切换 controls 显示隐藏时触发。
335
+ * @supported weapp
336
+ */
337
+ onControlsToggle?: CommonEventFunction<VideoProps.onControlsToggleEventDetail>
338
+
339
+ /** 内联样式。
340
+ * @supported alipay
341
+ */
342
+ style?: string
343
+
344
+ /** 外部样式名。
345
+ * @supported alipay
346
+ */
347
+ class?: string
348
+
349
+ /** 当 poster 高宽比跟视频高宽不匹配时,如何显示 poster,设置规则同 background-size 一致。
350
+ * @supported alipay
351
+ */
352
+ posterSize?: string
353
+
354
+ /** 当底部工具条隐藏时,是否显示细进度条(controls=false 时设置无效)。
355
+ * 版本要求: 基础库 1.15.0 及以上
356
+ * @supported alipay
357
+ */
358
+ showThinProgressBar?: string
359
+
360
+ /** 移动网络提醒样式。
361
+ *
362
+ * 0 - 不提醒
363
+ * 1 - tip 提醒
364
+ * 2 - 阻塞提醒(无消耗流量大小)
365
+ * 3 - 阻塞提醒(有消耗流量大小提醒)
366
+ *
367
+ * 版本要求: 基础库 1.13.0 及以上
368
+ * @supported alipay, jd
369
+ */
370
+ mobilenetHintType?: string
371
+
372
+ /** 视频出现缓冲时触发。
373
+ * @supported alipay
374
+ */
375
+ onLoading?: CommonEventFunction
376
+
377
+ /** 点击视频 view 时触发
378
+ * @supported alipay
379
+ */
380
+ onTap?: CommonEventFunction<VideoProps.onTapEventDetail>
381
+
382
+ /** 用户操作事件
383
+ * @supported alipay
384
+ */
385
+ onUserAction?: CommonEventFunction<VideoProps.onUserActionEventDetail>
386
+
387
+ /** 视频播放终止。
388
+ * 版本要求: 基础库 1.9.0 及以上
389
+ * @supported alipay
390
+ */
391
+ onStop?: CommonEventFunction
392
+
393
+ /** 当视频加载完真正开始播放时触发。
394
+ * 版本要求: 基础库 1.13.6 及以上
395
+ * @supported alipay
396
+ */
397
+ onRenderStart?: CommonEventFunction
398
+
399
+ /** 浮窗设置。暂时不支持全局浮窗。
400
+ * 可选值:
401
+ *
402
+ * none:无浮窗。
403
+ * page:页面内浮窗。
404
+ * 版本要求:基础库 1.24.6 及以上
405
+ * @supported alipay
406
+ */
407
+ floatingMode?: string
408
+
409
+ /** 非 wifi 环境下是否显示继续播放浮层
410
+ * @supported swan
411
+ */
412
+ showNoWifiTip?: string
413
+
414
+ /** 全屏模式下,是否显示锁屏按钮
415
+ * @supported swan
416
+ */
417
+ showLockBtn?: string
418
+
419
+ /** 是否显示倍速播放按钮
420
+ * @supported swan
421
+ */
422
+ showRateBtn?: string
423
+
424
+ /** 全屏模式下,是否显示侧边栏控制按钮
425
+ * @supported swan
426
+ */
427
+ showVslideBtnInFullscreen?: string
428
+
429
+ /** 是否进入无声视频模式,进入无声视频模式后,视频将静音播放且不响应系统物理音量变化,点击播放器提示无声视频,手势调节失效
430
+ * @supported swan
431
+ */
432
+ silentPlay?: string
433
+
434
+ /** 前贴广告的 unit id
435
+ * @supported tt
436
+ */
437
+ preRollUnitId?: string
438
+
439
+ /** 后贴广告的 unit id
440
+ * @supported tt
441
+ */
442
+ postRollUnitId?: string
443
+
444
+ /** 是否显示倍速控件,点击倍速控件后可选择倍速,可选值: 0.75/1.0/1.25/1.5/2
445
+ * @supported tt
446
+ */
447
+ showPlaybackRateBtn?: string
448
+
449
+ /** video 播放时宿主退出后台后开启小窗播放,iOS 14 及以上版本支持。开启时首次退出后台后给予弹窗提示用户授权,授权完成后可以到小程序「设置」中重设。支持场景见后台小窗播放
450
+ * @supported tt
451
+ */
452
+ enablePlayInBackground?: string
453
+
454
+ /** 设置署名水印
455
+ * @supported tt
456
+ */
457
+ signature?: string
458
+
459
+ /** 贴片广告开始播放时触发
460
+ * @supported tt
461
+ */
462
+ onAdStart?: CommonEventFunction<VideoProps.onAdTypeCommonEventDetail>
463
+
464
+ /** 贴片广告播放结束时触发
465
+ * @supported tt
466
+ */
467
+ onAdEnded?: CommonEventFunction<VideoProps.onAdTypeCommonEventDetail>
468
+
469
+ /** 贴片广告非自然结束时触发,如:用户关闭广告或广告播放过程中 video 组件被销毁
470
+ * @supported tt
471
+ */
472
+ onAdClose?: CommonEventFunction<VideoProps.onAdTypeCommonEventDetail>
473
+
474
+ /** 贴片广告加载失败时触发
475
+ * @supported tt
476
+ */
477
+ onAdError?: CommonEventFunction<VideoProps.onAdTypeCommonEventDetail>
478
+
479
+ /** 视频倍速改变完成时触发。返回改变后的倍速值
480
+ * @supported tt
481
+ */
482
+ onPlayBackRateChange?: CommonEventFunction<{ playbackRate: string }>
483
+
484
+ /** 静音状态改变完成时触发。返回当前是否静音
485
+ * @supported tt
486
+ */
487
+ onMuteChange?: CommonEventFunction<{ isMuted: boolean }>
488
+
489
+ /** 点击控件时触发。返回当前点击的控件类型
490
+ * @supported tt
491
+ */
492
+ onControlTap?: CommonEventFunction<{ controlType }>
493
+
494
+ /** 进入小窗播放时触发
495
+ * @supported tt
496
+ */
497
+ onEnterBackground?: CommonEventFunction
498
+
499
+ /** 关闭小窗播放时触发
500
+ * @supported tt
501
+ */
502
+ onCloseBackground?: CommonEventFunction
503
+
504
+ /** 离开小窗进入 app 事件时触发
505
+ * @supported tt
506
+ */
507
+ onLeaveBackground?: CommonEventFunction
508
+
509
+ /** 否
510
+ * @supported jd
511
+ */
512
+ onLoadedData?: CommonEventFunction
513
+
514
+ /** 否
515
+ * @supported jd
516
+ */
517
+ onLoadStart?: CommonEventFunction
518
+
519
+ /** 否
520
+ * @supported jd
521
+ */
522
+ onSeeked?: CommonEventFunction
523
+
524
+ /** 否
525
+ * @supported jd
526
+ */
527
+ onSeeking?: CommonEventFunction
528
+
529
+ /** 指定码率上界,单位为比特每秒
530
+ * @supported weapp
531
+ */
532
+ preferredPeakBitRate?: number
533
+
534
+ /** 贴片广告加载成功时触发,event.detail = { adType: 'preRollAd' | 'postRollAd' }
535
+ * @supported tt
536
+ */
537
+ onAdLoad?: CommonEventFunction
538
+ }
304
539
  declare namespace VideoProps {
305
540
  /** direction 的合法值 */
306
541
  interface direction {
307
542
  /** 正常竖向 */
308
543
  0
544
+
309
545
  /** 屏幕逆时针90度 */
310
546
  90
547
+
311
548
  /** 屏幕顺时针90度 */
312
549
  '-90'
313
550
  }
551
+
314
552
  /** objectFit 的合法值 */
315
553
  interface ObjectFit {
316
554
  /** 包含 */
317
555
  contain
556
+
318
557
  /** 填充 */
319
558
  fill
559
+
320
560
  /** 覆盖 */
321
561
  cover
322
562
  }
563
+
323
564
  /** playBtnPosition 的合法值 */
324
565
  interface PlayBtnPosition {
325
566
  /** controls bar上 */
326
567
  bottom
568
+
327
569
  /** 视频中间 */
328
570
  center
329
571
  }
330
-
331
572
  interface onTimeUpdateEventDetail {
332
573
  /** 当前时间 */
333
574
  currentTime: number
575
+
334
576
  /** 持续时间 */
335
577
  duration: number
336
578
  }
337
579
  interface onFullscreenChangeEventDetail {
338
580
  /** 方向 */
339
581
  direction: 'vertical' | 'horizontal'
582
+
340
583
  /** 全屏 */
341
584
  fullScreen: number | boolean
342
585
  }
343
586
  interface onWaitingEventDetail {
344
587
  /** 方向 */
345
588
  direction: 'vertical' | 'horizontal'
589
+
346
590
  /** 全屏 */
347
591
  fullScreen: number | boolean
348
592
  }
@@ -350,11 +594,49 @@ declare namespace VideoProps {
350
594
  /** 百分比 */
351
595
  buffered: number
352
596
  }
597
+ interface onLoadedMetaDataEventDetail {
598
+ /** 视频宽度 */
599
+ width: number
600
+
601
+ /** 视频高度 */
602
+ height: number
353
603
 
604
+ /** 持续时间 */
605
+ duration: number
606
+ }
354
607
  interface onControlsToggleEventDetail {
355
608
  /** 是否显示 */
356
609
  show: boolean
357
610
  }
611
+ interface onTapEventDetail {
612
+ ptInView: {
613
+ x: number
614
+ y: number
615
+ }
616
+ }
617
+ interface onUserActionEventDetail {
618
+ /** 用户操作的元素 */
619
+ tag: keyof UserActionTag | string
620
+ value: number
621
+ }
622
+ interface UserActionTag {
623
+ /** 底部播放按钮 */
624
+ play
625
+ /** 中心播放按钮 */
626
+ centerplay
627
+ /** 静音按钮 */
628
+ mute
629
+ /** 全屏按钮 */
630
+ fullscreen
631
+ /** 重试按钮 */
632
+ retry
633
+ /** 网络提醒的播放按钮 */
634
+ mobilenetplay
635
+ }
636
+ interface onAdTypeCommonEventDetail {
637
+ /** 广告类型 */
638
+ adType: 'preRollAd' | 'postRollAd'
639
+ }
358
640
  }
359
641
 
360
642
  /** 视频。相关api:Taro.createVideoContext
@@ -405,5 +687,4 @@ declare namespace VideoProps {
405
687
  * @see https://developers.weixin.qq.com/miniprogram/dev/component/video.html
406
688
  */
407
689
  declare const Video: ComponentType<VideoProps>
408
-
409
690
  export { Video, VideoProps }