@dcloudio/uni-app-x 0.7.58 → 0.7.59

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