@tarojs/components 3.6.2 → 3.6.4

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 (205) hide show
  1. package/LICENSE +21 -0
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/taro-components.cjs.js +1 -1
  4. package/dist/cjs/taro-grid-view-core.cjs.entry.js +21 -0
  5. package/dist/cjs/taro-input-core.cjs.entry.js +1 -1
  6. package/dist/cjs/taro-list-view-core.cjs.entry.js +21 -0
  7. package/dist/cjs/taro-picker-core_2.cjs.entry.js +1 -1
  8. package/dist/cjs/taro-sticky-header-core.cjs.entry.js +21 -0
  9. package/dist/cjs/taro-sticky-section-core.cjs.entry.js +21 -0
  10. package/dist/cjs/taro-swiper-core_2.cjs.entry.js +28 -18
  11. package/dist/cjs/taro-textarea-core.cjs.entry.js +13 -3
  12. package/dist/cjs/taro-video-control_3.cjs.entry.js +3 -1
  13. package/dist/collection/collection-manifest.json +4 -0
  14. package/dist/collection/components/grid-view/grid-view.js +11 -0
  15. package/dist/collection/components/input/input.js +1 -1
  16. package/dist/collection/components/list-view/list-view.js +11 -0
  17. package/dist/collection/components/picker/picker.js +1 -1
  18. package/dist/collection/components/sticky-header/sticky-header.js +11 -0
  19. package/dist/collection/components/sticky-section/sticky-section.js +11 -0
  20. package/dist/collection/components/swiper/swiper-item.js +16 -9
  21. package/dist/collection/components/swiper/swiper.js +12 -9
  22. package/dist/collection/components/textarea/textarea.js +23 -6
  23. package/dist/collection/components/video/video.js +3 -1
  24. package/dist/components/index.d.ts +4 -0
  25. package/dist/components/index.js +4 -0
  26. package/dist/components/taro-grid-view-core.d.ts +11 -0
  27. package/dist/components/taro-grid-view-core.js +33 -0
  28. package/dist/components/taro-input-core.js +1 -1
  29. package/dist/components/taro-list-view-core.d.ts +11 -0
  30. package/dist/components/taro-list-view-core.js +33 -0
  31. package/dist/components/taro-picker-core.js +1 -1
  32. package/dist/components/taro-sticky-header-core.d.ts +11 -0
  33. package/dist/components/taro-sticky-header-core.js +33 -0
  34. package/dist/components/taro-sticky-section-core.d.ts +11 -0
  35. package/dist/components/taro-sticky-section-core.js +33 -0
  36. package/dist/components/taro-swiper-core.js +12 -9
  37. package/dist/components/taro-swiper-item-core.js +16 -9
  38. package/dist/components/taro-textarea-core.js +14 -4
  39. package/dist/components/taro-video-core.js +3 -1
  40. package/dist/esm/loader.js +1 -1
  41. package/dist/esm/taro-components.js +1 -1
  42. package/dist/esm/taro-grid-view-core.entry.js +17 -0
  43. package/dist/esm/taro-input-core.entry.js +1 -1
  44. package/dist/esm/taro-list-view-core.entry.js +17 -0
  45. package/dist/esm/taro-picker-core_2.entry.js +1 -1
  46. package/dist/esm/taro-sticky-header-core.entry.js +17 -0
  47. package/dist/esm/taro-sticky-section-core.entry.js +17 -0
  48. package/dist/esm/taro-swiper-core_2.entry.js +28 -18
  49. package/dist/esm/taro-textarea-core.entry.js +13 -3
  50. package/dist/esm/taro-video-control_3.entry.js +3 -1
  51. package/dist/esm-es5/loader.js +1 -1
  52. package/dist/esm-es5/taro-components.js +1 -1
  53. package/dist/esm-es5/taro-grid-view-core.entry.js +1 -0
  54. package/dist/esm-es5/taro-input-core.entry.js +1 -1
  55. package/dist/esm-es5/taro-list-view-core.entry.js +1 -0
  56. package/dist/esm-es5/taro-picker-core_2.entry.js +1 -1
  57. package/dist/esm-es5/taro-sticky-header-core.entry.js +1 -0
  58. package/dist/esm-es5/taro-sticky-section-core.entry.js +1 -0
  59. package/dist/esm-es5/taro-swiper-core_2.entry.js +1 -1
  60. package/dist/esm-es5/taro-textarea-core.entry.js +1 -1
  61. package/dist/taro-components/p-02aa7366.system.entry.js +1 -0
  62. package/dist/taro-components/p-05c757b7.entry.js +1 -0
  63. package/dist/taro-components/{p-4d390d17.entry.js → p-0b8b3af5.entry.js} +1 -1
  64. package/dist/taro-components/p-1c446c65.system.js +1 -1
  65. package/dist/taro-components/p-1eac7c75.system.entry.js +1 -0
  66. package/dist/taro-components/{p-3e23fa46.system.entry.js → p-39685396.system.entry.js} +1 -1
  67. package/dist/taro-components/p-4402972b.system.entry.js +1 -0
  68. package/dist/taro-components/{p-e53feb03.system.entry.js → p-58f9a827.system.entry.js} +1 -1
  69. package/dist/taro-components/p-5931c82e.entry.js +1 -0
  70. package/dist/taro-components/{p-ab84c88e.entry.js → p-7704e165.entry.js} +1 -1
  71. package/dist/taro-components/p-7c1fc8f5.system.entry.js +1 -0
  72. package/dist/taro-components/p-7df9de66.system.entry.js +1 -0
  73. package/dist/taro-components/{p-10046f1a.system.entry.js → p-a5afdc47.system.entry.js} +1 -1
  74. package/dist/taro-components/p-affb28de.entry.js +1 -0
  75. package/dist/taro-components/{p-8267b686.entry.js → p-c30d1b2d.entry.js} +1 -1
  76. package/dist/taro-components/p-dfc405a5.entry.js +1 -0
  77. package/dist/taro-components/p-e753b776.entry.js +1 -0
  78. package/dist/taro-components/taro-components.esm.js +1 -1
  79. package/dist/types/components/grid-view/grid-view.d.ts +5 -0
  80. package/dist/types/components/list-view/list-view.d.ts +5 -0
  81. package/dist/types/components/sticky-header/sticky-header.d.ts +5 -0
  82. package/dist/types/components/sticky-section/sticky-section.d.ts +5 -0
  83. package/dist/types/components/textarea/textarea.d.ts +2 -1
  84. package/dist/types/components.d.ts +52 -0
  85. package/lib/react/components.d.ts +81 -77
  86. package/lib/react/components.js +82 -77
  87. package/lib/react/components.js.map +1 -1
  88. package/lib/react/index.js +1 -1
  89. package/lib/react/{interfaces-4f837811.d.ts → interfaces-f526f1a2.d.ts} +4 -0
  90. package/lib/react/node_modules/.pnpm/registry.npmjs.org_tslib@1.14.1/node_modules/tslib/tslib.es6.js +221 -0
  91. package/lib/react/node_modules/.pnpm/registry.npmjs.org_tslib@1.14.1/node_modules/tslib/tslib.es6.js.map +1 -0
  92. package/lib/react/react-component-lib/createComponent.d.ts +5 -1
  93. package/lib/react/react-component-lib/createComponent.js +6 -4
  94. package/lib/react/react-component-lib/createComponent.js.map +1 -1
  95. package/lib/react/react-component-lib/createOverlayComponent.d.ts +5 -1
  96. package/lib/react/react-component-lib/createOverlayComponent.js +2 -1
  97. package/lib/react/react-component-lib/createOverlayComponent.js.map +1 -1
  98. package/lib/react/react-component-lib/utils/attachProps.d.ts +2 -6
  99. package/lib/react/react-component-lib/utils/attachProps.js +41 -36
  100. package/lib/react/react-component-lib/utils/attachProps.js.map +1 -1
  101. package/lib/react/react-component-lib/utils/case.d.ts +4 -0
  102. package/lib/react/react-component-lib/utils/case.js +4 -0
  103. package/lib/react/react-component-lib/utils/case.js.map +1 -1
  104. package/lib/react/react-component-lib/utils/index.d.ts +5 -1
  105. package/lib/react/react-component-lib/utils/index.js +4 -0
  106. package/lib/react/react-component-lib/utils/index.js.map +1 -1
  107. package/lib/vue2/components-loader.d.ts +2 -0
  108. package/lib/vue2/components-loader.js +21 -0
  109. package/lib/vue2/components-loader.js.map +1 -0
  110. package/lib/vue2/components.d.ts +5 -1
  111. package/lib/vue2/components.js +141 -224
  112. package/lib/vue2/components.js.map +1 -1
  113. package/lib/vue2/index.d.ts +0 -2
  114. package/lib/vue2/index.js +1 -22
  115. package/lib/vue2/index.js.map +1 -1
  116. package/lib/vue2/vue-component-lib/utils.d.ts +7 -3
  117. package/lib/vue2/vue-component-lib/utils.js +42 -25
  118. package/lib/vue2/vue-component-lib/utils.js.map +1 -1
  119. package/lib/vue3/components-loader.d.ts +2 -0
  120. package/lib/vue3/components-loader.js +13 -0
  121. package/lib/vue3/components-loader.js.map +1 -0
  122. package/lib/vue3/components.d.ts +5 -1
  123. package/lib/vue3/components.js +82 -77
  124. package/lib/vue3/components.js.map +1 -1
  125. package/lib/vue3/index.d.ts +0 -2
  126. package/lib/vue3/index.js +1 -14
  127. package/lib/vue3/index.js.map +1 -1
  128. package/lib/vue3/vue-component-lib/utils.js +11 -4
  129. package/lib/vue3/vue-component-lib/utils.js.map +1 -1
  130. package/package.json +11 -8
  131. package/types/Ad.d.ts +2 -31
  132. package/types/AdCustom.d.ts +0 -4
  133. package/types/AnimationVideo.d.ts +0 -9
  134. package/types/AnimationView.d.ts +0 -6
  135. package/types/ArCamera.d.ts +0 -7
  136. package/types/Audio.d.ts +0 -18
  137. package/types/AwemeData.d.ts +0 -6
  138. package/types/Button.d.ts +3 -106
  139. package/types/Camera.d.ts +0 -28
  140. package/types/Canvas.d.ts +2 -17
  141. package/types/ChannelLive.d.ts +0 -2
  142. package/types/ChannelVideo.d.ts +0 -6
  143. package/types/Checkbox.d.ts +1 -8
  144. package/types/CheckboxGroup.d.ts +0 -2
  145. package/types/CommentDetail.d.ts +4 -10
  146. package/types/CommentList.d.ts +4 -20
  147. package/types/ContactButton.d.ts +0 -7
  148. package/types/CoverImage.d.ts +0 -11
  149. package/types/CoverView.d.ts +0 -26
  150. package/types/Editor.d.ts +0 -10
  151. package/types/FollowSwan.d.ts +0 -3
  152. package/types/Form.d.ts +1 -9
  153. package/types/FunctionalPageNavigator.d.ts +0 -11
  154. package/types/GridView.d.ts +37 -0
  155. package/types/Icon.d.ts +0 -14
  156. package/types/Image.d.ts +0 -31
  157. package/types/InlinePaymentPanel.d.ts +0 -9
  158. package/types/Input.d.ts +0 -62
  159. package/types/Label.d.ts +3 -2
  160. package/types/Lifestyle.d.ts +0 -3
  161. package/types/Like.d.ts +0 -17
  162. package/types/ListView.d.ts +12 -0
  163. package/types/LivePlayer.d.ts +1 -58
  164. package/types/LivePusher.d.ts +0 -77
  165. package/types/Login.d.ts +0 -5
  166. package/types/Lottie.d.ts +0 -16
  167. package/types/Map.d.ts +19 -136
  168. package/types/MatchMedia.d.ts +0 -7
  169. package/types/MovableArea.d.ts +0 -1
  170. package/types/MovableView.d.ts +0 -35
  171. package/types/NavigationBar.d.ts +0 -6
  172. package/types/Navigator.d.ts +0 -27
  173. package/types/OfficialAccount.d.ts +0 -12
  174. package/types/OpenData.d.ts +0 -20
  175. package/types/PageContainer.d.ts +0 -21
  176. package/types/PageMeta.d.ts +0 -16
  177. package/types/Picker.d.ts +17 -45
  178. package/types/PickerView.d.ts +1 -12
  179. package/types/Progress.d.ts +0 -13
  180. package/types/Radio.d.ts +1 -8
  181. package/types/RadioGroup.d.ts +0 -2
  182. package/types/RichText.d.ts +1 -22
  183. package/types/RootPortal.d.ts +1 -2
  184. package/types/RtcRoom.d.ts +0 -16
  185. package/types/RtcRoomItem.d.ts +0 -3
  186. package/types/ScrollView.d.ts +43 -46
  187. package/types/ShareElement.d.ts +2 -7
  188. package/types/Slider.d.ts +0 -19
  189. package/types/StickyHeader.d.ts +12 -0
  190. package/types/StickySection.d.ts +18 -0
  191. package/types/Swiper.d.ts +0 -44
  192. package/types/SwiperItem.d.ts +0 -2
  193. package/types/Switch.d.ts +2 -11
  194. package/types/TabItem.d.ts +0 -4
  195. package/types/Tabs.d.ts +0 -8
  196. package/types/Text.d.ts +0 -7
  197. package/types/Textarea.d.ts +2 -38
  198. package/types/Video.d.ts +1 -112
  199. package/types/View.d.ts +0 -25
  200. package/types/VoipRoom.d.ts +0 -6
  201. package/types/WebView.d.ts +0 -6
  202. package/types/index.d.ts +4 -0
  203. package/types/index.vue3.d.ts +8 -0
  204. package/dist/taro-components/p-0895120a.system.entry.js +0 -1
  205. package/dist/taro-components/p-0aaf66d2.entry.js +0 -1
package/types/Video.d.ts CHANGED
@@ -5,120 +5,100 @@ interface VideoProps extends StandardProps {
5
5
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
6
6
  */
7
7
  src: string
8
-
9
8
  /** 指定视频时长
10
9
  * @supported weapp, alipay, qq, h5, rn
11
10
  */
12
11
  duration?: number
13
-
14
12
  /** 是否显示默认播放控件(播放/暂停按钮、播放进度、时间)
15
13
  * @default true
16
14
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
17
15
  */
18
16
  controls?: boolean
19
-
20
17
  /** 弹幕列表
21
18
  * @supported weapp, swan, qq, h5
22
19
  */
23
20
  danmuList?: any[]
24
-
25
21
  /** 是否显示弹幕按钮,只在初始化时有效,不能动态变更
26
22
  * @default false
27
23
  * @supported weapp, swan, qq, h5
28
24
  */
29
25
  danmuBtn?: boolean
30
-
31
26
  /** 是否展示弹幕,只在初始化时有效,不能动态变更
32
27
  * @default false
33
28
  * @supported weapp, swan, qq, h5
34
29
  */
35
30
  enableDanmu?: boolean
36
-
37
31
  /** 是否自动播放
38
32
  * @default false
39
33
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
40
34
  */
41
35
  autoplay?: boolean
42
-
43
36
  /** 是否循环播放
44
37
  * @default false
45
38
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
46
39
  */
47
40
  loop?: boolean
48
-
49
41
  /** 是否静音播放
50
42
  * @default false
51
43
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
52
44
  */
53
45
  muted?: boolean
54
-
55
46
  /** 指定视频初始播放位置
56
47
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
57
48
  */
58
49
  initialTime?: number
59
-
60
50
  /** 在非全屏模式下,是否开启亮度与音量调节手势
61
51
  * @default false
52
+ * @supported weapp, swan, qq
62
53
  */
63
54
  pageGesture?: boolean
64
-
65
55
  /** 设置全屏时视频的方向,不指定则根据宽高比自动判断。有效值为 0(正常竖向), 90(屏幕逆时针90度), -90(屏幕顺时针90度)
66
56
  * @supported weapp, alipay, swan, tt, qq
67
57
  */
68
58
  direction?: number
69
-
70
59
  /** 若不设置,宽度大于240时才会显示
71
60
  * @default true
72
61
  * @supported weapp, swan, qq, h5
73
62
  */
74
63
  showProgress?: boolean
75
-
76
64
  /** 是否显示全屏按钮
77
65
  * @default true
78
66
  * @supported weapp, alipay, swan, tt, qq, h5
79
67
  */
80
68
  showFullscreenBtn?: boolean
81
-
82
69
  /** 是否显示视频底部控制栏的播放按钮
83
70
  * @default true
84
71
  * @supported weapp, alipay, swan, tt, qq, h5
85
72
  */
86
73
  showPlayBtn?: boolean
87
-
88
74
  /** 是否显示视频中间的播放按钮
89
75
  * @default true
90
76
  * @supported weapp, alipay, swan, qq, h5, rn
91
77
  */
92
78
  showCenterPlayBtn?: boolean
93
-
94
79
  /** 是否开启控制进度的手势
95
80
  * @default true
96
81
  * @supported weapp, alipay, swan, tt, qq, h5
97
82
  */
98
83
  enableProgressGesture?: boolean
99
-
100
84
  /** 当视频大小与 video 容器大小不一致时,视频的表现形式
101
85
  * @default "contain"
102
86
  * @supported weapp, alipay, swan, tt, qq, jd, h5
103
87
  */
104
88
  objectFit?: keyof VideoProps.ObjectFit
105
-
106
89
  /** 视频封面的图片网络资源地址,如果 controls 属性值为 false 则设置 poster 无效
107
90
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
108
91
  */
109
92
  poster?: string
110
-
111
93
  /** 是否显示静音按钮
112
94
  * @default false
113
95
  * @supported weapp, alipay, swan, tt, qq, h5
114
96
  */
115
97
  showMuteBtn?: boolean
116
-
117
98
  /** 视频的标题,全屏时在顶部展示
118
99
  * @supported weapp, swan, qq
119
100
  */
120
101
  title?: string
121
-
122
102
  /** 播放按钮的位置
123
103
  * - `bottom`: controls bar 上
124
104
  * - `center`: 视频中间
@@ -127,58 +107,48 @@ interface VideoProps extends StandardProps {
127
107
  * @supported weapp, tt, qq
128
108
  */
129
109
  playBtnPosition?: keyof VideoProps.PlayBtnPosition
130
-
131
110
  /** 是否开启播放手势,即双击切换播放/暂停
132
111
  * @default false
133
112
  * @supported weapp, swan, tt, qq, h5
134
113
  */
135
114
  enablePlayGesture?: boolean
136
-
137
115
  /** 当跳转到其它小程序页面时,是否自动暂停本页面的视频
138
116
  * @default true
139
117
  * @supported weapp, qq
140
118
  */
141
119
  autoPauseIfNavigate?: boolean
142
-
143
120
  /** 当跳转到其它微信原生页面时,是否自动暂停本页面的视频
144
121
  * @default true
145
122
  * @supported weapp, qq
146
123
  */
147
124
  autoPauseIfOpenNative?: boolean
148
-
149
125
  /** 在非全屏模式下,是否开启亮度与音量调节手势(同 `page-gesture`)
150
126
  * @default false
151
127
  * @supported weapp, swan, tt, h5
152
128
  */
153
129
  vslideGesture?: boolean
154
-
155
130
  /** 在全屏模式下,是否开启亮度与音量调节手势
156
131
  * @default true
157
132
  * @supported weapp, swan, tt, h5
158
133
  */
159
134
  vslideGestureInFullscreen?: boolean
160
-
161
135
  /** 视频前贴广告单元ID,更多详情可参考开放能力[视频前贴广告](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/ad/video-patch-ad.html)
162
136
  * @supported weapp
163
137
  */
164
138
  adUnitId?: string
165
-
166
139
  /** 用于给搜索等场景作为视频封面展示,建议使用无播放 icon 的视频封面图,只支持网络地址
167
140
  * @supported weapp
168
141
  */
169
142
  posterForCrawler?: string
170
-
171
143
  /** 显示投屏按钮。只安卓且同层渲染下生效,支持 DLNA 协议
172
144
  * @supported weapp
173
145
  */
174
146
  showCastingButton?: boolean
175
-
176
147
  /**
177
148
  * 设置小窗模式: push, pop,空字符串或通过数组形式设置多种模式(如: ["push", "pop"])
178
149
  * @supported weapp
179
150
  */
180
151
  pictureInPictureMode?: ('push' | 'pop')[] | 'push' | 'pop' | ''
181
-
182
152
  /**
183
153
  * 是否在小窗模式下显示播放进度(目前有bug,先注释掉)
184
154
  * @supported weapp
@@ -196,81 +166,66 @@ interface VideoProps extends StandardProps {
196
166
  * @supported weapp
197
167
  */
198
168
  enableAutoRotation?: boolean
199
-
200
169
  /**
201
170
  * 是否显示锁屏按钮,仅在全屏时显示,锁屏后控制栏的操作
202
171
  * @supported weapp, tt
203
172
  */
204
173
  showScreenLockButton?: boolean
205
-
206
174
  /**
207
175
  * 是否显示截屏按钮,仅在全屏时显示
208
176
  * @supported weapp
209
177
  */
210
178
  showSnapshotButton?: boolean
211
-
212
179
  /**
213
180
  * 是否展示后台音频播放按钮
214
181
  * @supported weapp
215
182
  */
216
183
  showBackgroundPlaybackButton?: boolean
217
-
218
184
  /**
219
185
  * 进入后台音频播放后的通知栏图标(Android 独有)
220
186
  * @supported weapp
221
187
  */
222
188
  backgroundPoster?: string
223
-
224
189
  /** 用于透传 `WebComponents` 上的属性到内部 H5 标签上
225
190
  * @supported h5
226
191
  */
227
192
  nativeProps?: Record<string, unknown>
228
-
229
193
  /** 是否展示底部进度条
230
194
  * @supported weapp
231
195
  */
232
196
  showBottomProgress?: string
233
-
234
197
  /** 是否在小窗模式下显示播放进度
235
198
  * @supported weapp
236
199
  */
237
200
  pictureInPictureShowProgress?: string
238
-
239
201
  /** 格式固定为 https://servicewechat.com/{appid}/{version}/page-frame.html,其中 {appid} 为小程序的 appid,{version} 为小程序的版本号,版本号为 0 表示为开发版、体验版以及审核版本,版本号为 devtools 表示为开发者工具,其余为正式版本;
240
202
  * @supported weapp
241
203
  */
242
204
  referrerPolicy?: 'origin' | 'no-referrer'
243
-
244
205
  /** 是否是 DRM 视频源
245
206
  * @supported weapp
246
207
  */
247
208
  isDrm?: string
248
-
249
209
  /** DRM 设备身份认证 url,仅 is-drm 为 true 时生效 (Android)
250
210
  * @supported weapp
251
211
  */
252
212
  provisionUrl?: string
253
-
254
213
  /** DRM 设备身份认证 url,仅 is-drm 为 true 时生效 (iOS)
255
214
  * @supported weapp
256
215
  */
257
216
  certificateUrl?: string
258
-
259
217
  /** DRM 获取加密信息 url,仅 is-drm 为 true 时生效
260
218
  * @supported weapp
261
219
  */
262
220
  licenseUrl?: string
263
-
264
221
  /** 当 poster 高宽比跟视频高宽不匹配时,如何显示 poster,设置规则同 background-size 一致。
265
222
  * @supported alipay
266
223
  */
267
224
  posterSize?: string
268
-
269
225
  /** 当底部工具条隐藏时,是否显示细进度条(controls=false 时设置无效)。
270
226
  * @supported alipay
271
227
  */
272
228
  showThinProgressBar?: string
273
-
274
229
  /** 移动网络提醒样式。
275
230
  *
276
231
  * 0 - 不提醒
@@ -281,7 +236,6 @@ interface VideoProps extends StandardProps {
281
236
  * @supported alipay, jd
282
237
  */
283
238
  mobilenetHintType?: string
284
-
285
239
  /** 浮窗设置。暂时不支持全局浮窗。
286
240
  * 可选值:
287
241
  *
@@ -290,248 +244,201 @@ interface VideoProps extends StandardProps {
290
244
  * @supported alipay
291
245
  */
292
246
  floatingMode?: string
293
-
294
247
  /** 非 wifi 环境下是否显示继续播放浮层
295
248
  * @supported swan
296
249
  */
297
250
  showNoWifiTip?: string
298
-
299
251
  /** 全屏模式下,是否显示锁屏按钮
300
252
  * @supported swan
301
253
  */
302
254
  showLockBtn?: string
303
-
304
255
  /** 是否显示倍速播放按钮
305
256
  * @supported swan
306
257
  */
307
258
  showRateBtn?: string
308
-
309
259
  /** 全屏模式下,是否显示侧边栏控制按钮
310
260
  * @supported swan
311
261
  */
312
262
  showVslideBtnInFullscreen?: string
313
-
314
263
  /** 是否进入无声视频模式,进入无声视频模式后,视频将静音播放且不响应系统物理音量变化,点击播放器提示无声视频,手势调节失效
315
264
  * @supported swan
316
265
  */
317
266
  silentPlay?: string
318
-
319
267
  /** 前贴广告的 unit id
320
268
  * @supported tt
321
269
  */
322
270
  preRollUnitId?: string
323
-
324
271
  /** 后贴广告的 unit id
325
272
  * @supported tt
326
273
  */
327
274
  postRollUnitId?: string
328
-
329
275
  /** 是否显示倍速控件,点击倍速控件后可选择倍速,可选值: 0.75/1.0/1.25/1.5/2
330
276
  * @supported tt
331
277
  */
332
278
  showPlaybackRateBtn?: string
333
-
334
279
  /** video 播放时宿主退出后台后开启小窗播放,iOS 14 及以上版本支持。开启时首次退出后台后给予弹窗提示用户授权,授权完成后可以到小程序「设置」中重设。支持场景见后台小窗播放
335
280
  * @supported tt
336
281
  */
337
282
  enablePlayInBackground?: string
338
-
339
283
  /** 设置署名水印
340
284
  * @supported tt
341
285
  */
342
286
  signature?: string
343
-
344
287
  /** 指定码率上界,单位为比特每秒
345
288
  * @supported weapp
346
289
  */
347
290
  preferredPeakBitRate?: number
348
-
349
291
  /** 是否为直播源
350
292
  * @supported weapp
351
293
  */
352
294
  isLive?: boolean
353
-
354
295
  /** 清晰度,设置清晰度列表和默认播放的清晰度。切换清晰度按钮仅在全屏时展示,属性说明详见 Definition 类型说明。需要保证 src 和 definition 中有一个为必填,若同时设置了 src 和 definition,definition 优先级高于 src
355
296
  * @supported tt
356
297
  */
357
298
  definition?: string
358
-
359
299
  /** 当开始/继续播放时触发 play 事件
360
300
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
361
301
  */
362
302
  onPlay?: CommonEventFunction
363
-
364
303
  /** 当暂停播放时触发 pause 事件
365
304
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
366
305
  */
367
306
  onPause?: CommonEventFunction
368
-
369
307
  /** 当播放到末尾时触发 ended 事件
370
308
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
371
309
  */
372
310
  onEnded?: CommonEventFunction
373
-
374
311
  /** 播放进度变化时触发, 触发频率 250ms 一次
375
312
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
376
313
  */
377
314
  onTimeUpdate?: CommonEventFunction<VideoProps.onTimeUpdateEventDetail>
378
-
379
315
  /** 当视频进入和退出全屏时触发
380
316
  *
381
317
  * @supported h5, rn
382
318
  */
383
319
  onFullscreenChange?: CommonEventFunction<VideoProps.onFullscreenChangeEventDetail>
384
-
385
320
  /** 视频出现缓冲时触发
386
321
  *
387
322
  * @supported weapp, swan, tt, qq, jd
388
323
  */
389
324
  onWaiting?: CommonEventFunction<VideoProps.onWaitingEventDetail>
390
-
391
325
  /** 视频播放出错时触发
392
326
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
393
327
  */
394
328
  onError?: CommonEventFunction
395
-
396
329
  /** 加载进度变化时触发,只支持一段加载
397
330
  * @supported weapp, tt, qq, h5
398
331
  */
399
332
  onProgress?: CommonEventFunction<VideoProps.onProgressEventDetail>
400
-
401
333
  /** 视频元数据加载完成时触发
402
334
  * @supported weapp, swan, tt, jd, rn
403
335
  */
404
336
  onLoadedMetaData?: CommonEventFunction<VideoProps.onLoadedMetaDataEventDetail>
405
-
406
337
  /**
407
338
  * 播放器进入小窗
408
339
  * @supported weapp
409
340
  */
410
341
  onEnterPictureInPicture?: CommonEventFunction
411
-
412
342
  /**
413
343
  * 播放器退出小窗
414
344
  * @supported weapp
415
345
  */
416
346
  onLeavePictureInPicture?: CommonEventFunction
417
-
418
347
  /**
419
348
  * seek 完成时触发
420
349
  * @supported weapp, tt
421
350
  */
422
351
  onSeekComplete?: CommonEventFunction
423
-
424
352
  /** 视频进入和退出全屏时触发
425
353
  * @supported weapp, alipay, swan, tt, qq, jd
426
354
  */
427
355
  onFullScreenChange?: CommonEventFunction<VideoProps.onFullscreenChangeEventDetail>
428
-
429
356
  /** 切换 controls 显示隐藏时触发。
430
357
  * @supported weapp, swan
431
358
  */
432
359
  onControlsToggle?: CommonEventFunction<VideoProps.onControlsToggleEventDetail>
433
-
434
360
  /** 视频出现缓冲时触发。
435
361
  * @supported alipay
436
362
  */
437
363
  onLoading?: CommonEventFunction
438
-
439
364
  /** 点击视频 view 时触发
440
365
  * @supported alipay
441
366
  */
442
367
  onTap?: CommonEventFunction<VideoProps.onTapEventDetail>
443
-
444
368
  /** 用户操作事件
445
369
  * @supported alipay
446
370
  */
447
371
  onUserAction?: CommonEventFunction<VideoProps.onUserActionEventDetail>
448
-
449
372
  /** 视频播放终止。
450
373
  * @supported alipay
451
374
  */
452
375
  onStop?: CommonEventFunction
453
-
454
376
  /** 当视频加载完真正开始播放时触发。
455
377
  * @supported alipay
456
378
  */
457
379
  onRenderStart?: CommonEventFunction
458
-
459
380
  /** 贴片广告开始播放时触发
460
381
  * @supported tt
461
382
  */
462
383
  onAdStart?: CommonEventFunction<VideoProps.onAdTypeCommonEventDetail>
463
-
464
384
  /** 贴片广告播放结束时触发
465
385
  * @supported tt
466
386
  */
467
387
  onAdEnded?: CommonEventFunction<VideoProps.onAdTypeCommonEventDetail>
468
-
469
388
  /** 贴片广告非自然结束时触发,如:用户关闭广告或广告播放过程中 video 组件被销毁
470
389
  * @supported tt
471
390
  */
472
391
  onAdClose?: CommonEventFunction<VideoProps.onAdTypeCommonEventDetail>
473
-
474
392
  /** 贴片广告加载失败时触发
475
393
  * @supported tt
476
394
  */
477
395
  onAdError?: CommonEventFunction<VideoProps.onAdTypeCommonEventDetail>
478
-
479
396
  /** 视频倍速改变完成时触发。返回改变后的倍速值
480
397
  * @supported tt
481
398
  */
482
399
  onPlayBackRateChange?: CommonEventFunction<{
483
400
  playbackRate: string
484
401
  }>
485
-
486
402
  /** 静音状态改变完成时触发。返回当前是否静音
487
403
  * @supported tt
488
404
  */
489
405
  onMuteChange?: CommonEventFunction<{
490
406
  isMuted: boolean
491
407
  }>
492
-
493
408
  /** 点击控件时触发。返回当前点击的控件类型
494
409
  * @supported tt
495
410
  */
496
411
  onControlTap?: CommonEventFunction<{
497
412
  controlType
498
413
  }>
499
-
500
414
  /** 进入小窗播放时触发
501
415
  * @supported tt
502
416
  */
503
417
  onEnterBackground?: CommonEventFunction
504
-
505
418
  /** 关闭小窗播放时触发
506
419
  * @supported tt
507
420
  */
508
421
  onCloseBackground?: CommonEventFunction
509
-
510
422
  /** 离开小窗进入 app 事件时触发
511
423
  * @supported tt
512
424
  */
513
425
  onLeaveBackground?: CommonEventFunction
514
-
515
426
  /** 否
516
427
  * @supported jd
517
428
  */
518
429
  onLoadedData?: CommonEventFunction
519
-
520
430
  /** 否
521
431
  * @supported jd
522
432
  */
523
433
  onLoadStart?: CommonEventFunction
524
-
525
434
  /** 否
526
435
  * @supported jd
527
436
  */
528
437
  onSeeked?: CommonEventFunction
529
-
530
438
  /** 否
531
439
  * @supported jd
532
440
  */
533
441
  onSeeking?: CommonEventFunction
534
-
535
442
  /** 贴片广告加载成功时触发,event.detail = { adType: 'preRollAd' | 'postRollAd' }
536
443
  * @supported tt
537
444
  */
@@ -542,52 +449,42 @@ declare namespace VideoProps {
542
449
  interface direction {
543
450
  /** 正常竖向 */
544
451
  0
545
-
546
452
  /** 屏幕逆时针90度 */
547
453
  90
548
-
549
454
  /** 屏幕顺时针90度 */
550
455
  '-90'
551
456
  }
552
-
553
457
  /** objectFit 的合法值 */
554
458
  interface ObjectFit {
555
459
  /** 包含 */
556
460
  contain
557
-
558
461
  /** 填充 */
559
462
  fill
560
-
561
463
  /** 覆盖 */
562
464
  cover
563
465
  }
564
-
565
466
  /** playBtnPosition 的合法值 */
566
467
  interface PlayBtnPosition {
567
468
  /** controls bar上 */
568
469
  bottom
569
-
570
470
  /** 视频中间 */
571
471
  center
572
472
  }
573
473
  interface onTimeUpdateEventDetail {
574
474
  /** 当前时间 */
575
475
  currentTime: number
576
-
577
476
  /** 持续时间 */
578
477
  duration: number
579
478
  }
580
479
  interface onFullscreenChangeEventDetail {
581
480
  /** 方向 */
582
481
  direction: 'vertical' | 'horizontal'
583
-
584
482
  /** 全屏 */
585
483
  fullScreen: number | boolean
586
484
  }
587
485
  interface onWaitingEventDetail {
588
486
  /** 方向 */
589
487
  direction: 'vertical' | 'horizontal'
590
-
591
488
  /** 全屏 */
592
489
  fullScreen: number | boolean
593
490
  }
@@ -598,10 +495,8 @@ declare namespace VideoProps {
598
495
  interface onLoadedMetaDataEventDetail {
599
496
  /** 视频宽度 */
600
497
  width: number
601
-
602
498
  /** 视频高度 */
603
499
  height: number
604
-
605
500
  /** 持续时间 */
606
501
  duration: number
607
502
  }
@@ -623,19 +518,14 @@ declare namespace VideoProps {
623
518
  interface UserActionTag {
624
519
  /** 底部播放按钮 */
625
520
  play
626
-
627
521
  /** 中心播放按钮 */
628
522
  centerplay
629
-
630
523
  /** 静音按钮 */
631
524
  mute
632
-
633
525
  /** 全屏按钮 */
634
526
  fullscreen
635
-
636
527
  /** 重试按钮 */
637
528
  retry
638
-
639
529
  /** 网络提醒的播放按钮 */
640
530
  mobilenetplay
641
531
  }
@@ -644,7 +534,6 @@ declare namespace VideoProps {
644
534
  adType: 'preRollAd' | 'postRollAd'
645
535
  }
646
536
  }
647
-
648
537
  /** 视频。相关api:Taro.createVideoContext
649
538
  * @classification media
650
539
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony