@dcloudio/uni-app-x 0.7.39 → 0.7.41

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 (104) hide show
  1. package/package.json +9 -7
  2. package/types/UniPage.d.ts +168 -22
  3. package/types/app.d.ts +178 -174
  4. package/types/native/CSSStyleDeclaration.d.ts +16 -2
  5. package/types/native/DOMRect.d.ts +430 -10
  6. package/types/native/DrawableContext.d.ts +1137 -45
  7. package/types/native/IUniElement.d.ts +1875 -93
  8. package/types/native/UniNativePage.d.ts +94 -0
  9. package/types/native/UniResizeObserver.d.ts +215 -5
  10. package/types/native/UniSafeArea.d.ts +185 -0
  11. package/types/native/UniVideoElement.d.ts +432 -0
  12. package/types/native/global.d.ts +7 -0
  13. package/types/native/index.d.ts +1 -0
  14. package/types/uni/uni-map-tencent-map.d.ts +12 -8
  15. package/types/uni/uts-plugin-api/global.d.ts +62 -61
  16. package/types/uni/uts-plugin-api/index.d.ts +62 -61
  17. package/types/uni/uts-plugin-api/lib/uni-actionSheet/utssdk/global.d.ts +22 -0
  18. package/types/uni/uts-plugin-api/lib/uni-actionSheet/utssdk/index.d.ts +10 -0
  19. package/types/uni/uts-plugin-api/lib/uni-actionSheet/utssdk/interface.d.ts +278 -0
  20. package/types/uni/uts-plugin-api/lib/uni-addPhoneContact/utssdk/interface.d.ts +1600 -59
  21. package/types/uni/uts-plugin-api/lib/uni-arrayBufferToBase64/utssdk/interface.d.ts +64 -63
  22. package/types/uni/uts-plugin-api/lib/uni-authentication/utssdk/global.d.ts +0 -2
  23. package/types/uni/uts-plugin-api/lib/uni-authentication/utssdk/index.d.ts +0 -1
  24. package/types/uni/uts-plugin-api/lib/uni-authentication/utssdk/interface.d.ts +1150 -186
  25. package/types/uni/uts-plugin-api/lib/uni-base64ToArrayBuffer/utssdk/interface.d.ts +64 -63
  26. package/types/uni/uts-plugin-api/lib/uni-canvas/utssdk/interface.d.ts +550 -550
  27. package/types/uni/uts-plugin-api/lib/uni-chooseLocation/utssdk/interface.d.ts +69 -72
  28. package/types/uni/uts-plugin-api/lib/uni-clipboard/utssdk/interface.d.ts +533 -135
  29. package/types/uni/uts-plugin-api/lib/uni-createInnerAudioContext/utssdk/interface.d.ts +1508 -77
  30. package/types/uni/uts-plugin-api/lib/uni-createIntersectionObserver/utssdk/interface.d.ts +423 -63
  31. package/types/uni/uts-plugin-api/lib/uni-createSelectorQuery/utssdk/interface.d.ts +284 -63
  32. package/types/uni/uts-plugin-api/lib/uni-dialogPage/utssdk/interface.d.ts +2 -9
  33. package/types/uni/uts-plugin-api/lib/uni-event/utssdk/interface.d.ts +1 -1
  34. package/types/uni/uts-plugin-api/lib/uni-file/utssdk/global.d.ts +62 -62
  35. package/types/uni/uts-plugin-api/lib/uni-file/utssdk/index.d.ts +31 -31
  36. package/types/uni/uts-plugin-api/lib/uni-file/utssdk/interface.d.ts +57 -57
  37. package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/interface.d.ts +312 -110
  38. package/types/uni/uts-plugin-api/lib/uni-getAppAuthorizeSetting/utssdk/interface.d.ts +62 -62
  39. package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/interface.d.ts +472 -72
  40. package/types/uni/uts-plugin-api/lib/uni-getBackgroundAudioManager/utssdk/interface.d.ts +126 -78
  41. package/types/uni/uts-plugin-api/lib/uni-getDeviceInfo/utssdk/interface.d.ts +317 -66
  42. package/types/uni/uts-plugin-api/lib/uni-getEnterOptionsSync/utssdk/interface.d.ts +570 -63
  43. package/types/uni/uts-plugin-api/lib/uni-getLaunchOptionsSync/utssdk/interface.d.ts +570 -63
  44. package/types/uni/uts-plugin-api/lib/uni-getLocation/utssdk/interface.d.ts +110 -66
  45. package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/interface.d.ts +595 -177
  46. package/types/uni/uts-plugin-api/lib/uni-getPerformance/utssdk/interface.d.ts +284 -63
  47. package/types/uni/uts-plugin-api/lib/uni-getRecorderManager/utssdk/interface.d.ts +45 -1
  48. package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/interface.d.ts +1387 -182
  49. package/types/uni/uts-plugin-api/lib/uni-getSystemSetting/utssdk/interface.d.ts +67 -67
  50. package/types/uni/uts-plugin-api/lib/uni-keyboard/utssdk/interface.d.ts +318 -53
  51. package/types/uni/uts-plugin-api/lib/uni-loadFontFace/utssdk/interface.d.ts +162 -63
  52. package/types/uni/uts-plugin-api/lib/uni-makePhoneCall/utssdk/interface.d.ts +241 -64
  53. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/global.d.ts +6 -0
  54. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/index.d.ts +3 -0
  55. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/interface.d.ts +4089 -659
  56. package/types/uni/uts-plugin-api/lib/uni-navigationBar/utssdk/interface.d.ts +460 -252
  57. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/interface.d.ts +2345 -213
  58. package/types/uni/uts-plugin-api/lib/uni-oauth/utssdk/interface.d.ts +1205 -149
  59. package/types/uni/uts-plugin-api/lib/uni-openAppAuthorizeSetting/utssdk/interface.d.ts +339 -33
  60. package/types/uni/uts-plugin-api/lib/uni-openDocument/utssdk/interface.d.ts +457 -53
  61. package/types/uni/uts-plugin-api/lib/uni-pageScrollTo/utssdk/interface.d.ts +328 -63
  62. package/types/uni/uts-plugin-api/lib/uni-payment/utssdk/interface.d.ts +317 -66
  63. package/types/uni/uts-plugin-api/lib/uni-privacy/utssdk/interface.d.ts +120 -71
  64. package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/interface.d.ts +2157 -437
  65. package/types/uni/uts-plugin-api/lib/uni-pullDownRefresh/utssdk/interface.d.ts +260 -126
  66. package/types/uni/uts-plugin-api/lib/uni-route/utssdk/interface.d.ts +467 -315
  67. package/types/uni/uts-plugin-api/lib/uni-scanCode/utssdk/interface.d.ts +553 -53
  68. package/types/uni/uts-plugin-api/lib/uni-storage/utssdk/interface.d.ts +1608 -630
  69. package/types/uni/uts-plugin-api/lib/uni-tabBar/utssdk/interface.d.ts +2492 -504
  70. package/types/uni/uts-plugin-api/lib/uni-theme/utssdk/interface.d.ts +176 -130
  71. package/types/uni/uts-plugin-api/lib/uni-virtualPayment/utssdk/interface.d.ts +704 -58
  72. package/types/uni/uts-plugin-api/lib/uni-websocket/utssdk/interface.d.ts +1230 -454
  73. package/types/uni/uts-plugin-biz/global.d.ts +6 -5
  74. package/types/uni/uts-plugin-biz/index.d.ts +6 -5
  75. package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/interface.d.ts +406 -123
  76. package/types/uni/uts-plugin-biz/lib/uni-crash/utssdk/global.d.ts +4 -0
  77. package/types/uni/uts-plugin-biz/lib/uni-crash/utssdk/index.d.ts +2 -0
  78. package/types/uni/uts-plugin-biz/lib/uni-crash/utssdk/interface.d.ts +60 -47
  79. package/types/uni/uts-plugin-biz/lib/uni-map-tencent/utssdk/interface.d.ts +71 -71
  80. package/types/uni/uts-plugin-biz/lib/uni-push/utssdk/interface.d.ts +3 -3
  81. package/types/uni/uts-plugin-biz/lib/uni-secure-network/utssdk/global.d.ts +24 -0
  82. package/types/uni/uts-plugin-biz/lib/uni-secure-network/utssdk/index.d.ts +11 -0
  83. package/types/uni/uts-plugin-biz/lib/uni-secure-network/utssdk/interface.d.ts +204 -0
  84. package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/global.d.ts +42 -38
  85. package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/index.d.ts +21 -19
  86. package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/interface.d.ts +502 -255
  87. package/types/uni/uts-plugin-biz/lib/uni-video/utssdk/global.d.ts +64 -0
  88. package/types/uni/uts-plugin-biz/lib/uni-video/utssdk/index.d.ts +31 -0
  89. package/types/uni/uts-plugin-biz/lib/uni-video/utssdk/interface.d.ts +900 -0
  90. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/interface.d.ts +48 -48
  91. package/types/uni/uts-plugin-extend/global.d.ts +0 -4
  92. package/types/uni/uts-plugin-extend/index.d.ts +0 -4
  93. package/types/uni/uts-plugin-extend/lib/uni-accelerometer/utssdk/interface.d.ts +825 -273
  94. package/types/uni/uts-plugin-extend/lib/uni-canvas/utssdk/interface.d.ts +4399 -339
  95. package/types/uni/uts-plugin-extend/lib/uni-compass/utssdk/interface.d.ts +1000 -268
  96. package/types/uni/uts-plugin-extend/lib/uni-createMediaQueryObserver/utssdk/interface.d.ts +1 -1
  97. package/types/uni/uts-plugin-extend/lib/uni-locale/utssdk/interface.d.ts +3 -3
  98. package/types/uni/uts-plugin-extend/lib/uni-localeChange/utssdk/interface.d.ts +1495 -384
  99. package/types/uni/uts-plugin-extend/lib/uni-memory/utssdk/interface.d.ts +222 -132
  100. package/types/uni/uts-plugin-extend/lib/uni-openLocation/utssdk/interface.d.ts +923 -67
  101. package/types/uni/uts-plugin-extend/lib/uni-preloadPage/utssdk/interface.d.ts +2 -2
  102. package/types/uni/uts-plugin-extend/lib/uni-getBackgroundAudioManager/utssdk/global.d.ts +0 -7
  103. package/types/uni/uts-plugin-extend/lib/uni-getBackgroundAudioManager/utssdk/index.d.ts +0 -1
  104. package/types/uni/uts-plugin-extend/lib/uni-getBackgroundAudioManager/utssdk/interface.d.ts +0 -716
@@ -0,0 +1,900 @@
1
+ export type CreateVideoContext = (videoId: string.VideoIdString, component?: ComponentPublicInstance | null) => VideoContext | null;
2
+
3
+ export type Danmu = {
4
+ /**
5
+ * 弹幕文字
6
+ */
7
+ text?: string | null,
8
+ /**
9
+ * 弹幕颜色
10
+ */
11
+ color?: string | null,
12
+ /**
13
+ * 显示时刻
14
+ */
15
+ time?: number | null
16
+ };
17
+
18
+ export type RequestFullScreenOptions = {
19
+ /**
20
+ * direction
21
+ * - 0: 正常竖向
22
+ * - 90: 屏幕逆时针90度
23
+ * - -90: 屏幕顺时针90度
24
+ * @type 0 | 90 | -90
25
+ * @uniPlatform {
26
+ * "app": {
27
+ * "android": {
28
+ * "osVer": "4.4",
29
+ * "uniVer": "√",
30
+ * "unixVer": "3.9.0"
31
+ * },
32
+ * "ios": {
33
+ * "osVer": "12.0",
34
+ * "uniVer": "√",
35
+ * "unixVer": "4.11"
36
+ * }
37
+ * },
38
+ * "mp": {
39
+ * "weixin": {
40
+ * "hostVer": "√",
41
+ * "uniVer": "√",
42
+ * "unixVer": "4.41"
43
+ * },
44
+ * "alipay": {
45
+ * "hostVer": "√",
46
+ * "uniVer": "√",
47
+ * "unixVer": "x"
48
+ * },
49
+ * "baidu": {
50
+ * "hostVer": "√",
51
+ * "uniVer": "√",
52
+ * "unixVer": "x"
53
+ * },
54
+ * "toutiao": {
55
+ * "hostVer": "√",
56
+ * "uniVer": "√",
57
+ * "unixVer": "x"
58
+ * },
59
+ * "lark": {
60
+ * "hostVer": "√",
61
+ * "uniVer": "√",
62
+ * "unixVer": "x"
63
+ * },
64
+ * "qq": {
65
+ * "hostVer": "√",
66
+ * "uniVer": "√",
67
+ * "unixVer": "x"
68
+ * },
69
+ * "kuaishou": {
70
+ * "hostVer": "√",
71
+ * "uniVer": "√",
72
+ * "unixVer": "x"
73
+ * },
74
+ * "jd": {
75
+ * "hostVer": "√",
76
+ * "uniVer": "√",
77
+ * "unixVer": "x"
78
+ * }
79
+ * },
80
+ * "web": {
81
+ * "uniVer": "x",
82
+ * "unixVer": "x"
83
+ * }
84
+ * }
85
+ */
86
+ direction?: number | null
87
+ };
88
+
89
+ export interface VideoContext {
90
+ /**
91
+ * @description 播放
92
+ * @uniPlatform {
93
+ * "app": {
94
+ * "android": {
95
+ * "osVer": "4.4",
96
+ * "uniVer": "√",
97
+ * "unixVer": "3.9.0"
98
+ * },
99
+ * "ios": {
100
+ * "osVer": "12.0",
101
+ * "uniVer": "√",
102
+ * "unixVer": "4.11"
103
+ * },
104
+ * "harmony": {
105
+ * "osVer": "3.0",
106
+ * "uniVer": "4.23",
107
+ * "unixVer": "x"
108
+ * }
109
+ * },
110
+ * "mp": {
111
+ * "weixin": {
112
+ * "hostVer": "√",
113
+ * "uniVer": "√",
114
+ * "unixVer": "4.41"
115
+ * },
116
+ * "alipay": {
117
+ * "hostVer": "√",
118
+ * "uniVer": "√",
119
+ * "unixVer": "x"
120
+ * },
121
+ * "baidu": {
122
+ * "hostVer": "√",
123
+ * "uniVer": "√",
124
+ * "unixVer": "x"
125
+ * },
126
+ * "toutiao": {
127
+ * "hostVer": "√",
128
+ * "uniVer": "√",
129
+ * "unixVer": "x"
130
+ * },
131
+ * "lark": {
132
+ * "hostVer": "√",
133
+ * "uniVer": "√",
134
+ * "unixVer": "x"
135
+ * },
136
+ * "qq": {
137
+ * "hostVer": "√",
138
+ * "uniVer": "√",
139
+ * "unixVer": "x"
140
+ * },
141
+ * "kuaishou": {
142
+ * "hostVer": "√",
143
+ * "uniVer": "√",
144
+ * "unixVer": "x"
145
+ * },
146
+ * "jd": {
147
+ * "hostVer": "√",
148
+ * "uniVer": "√",
149
+ * "unixVer": "x"
150
+ * }
151
+ * },
152
+ * "web": {
153
+ * "uniVer": "√",
154
+ * "unixVer": "4.0"
155
+ * }
156
+ * }
157
+ * @uniVueVersion 2,3
158
+ */
159
+ play(): void;
160
+ /**
161
+ * @description 暂停
162
+ * @uniPlatform {
163
+ * "app": {
164
+ * "android": {
165
+ * "osVer": "4.4",
166
+ * "uniVer": "√",
167
+ * "unixVer": "3.9.0"
168
+ * },
169
+ * "ios": {
170
+ * "osVer": "12.0",
171
+ * "uniVer": "√",
172
+ * "unixVer": "4.11"
173
+ * },
174
+ * "harmony": {
175
+ * "osVer": "3.0",
176
+ * "uniVer": "4.23",
177
+ * "unixVer": "x"
178
+ * }
179
+ * },
180
+ * "mp": {
181
+ * "weixin": {
182
+ * "hostVer": "√",
183
+ * "uniVer": "√",
184
+ * "unixVer": "4.41"
185
+ * },
186
+ * "alipay": {
187
+ * "hostVer": "√",
188
+ * "uniVer": "√",
189
+ * "unixVer": "x"
190
+ * },
191
+ * "baidu": {
192
+ * "hostVer": "√",
193
+ * "uniVer": "√",
194
+ * "unixVer": "x"
195
+ * },
196
+ * "toutiao": {
197
+ * "hostVer": "√",
198
+ * "uniVer": "√",
199
+ * "unixVer": "x"
200
+ * },
201
+ * "lark": {
202
+ * "hostVer": "√",
203
+ * "uniVer": "√",
204
+ * "unixVer": "x"
205
+ * },
206
+ * "qq": {
207
+ * "hostVer": "√",
208
+ * "uniVer": "√",
209
+ * "unixVer": "x"
210
+ * },
211
+ * "kuaishou": {
212
+ * "hostVer": "√",
213
+ * "uniVer": "√",
214
+ * "unixVer": "x"
215
+ * },
216
+ * "jd": {
217
+ * "hostVer": "√",
218
+ * "uniVer": "√",
219
+ * "unixVer": "x"
220
+ * }
221
+ * },
222
+ * "web": {
223
+ * "uniVer": "√",
224
+ * "unixVer": "4.0"
225
+ * }
226
+ * }
227
+ * @uniVueVersion 2,3
228
+ */
229
+ pause(): void;
230
+ /**
231
+ * @description 跳转到指定位置
232
+ * @param {number} position 跳转到指定位置(秒)
233
+ * @uniPlatform {
234
+ * "app": {
235
+ * "android": {
236
+ * "osVer": "4.4",
237
+ * "uniVer": "√",
238
+ * "unixVer": "3.9.0"
239
+ * },
240
+ * "ios": {
241
+ * "osVer": "12.0",
242
+ * "uniVer": "√",
243
+ * "unixVer": "4.11"
244
+ * },
245
+ * "harmony": {
246
+ * "osVer": "3.0",
247
+ * "uniVer": "4.23",
248
+ * "unixVer": "x"
249
+ * }
250
+ * },
251
+ * "mp": {
252
+ * "weixin": {
253
+ * "hostVer": "√",
254
+ * "uniVer": "√",
255
+ * "unixVer": "4.41"
256
+ * },
257
+ * "alipay": {
258
+ * "hostVer": "√",
259
+ * "uniVer": "√",
260
+ * "unixVer": "x"
261
+ * },
262
+ * "baidu": {
263
+ * "hostVer": "√",
264
+ * "uniVer": "√",
265
+ * "unixVer": "x"
266
+ * },
267
+ * "toutiao": {
268
+ * "hostVer": "√",
269
+ * "uniVer": "√",
270
+ * "unixVer": "x"
271
+ * },
272
+ * "lark": {
273
+ * "hostVer": "√",
274
+ * "uniVer": "√",
275
+ * "unixVer": "x"
276
+ * },
277
+ * "qq": {
278
+ * "hostVer": "√",
279
+ * "uniVer": "√",
280
+ * "unixVer": "x"
281
+ * },
282
+ * "kuaishou": {
283
+ * "hostVer": "√",
284
+ * "uniVer": "√",
285
+ * "unixVer": "x"
286
+ * },
287
+ * "jd": {
288
+ * "hostVer": "√",
289
+ * "uniVer": "√",
290
+ * "unixVer": "x"
291
+ * }
292
+ * },
293
+ * "web": {
294
+ * "uniVer": "√",
295
+ * "unixVer": "4.0"
296
+ * }
297
+ * }
298
+ * @uniVueVersion 2,3
299
+ */
300
+ seek(position: number): void;
301
+ /**
302
+ * @description 停止视频
303
+ * @uniPlatform {
304
+ * "app": {
305
+ * "android": {
306
+ * "osVer": "4.4",
307
+ * "uniVer": "√",
308
+ * "unixVer": "3.9.0"
309
+ * },
310
+ * "ios": {
311
+ * "osVer": "12.0",
312
+ * "uniVer": "√",
313
+ * "unixVer": "4.11"
314
+ * },
315
+ * "harmony": {
316
+ * "osVer": "3.0",
317
+ * "uniVer": "4.23",
318
+ * "unixVer": "x"
319
+ * }
320
+ * },
321
+ * "mp": {
322
+ * "weixin": {
323
+ * "hostVer": "√",
324
+ * "uniVer": "√",
325
+ * "unixVer": "4.41"
326
+ * },
327
+ * "alipay": {
328
+ * "hostVer": "√",
329
+ * "uniVer": "√",
330
+ * "unixVer": "x"
331
+ * },
332
+ * "baidu": {
333
+ * "hostVer": "√",
334
+ * "uniVer": "√",
335
+ * "unixVer": "x"
336
+ * },
337
+ * "toutiao": {
338
+ * "hostVer": "√",
339
+ * "uniVer": "√",
340
+ * "unixVer": "x"
341
+ * },
342
+ * "lark": {
343
+ * "hostVer": "√",
344
+ * "uniVer": "√",
345
+ * "unixVer": "x"
346
+ * },
347
+ * "qq": {
348
+ * "hostVer": "√",
349
+ * "uniVer": "√",
350
+ * "unixVer": "x"
351
+ * },
352
+ * "kuaishou": {
353
+ * "hostVer": "√",
354
+ * "uniVer": "√",
355
+ * "unixVer": "x"
356
+ * },
357
+ * "jd": {
358
+ * "hostVer": "√",
359
+ * "uniVer": "√",
360
+ * "unixVer": "x"
361
+ * }
362
+ * },
363
+ * "web": {
364
+ * "uniVer": "√",
365
+ * "unixVer": "4.0"
366
+ * }
367
+ * }
368
+ * @uniVueVersion 2,3
369
+ */
370
+ stop(): void;
371
+ /**
372
+ * @description 发送弹幕
373
+ * @param {Danmu} 属性 text, color
374
+ * @uniPlatform {
375
+ * "app": {
376
+ * "android": {
377
+ * "osVer": "4.4",
378
+ * "uniVer": "√",
379
+ * "unixVer": "3.9.0"
380
+ * },
381
+ * "ios": {
382
+ * "osVer": "12.0",
383
+ * "uniVer": "√",
384
+ * "unixVer": "4.11"
385
+ * },
386
+ * "harmony": {
387
+ * "osVer": "3.0",
388
+ * "uniVer": "4.23",
389
+ * "unixVer": "x"
390
+ * }
391
+ * },
392
+ * "mp": {
393
+ * "weixin": {
394
+ * "hostVer": "√",
395
+ * "uniVer": "√",
396
+ * "unixVer": "4.41"
397
+ * },
398
+ * "alipay": {
399
+ * "hostVer": "√",
400
+ * "uniVer": "√",
401
+ * "unixVer": "x"
402
+ * },
403
+ * "baidu": {
404
+ * "hostVer": "√",
405
+ * "uniVer": "√",
406
+ * "unixVer": "x"
407
+ * },
408
+ * "toutiao": {
409
+ * "hostVer": "√",
410
+ * "uniVer": "√",
411
+ * "unixVer": "x"
412
+ * },
413
+ * "lark": {
414
+ * "hostVer": "√",
415
+ * "uniVer": "√",
416
+ * "unixVer": "x"
417
+ * },
418
+ * "qq": {
419
+ * "hostVer": "√",
420
+ * "uniVer": "√",
421
+ * "unixVer": "x"
422
+ * },
423
+ * "kuaishou": {
424
+ * "hostVer": "√",
425
+ * "uniVer": "√",
426
+ * "unixVer": "x"
427
+ * },
428
+ * "jd": {
429
+ * "hostVer": "√",
430
+ * "uniVer": "√",
431
+ * "unixVer": "x"
432
+ * }
433
+ * },
434
+ * "web": {
435
+ * "uniVer": "√",
436
+ * "unixVer": "4.0"
437
+ * }
438
+ * }
439
+ * @uniVueVersion 2,3
440
+ */
441
+ sendDanmu(danmu: Danmu): void;
442
+ /**
443
+ * @description 设置倍速播放
444
+ * @param {number} rate, 支持倍率 0.5/0.8/1.0/1.25/1.5
445
+ * @uniPlatform {
446
+ * "app": {
447
+ * "android": {
448
+ * "osVer": "4.4",
449
+ * "uniVer": "√",
450
+ * "unixVer": "3.9.0"
451
+ * },
452
+ * "ios": {
453
+ * "osVer": "12.0",
454
+ * "uniVer": "√",
455
+ * "unixVer": "4.11"
456
+ * },
457
+ * "harmony": {
458
+ * "osVer": "3.0",
459
+ * "uniVer": "4.23",
460
+ * "unixVer": "x"
461
+ * }
462
+ * },
463
+ * "mp": {
464
+ * "weixin": {
465
+ * "hostVer": "√",
466
+ * "uniVer": "√",
467
+ * "unixVer": "4.41"
468
+ * },
469
+ * "alipay": {
470
+ * "hostVer": "√",
471
+ * "uniVer": "√",
472
+ * "unixVer": "x"
473
+ * },
474
+ * "baidu": {
475
+ * "hostVer": "√",
476
+ * "uniVer": "√",
477
+ * "unixVer": "x"
478
+ * },
479
+ * "toutiao": {
480
+ * "hostVer": "√",
481
+ * "uniVer": "√",
482
+ * "unixVer": "x"
483
+ * },
484
+ * "lark": {
485
+ * "hostVer": "√",
486
+ * "uniVer": "√",
487
+ * "unixVer": "x"
488
+ * },
489
+ * "qq": {
490
+ * "hostVer": "√",
491
+ * "uniVer": "√",
492
+ * "unixVer": "x"
493
+ * },
494
+ * "kuaishou": {
495
+ * "hostVer": "√",
496
+ * "uniVer": "√",
497
+ * "unixVer": "x"
498
+ * },
499
+ * "jd": {
500
+ * "hostVer": "√",
501
+ * "uniVer": "√",
502
+ * "unixVer": "x"
503
+ * }
504
+ * },
505
+ * "web": {
506
+ * "uniVer": "√",
507
+ * "unixVer": "4.0"
508
+ * }
509
+ * }
510
+ * @uniVueVersion 2,3
511
+ */
512
+ playbackRate(rate: number): void;
513
+ /**
514
+ * @description 进入全屏
515
+ * @param {RequestFullScreenOptions} direction, 0|正常竖向, 90|屏幕逆时针90度, -90|屏幕顺时针90度
516
+ * @uniPlatform {
517
+ * "app": {
518
+ * "android": {
519
+ * "osVer": "4.4",
520
+ * "uniVer": "√",
521
+ * "unixVer": "3.9.0"
522
+ * },
523
+ * "ios": {
524
+ * "osVer": "12.0",
525
+ * "uniVer": "√",
526
+ * "unixVer": "4.11"
527
+ * },
528
+ * "harmony": {
529
+ * "osVer": "3.0",
530
+ * "uniVer": "4.23",
531
+ * "unixVer": "x"
532
+ * }
533
+ * },
534
+ * "mp": {
535
+ * "weixin": {
536
+ * "hostVer": "√",
537
+ * "uniVer": "√",
538
+ * "unixVer": "4.41"
539
+ * },
540
+ * "alipay": {
541
+ * "hostVer": "√",
542
+ * "uniVer": "√",
543
+ * "unixVer": "x"
544
+ * },
545
+ * "baidu": {
546
+ * "hostVer": "√",
547
+ * "uniVer": "√",
548
+ * "unixVer": "x"
549
+ * },
550
+ * "toutiao": {
551
+ * "hostVer": "√",
552
+ * "uniVer": "√",
553
+ * "unixVer": "x"
554
+ * },
555
+ * "lark": {
556
+ * "hostVer": "√",
557
+ * "uniVer": "√",
558
+ * "unixVer": "x"
559
+ * },
560
+ * "qq": {
561
+ * "hostVer": "√",
562
+ * "uniVer": "√",
563
+ * "unixVer": "x"
564
+ * },
565
+ * "kuaishou": {
566
+ * "hostVer": "√",
567
+ * "uniVer": "√",
568
+ * "unixVer": "x"
569
+ * },
570
+ * "jd": {
571
+ * "hostVer": "√",
572
+ * "uniVer": "√",
573
+ * "unixVer": "x"
574
+ * }
575
+ * },
576
+ * "web": {
577
+ * "uniVer": "√",
578
+ * "unixVer": "4.0"
579
+ * }
580
+ * }
581
+ * @uniVueVersion 2,3
582
+ */
583
+ requestFullScreen(direction?: RequestFullScreenOptions | null): void;
584
+ /**
585
+ * 退出全屏
586
+ * @description 退出全屏
587
+ * @uniPlatform {
588
+ * "app": {
589
+ * "android": {
590
+ * "osVer": "4.4",
591
+ * "uniVer": "√",
592
+ * "unixVer": "3.9.0"
593
+ * },
594
+ * "ios": {
595
+ * "osVer": "12.0",
596
+ * "uniVer": "√",
597
+ * "unixVer": "4.11"
598
+ * },
599
+ * "harmony": {
600
+ * "osVer": "3.0",
601
+ * "uniVer": "4.23",
602
+ * "unixVer": "x"
603
+ * }
604
+ * },
605
+ * "mp": {
606
+ * "weixin": {
607
+ * "hostVer": "√",
608
+ * "uniVer": "√",
609
+ * "unixVer": "4.41"
610
+ * },
611
+ * "alipay": {
612
+ * "hostVer": "√",
613
+ * "uniVer": "√",
614
+ * "unixVer": "x"
615
+ * },
616
+ * "baidu": {
617
+ * "hostVer": "√",
618
+ * "uniVer": "√",
619
+ * "unixVer": "x"
620
+ * },
621
+ * "toutiao": {
622
+ * "hostVer": "√",
623
+ * "uniVer": "√",
624
+ * "unixVer": "x"
625
+ * },
626
+ * "lark": {
627
+ * "hostVer": "√",
628
+ * "uniVer": "√",
629
+ * "unixVer": "x"
630
+ * },
631
+ * "qq": {
632
+ * "hostVer": "√",
633
+ * "uniVer": "√",
634
+ * "unixVer": "x"
635
+ * },
636
+ * "kuaishou": {
637
+ * "hostVer": "√",
638
+ * "uniVer": "√",
639
+ * "unixVer": "x"
640
+ * },
641
+ * "jd": {
642
+ * "hostVer": "√",
643
+ * "uniVer": "√",
644
+ * "unixVer": "x"
645
+ * }
646
+ * },
647
+ * "web": {
648
+ * "uniVer": "√",
649
+ * "unixVer": "4.0"
650
+ * }
651
+ * }
652
+ * @uniVueVersion 2,3
653
+ */
654
+ exitFullScreen(): void;
655
+ }
656
+
657
+ export interface Uni {
658
+ /**
659
+ * 创建并返回 video 上下文 videoContext 对象
660
+ * @uniPlatform {
661
+ * "app": {
662
+ * "android": {
663
+ * "osVer": "4.4",
664
+ * "uniVer": "√",
665
+ * "unixVer": "√"
666
+ * },
667
+ * "ios": {
668
+ * "osVer": "12.0",
669
+ * "uniVer": "√",
670
+ * "unixVer": "4.11"
671
+ * },
672
+ * "harmony": {
673
+ * "osVer": "3.0",
674
+ * "uniVer": "4.23",
675
+ * "unixVer": "x"
676
+ * }
677
+ * },
678
+ * "web": {
679
+ * "uniVer": "√",
680
+ * "unixVer": "4.0"
681
+ * },
682
+ * "mp": {
683
+ * "weixin": {
684
+ * "hostVer": "√",
685
+ * "uniVer": "√",
686
+ * "unixVer": "4.41"
687
+ * },
688
+ * "alipay": {
689
+ * "hostVer": "1.10.0",
690
+ * "uniVer": "√",
691
+ * "unixVer": "x"
692
+ * },
693
+ * "baidu": {
694
+ * "hostVer": "√",
695
+ * "uniVer": "√",
696
+ * "unixVer": "x"
697
+ * },
698
+ * "toutiao": {
699
+ * "hostVer": "√",
700
+ * "uniVer": "√",
701
+ * "unixVer": "x"
702
+ * },
703
+ * "lark": {
704
+ * "hostVer": "√",
705
+ * "uniVer": "√",
706
+ * "unixVer": "x"
707
+ * },
708
+ * "qq": {
709
+ * "hostVer": "√",
710
+ * "uniVer": "√",
711
+ * "unixVer": "x"
712
+ * },
713
+ * "kuaishou": {
714
+ * "hostVer": "√",
715
+ * "uniVer": "√",
716
+ * "unixVer": "x"
717
+ * },
718
+ * "jd": {
719
+ * "hostVer": "√",
720
+ * "uniVer": "√",
721
+ * "unixVer": "x"
722
+ * }
723
+ * }
724
+ * }
725
+ * @uniVueVersion 2,3
726
+ * @return {VideoContext} video组件上下文对象
727
+ *
728
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/media/video-context.html#createvideocontext
729
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/create-video-context.html#createvideocontext
730
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/create-video-context.html#createvideocontext
731
+ *
732
+ */
733
+ createVideoContext: CreateVideoContext
734
+ }
735
+
736
+ /**
737
+ * 通用事件
738
+ * 临时方案,规避组件Event接口无法直接继承UniEvent的问题
739
+ */
740
+ interface UniVideoEvent {
741
+ /**
742
+ * 是否冒泡
743
+ */
744
+ bubbles: boolean
745
+ /**
746
+ * 是否可以取消
747
+ */
748
+ cancelable: boolean
749
+ /**
750
+ * 事件类型
751
+ */
752
+ type: string
753
+ /**
754
+ * 触发事件的组件
755
+ */
756
+ target?: UniElement | null
757
+ /**
758
+ * 当前组件
759
+ */
760
+ currentTarget?: UniElement | null
761
+ /**
762
+ * 事件发生时的时间戳
763
+ */
764
+ timeStamp: Long
765
+ /**
766
+ * 阻止当前事件的进一步传播
767
+ */
768
+ stopPropagation(): void
769
+ /**
770
+ * 阻止当前事件的默认行为
771
+ */
772
+ preventDefault(): void
773
+ }
774
+
775
+ /**
776
+ * timeupdate 事件
777
+ * 播放进度变化时触发
778
+ */
779
+ export interface UniVideoTimeUpdateEvent extends UniVideoEvent {
780
+ detail: UniVideoTimeUpdateEventDetail
781
+ }
782
+
783
+ export type UniVideoTimeUpdateEventDetail = {
784
+ /**
785
+ * 当前进度
786
+ */
787
+ currentTime: number,
788
+ /**
789
+ * 总进度
790
+ */
791
+ duration: number
792
+ }
793
+
794
+ /**
795
+ * fullscreenchange 事件
796
+ * 当视频进入和退出全屏是触发
797
+ */
798
+ export interface UniVideoFullScreenChangeEvent extends UniVideoEvent {
799
+ detail: UniVideoFullScreenChangeEventDetail
800
+ }
801
+
802
+ export type UniVideoFullScreenChangeEventDetail = {
803
+ /**
804
+ * 是否全屏
805
+ */
806
+ fullScreen: boolean,
807
+ /**
808
+ * 横竖屏,取值 vertical 或 horizontal
809
+ */
810
+ direction: string
811
+ }
812
+
813
+ /**
814
+ * error 事件
815
+ * 视频播放出错时触发
816
+ */
817
+ export interface UniVideoErrorEvent extends UniVideoEvent {
818
+ detail: VideoError
819
+ }
820
+
821
+ /**
822
+ * 统一错误码
823
+ * 100001 网络错误
824
+ * 200001 内部错误
825
+ * 300001 SDK错误
826
+ */
827
+ export type VideoErrorCode = 100001 | 200001 | 300001
828
+
829
+ export interface VideoError extends IUniError {
830
+ errCode: VideoErrorCode
831
+ }
832
+
833
+ /**
834
+ * progress 事件
835
+ * 加载进度变化时触发
836
+ */
837
+ export interface UniVideoProgressEvent extends UniVideoEvent {
838
+ detail: UniVideoProgressEventDetail
839
+ }
840
+
841
+ export type UniVideoProgressEventDetail = {
842
+ /**
843
+ * 加载进度百分比
844
+ */
845
+ buffered: number
846
+ }
847
+
848
+ /**
849
+ * fullscreenclick 事件
850
+ * 视频播放全屏播放时点击事件
851
+ */
852
+ export interface UniVideoFullScreenClickEvent extends UniVideoEvent {
853
+ detail: UniVideoFullScreenClickEventDetail
854
+ }
855
+
856
+ export type UniVideoFullScreenClickEventDetail = {
857
+ /**
858
+ * 点击点相对于屏幕左侧边缘的 X 轴坐标
859
+ */
860
+ screenX: number,
861
+ /**
862
+ * 点击点相对于屏幕顶部边缘的 Y 轴坐标
863
+ */
864
+ screenY: number,
865
+ /**
866
+ * 屏幕总宽度
867
+ */
868
+ screenWidth: number,
869
+ /**
870
+ * 屏幕总高度
871
+ */
872
+ screenHeight: number
873
+ }
874
+
875
+ /**
876
+ * controlstoggle 事件
877
+ * 切换播放控件显示隐藏时触发
878
+ */
879
+ export interface UniVideoControlsToggleEvent extends UniVideoEvent {
880
+ detail: UniVideoControlsToggleEventDetail
881
+ }
882
+
883
+ export type UniVideoControlsToggleEventDetail = {
884
+ /**
885
+ * 是否显示
886
+ */
887
+ show: boolean
888
+ }
889
+
890
+ export type VideoTimeUpdateEvent = UniVideoTimeUpdateEvent
891
+ export type VideoTimeUpdateEventDetail = UniVideoTimeUpdateEventDetail
892
+ export type VideoFullScreenChangeEvent = UniVideoFullScreenChangeEvent
893
+ export type VideoFullScreenChangeEventDetail = UniVideoFullScreenChangeEventDetail
894
+ export type VideoErrorEvent = UniVideoErrorEvent
895
+ export type VideoProgressEvent = UniVideoProgressEvent
896
+ export type VideoProgressEventDetail = UniVideoProgressEventDetail
897
+ export type VideoFullScreenClickEvent = UniVideoFullScreenClickEvent
898
+ export type VideoFullScreenClickEventDetail = UniVideoFullScreenClickEventDetail
899
+ export type VideoControlsToggleEvent = UniVideoControlsToggleEvent
900
+ export type VideoControlsToggleEventDetail = UniVideoControlsToggleEventDetail