@dcloudio/uni-app-x 0.7.7 → 0.7.8

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 (215) hide show
  1. package/README.md +1 -1
  2. package/index.d.ts +1 -1
  3. package/options.d.ts +9 -9
  4. package/package.json +27 -27
  5. package/types/app.d.ts +843 -843
  6. package/types/index.d.ts +7 -7
  7. package/types/native/AsyncApiResult.d.ts +7 -7
  8. package/types/native/CSSStyleDeclaration.d.ts +25 -25
  9. package/types/native/DOMRect.d.ts +56 -56
  10. package/types/native/DrawableContext.d.ts +162 -162
  11. package/types/native/INavigationBar.d.ts +22 -22
  12. package/types/native/IUniElement.d.ts +762 -755
  13. package/types/native/IUniError.d.ts +20 -20
  14. package/types/native/IUniForm.d.ts +9 -9
  15. package/types/native/NativeLoadFontFaceOptions.d.ts +11 -11
  16. package/types/native/NodeData.d.ts +22 -22
  17. package/types/native/PageNode.d.ts +6 -6
  18. package/types/native/SnapshotOptions.d.ts +63 -63
  19. package/types/native/SourceError.d.ts +46 -46
  20. package/types/native/UTSAndroidHookProxy.d.ts +14 -14
  21. package/types/native/UniAggregateError.d.ts +19 -19
  22. package/types/native/UniApp.d.ts +66 -66
  23. package/types/native/UniCallbackWrapper.d.ts +7 -7
  24. package/types/native/UniCustomEvent.d.ts +24 -24
  25. package/types/native/UniDocument.d.ts +35 -35
  26. package/types/native/UniElement.d.ts +74 -74
  27. package/types/native/UniError.d.ts +70 -70
  28. package/types/native/UniEvent.d.ts +62 -62
  29. package/types/native/UniFormControl.d.ts +8 -8
  30. package/types/native/UniFormControlElement.d.ts +14 -14
  31. package/types/native/UniImageErrorEvent.d.ts +15 -15
  32. package/types/native/UniImageLoadEvent.d.ts +19 -19
  33. package/types/native/UniInputBlurEvent.d.ts +19 -19
  34. package/types/native/UniInputConfirmEvent.d.ts +15 -15
  35. package/types/native/UniInputEvent.d.ts +33 -24
  36. package/types/native/UniInputFocusEvent.d.ts +33 -33
  37. package/types/native/{UniPage.d.ts → UniNativePage.d.ts} +141 -96
  38. package/types/native/UniPageEvent.d.ts +10 -10
  39. package/types/native/UniPageManager.d.ts +17 -17
  40. package/types/native/UniPageScrollEvent.d.ts +13 -13
  41. package/types/native/UniPointerEvent.d.ts +74 -73
  42. package/types/native/UniRefresherEvent.d.ts +18 -14
  43. package/types/native/UniResizeEvent.d.ts +34 -34
  44. package/types/native/UniRichTextItemClickEvent.d.ts +23 -23
  45. package/types/native/UniScrollEvent.d.ts +42 -36
  46. package/types/native/UniScrollToLowerEvent.d.ts +23 -16
  47. package/types/native/UniScrollToUpperEvent.d.ts +23 -16
  48. package/types/native/UniStartNestedScrollEvent.d.ts +33 -33
  49. package/types/native/UniStopNestedScrollEvent.d.ts +28 -28
  50. package/types/native/UniSwiperAnimationFinishEvent.d.ts +19 -19
  51. package/types/native/UniSwiperChangeEvent.d.ts +19 -19
  52. package/types/native/UniSwiperTransitionEvent.d.ts +19 -19
  53. package/types/native/UniTabTapEvent.d.ts +18 -18
  54. package/types/native/UniTabsElement.d.ts +29 -29
  55. package/types/native/UniTextElement.d.ts +17 -17
  56. package/types/native/UniTextareaFocusEvent.d.ts +34 -34
  57. package/types/native/UniTouchEvent.d.ts +64 -60
  58. package/types/native/UniVideoElement.d.ts +70 -70
  59. package/types/native/UniWebViewDownloadEvent.d.ts +42 -42
  60. package/types/native/UniWebViewElement.d.ts +10 -10
  61. package/types/native/UniWebViewErrorEvent.d.ts +37 -37
  62. package/types/native/UniWebViewLoadEvent.d.ts +26 -26
  63. package/types/native/UniWebViewLoadingEvent.d.ts +27 -27
  64. package/types/native/UniWebViewMessageEvent.d.ts +26 -26
  65. package/types/native/UniWebViewServiceMessageEvent.d.ts +8 -8
  66. package/types/native/ViewToTempFilePathOptions.d.ts +47 -47
  67. package/types/native/WebViewStyles.d.ts +20 -20
  68. package/types/native/global.d.ts +446 -429
  69. package/types/native/index.d.ts +65 -65
  70. package/types/native-global/index.d.ts +1 -1
  71. package/types/page.d.ts +1593 -1593
  72. package/types/process.d.ts +5 -5
  73. package/types/uni/base/index.d.ts +3 -3
  74. package/types/uni/core/global.d.ts +13 -13
  75. package/types/uni/core/index.d.ts +13 -13
  76. package/types/uni/core/lib/base/event/global.d.ts +16 -16
  77. package/types/uni/core/lib/base/event/index.d.ts +7 -7
  78. package/types/uni/core/lib/base/event/interface.d.ts +277 -277
  79. package/types/uni/core/lib/base/interceptor/global.d.ts +18 -18
  80. package/types/uni/core/lib/base/interceptor/index.d.ts +8 -8
  81. package/types/uni/core/lib/base/interceptor/interface.d.ts +150 -150
  82. package/types/uni/core/lib/interface.d.ts +28 -28
  83. package/types/uni/core/lib/lifecycle/global.d.ts +10 -10
  84. package/types/uni/core/lib/lifecycle/index.d.ts +4 -4
  85. package/types/uni/core/lib/lifecycle/interface.d.ts +37 -37
  86. package/types/uni/core/lib/performance/global.d.ts +22 -22
  87. package/types/uni/core/lib/performance/index.d.ts +10 -10
  88. package/types/uni/core/lib/performance/interface.d.ts +157 -157
  89. package/types/uni/core/lib/route/global.d.ts +68 -68
  90. package/types/uni/core/lib/route/index.d.ts +33 -33
  91. package/types/uni/core/lib/route/interface.d.ts +2031 -2031
  92. package/types/uni/core/lib/ui/create-selector-query/global.d.ts +20 -20
  93. package/types/uni/core/lib/ui/create-selector-query/index.d.ts +9 -9
  94. package/types/uni/core/lib/ui/create-selector-query/interface.d.ts +412 -412
  95. package/types/uni/core/lib/ui/get-element-by-id/global.d.ts +10 -10
  96. package/types/uni/core/lib/ui/get-element-by-id/index.d.ts +4 -4
  97. package/types/uni/core/lib/ui/get-element-by-id/interface.d.ts +73 -73
  98. package/types/uni/core/lib/ui/load-font-face/global.d.ts +26 -26
  99. package/types/uni/core/lib/ui/load-font-face/index.d.ts +12 -12
  100. package/types/uni/core/lib/ui/load-font-face/interface.d.ts +560 -560
  101. package/types/uni/core/lib/ui/page-scroll-to/global.d.ts +26 -26
  102. package/types/uni/core/lib/ui/page-scroll-to/index.d.ts +12 -12
  103. package/types/uni/core/lib/ui/page-scroll-to/interface.d.ts +145 -145
  104. package/types/uni/core/lib/ui/pull-down-refresh/global.d.ts +28 -28
  105. package/types/uni/core/lib/ui/pull-down-refresh/index.d.ts +13 -13
  106. package/types/uni/core/lib/ui/pull-down-refresh/interface.d.ts +176 -176
  107. package/types/uni/core/lib/ui/set-navigation-bar-color/global.d.ts +28 -28
  108. package/types/uni/core/lib/ui/set-navigation-bar-color/index.d.ts +13 -13
  109. package/types/uni/core/lib/ui/set-navigation-bar-color/interface.d.ts +431 -431
  110. package/types/uni/core/lib/ui/set-navigation-bar-title/global.d.ts +28 -28
  111. package/types/uni/core/lib/ui/set-navigation-bar-title/index.d.ts +13 -13
  112. package/types/uni/core/lib/ui/set-navigation-bar-title/interface.d.ts +368 -368
  113. package/types/uni/core/lib/ui/tab-bar/global.d.ts +130 -130
  114. package/types/uni/core/lib/ui/tab-bar/index.d.ts +64 -64
  115. package/types/uni/core/lib/ui/tab-bar/interface.d.ts +928 -928
  116. package/types/uni/env/index.d.ts +64 -64
  117. package/types/uni/global.d.ts +6 -6
  118. package/types/uni/index.d.ts +3 -3
  119. package/types/uni/uts-plugin-api/global.d.ts +23 -22
  120. package/types/uni/uts-plugin-api/index.d.ts +23 -22
  121. package/types/uni/uts-plugin-api/lib/uni-createRequestPermissionListener/utssdk/global.d.ts +18 -18
  122. package/types/uni/uts-plugin-api/lib/uni-createRequestPermissionListener/utssdk/index.d.ts +8 -8
  123. package/types/uni/uts-plugin-api/lib/uni-createRequestPermissionListener/utssdk/interface.d.ts +43 -43
  124. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/global.d.ts +12 -12
  125. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/index.d.ts +5 -5
  126. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/interface.d.ts +101 -101
  127. package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/global.d.ts +26 -26
  128. package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/index.d.ts +12 -12
  129. package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/interface.d.ts +82 -82
  130. package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/global.d.ts +66 -66
  131. package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/index.d.ts +32 -32
  132. package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/interface.d.ts +423 -423
  133. package/types/uni/uts-plugin-api/lib/uni-getAccessibilityInfo/utssdk/global.d.ts +10 -10
  134. package/types/uni/uts-plugin-api/lib/uni-getAccessibilityInfo/utssdk/index.d.ts +4 -4
  135. package/types/uni/uts-plugin-api/lib/uni-getAppAuthorizeSetting/utssdk/global.d.ts +12 -12
  136. package/types/uni/uts-plugin-api/lib/uni-getAppAuthorizeSetting/utssdk/index.d.ts +5 -5
  137. package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/global.d.ts +14 -14
  138. package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/index.d.ts +6 -6
  139. package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/interface.d.ts +350 -350
  140. package/types/uni/uts-plugin-api/lib/uni-getDeviceInfo/utssdk/global.d.ts +14 -14
  141. package/types/uni/uts-plugin-api/lib/uni-getDeviceInfo/utssdk/index.d.ts +6 -6
  142. package/types/uni/uts-plugin-api/lib/uni-getLocation-system/utssdk/global.d.ts +20 -20
  143. package/types/uni/uts-plugin-api/lib/uni-getLocation-system/utssdk/index.d.ts +9 -9
  144. package/types/uni/uts-plugin-api/lib/uni-getLocation-system/utssdk/interface.d.ts +151 -151
  145. package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/global.d.ts +24 -24
  146. package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/index.d.ts +11 -11
  147. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/global.d.ts +24 -0
  148. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/index.d.ts +11 -0
  149. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/interface.d.ts +87 -0
  150. package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/global.d.ts +30 -30
  151. package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/index.d.ts +14 -14
  152. package/types/uni/uts-plugin-api/lib/uni-getSystemSetting/utssdk/global.d.ts +12 -12
  153. package/types/uni/uts-plugin-api/lib/uni-getSystemSetting/utssdk/index.d.ts +5 -5
  154. package/types/uni/uts-plugin-api/lib/uni-installApk/utssdk/global.d.ts +24 -24
  155. package/types/uni/uts-plugin-api/lib/uni-installApk/utssdk/index.d.ts +11 -11
  156. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/global.d.ts +158 -158
  157. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/index.d.ts +78 -78
  158. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/interface.d.ts +906 -906
  159. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/app-ios/global.d.ts +68 -68
  160. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/app-ios/index.d.ts +33 -33
  161. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/global.d.ts +72 -72
  162. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/index.d.ts +35 -35
  163. package/types/uni/uts-plugin-api/lib/uni-openAppAuthorizeSetting/utssdk/global.d.ts +24 -24
  164. package/types/uni/uts-plugin-api/lib/uni-openAppAuthorizeSetting/utssdk/index.d.ts +11 -11
  165. package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/global.d.ts +74 -62
  166. package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/index.d.ts +36 -30
  167. package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/interface.d.ts +40 -8
  168. package/types/uni/uts-plugin-api/lib/uni-requestPayment-alipay/utssdk/global.d.ts +28 -28
  169. package/types/uni/uts-plugin-api/lib/uni-requestPayment-alipay/utssdk/index.d.ts +13 -13
  170. package/types/uni/uts-plugin-api/lib/uni-requestPayment-alipay/utssdk/interface.d.ts +1 -1
  171. package/types/uni/uts-plugin-api/lib/uni-rpx2px/utssdk/global.d.ts +10 -10
  172. package/types/uni/uts-plugin-api/lib/uni-rpx2px/utssdk/index.d.ts +4 -4
  173. package/types/uni/uts-plugin-api/lib/uni-rpx2px/utssdk/interface.d.ts +33 -33
  174. package/types/uni/uts-plugin-api/lib/uni-storage/utssdk/global.d.ts +78 -78
  175. package/types/uni/uts-plugin-api/lib/uni-storage/utssdk/index.d.ts +38 -38
  176. package/types/uni/uts-plugin-api/lib/uni-storage/utssdk/interface.d.ts +531 -531
  177. package/types/uni/uts-plugin-api/lib/uni-websocket/utssdk/global.d.ts +58 -58
  178. package/types/uni/uts-plugin-api/lib/uni-websocket/utssdk/index.d.ts +28 -28
  179. package/types/uni/uts-plugin-biz/global.d.ts +4 -4
  180. package/types/uni/uts-plugin-biz/index.d.ts +4 -4
  181. package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/global.d.ts +36 -36
  182. package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/index.d.ts +17 -17
  183. package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/interface.d.ts +132 -132
  184. package/types/uni/uts-plugin-biz/lib/uni-facialRecognitionVerify/utssdk/global.d.ts +28 -28
  185. package/types/uni/uts-plugin-biz/lib/uni-facialRecognitionVerify/utssdk/index.d.ts +13 -13
  186. package/types/uni/uts-plugin-biz/lib/uni-facialRecognitionVerify/utssdk/interface.d.ts +141 -141
  187. package/types/uni/uts-plugin-biz/lib/uni-push/utssdk/global.d.ts +56 -56
  188. package/types/uni/uts-plugin-biz/lib/uni-push/utssdk/index.d.ts +27 -27
  189. package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/global.d.ts +46 -46
  190. package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/index.d.ts +22 -22
  191. package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/interface.d.ts +203 -203
  192. package/types/uni/uts-plugin-component/global.d.ts +1 -1
  193. package/types/uni/uts-plugin-component/index.d.ts +1 -1
  194. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/global.d.ts +64 -64
  195. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/index.d.ts +31 -31
  196. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/interface.d.ts +356 -356
  197. package/types/uni-cloud/index.d.ts +59 -59
  198. package/types/uni-cloud/interface.d.ts +801 -801
  199. package/types/uni-cloud/unicloud-db/index.ts +313 -313
  200. package/types/uni-global/index.d.ts +1 -1
  201. package/types/vue/CheckboxGroupChangeEvent.d.ts +36 -36
  202. package/types/vue/LifeCycle.d.ts +55 -55
  203. package/types/vue/PickerViewChangeEvent.d.ts +36 -36
  204. package/types/vue/ProgressActiveendEvent.d.ts +30 -30
  205. package/types/vue/RadioGroupChangeEvent.d.ts +36 -36
  206. package/types/vue/SliderChangeEvent.d.ts +32 -32
  207. package/types/vue/SwitchChangeEvent.d.ts +30 -30
  208. package/types/vue/UniCanvasElement.d.ts +270 -270
  209. package/types/vue/UniCloudDBElement.d.ts +215 -215
  210. package/types/vue/UniFormElement.d.ts +51 -51
  211. package/types/vue/UniNavigatorElement.d.ts +7 -7
  212. package/types/vue/index.d.ts +11 -11
  213. package/uts-plugin.d.ts +26 -26
  214. package/types/uni-cloud/unicloud-db/index.d.ts +0 -81
  215. package/types/vue/UniButtonElement.d.ts +0 -7
@@ -1,357 +1,357 @@
1
- import { ComponentPublicInstance } from 'vue';
2
-
3
- export type CreateVideoContext = (videoId : string.VideoIdString, component ?: ComponentPublicInstance | null) => VideoContext | null;
4
-
5
- export type Danmu = {
6
- /**
7
- * 弹幕文字
8
- */
9
- text ?: string | null,
10
- /**
11
- * 弹幕颜色
12
- */
13
- color ?: string | null,
14
- /**
15
- * 显示时刻
16
- */
17
- time ?: number | null
18
- };
19
-
20
- export type RequestFullScreenOptions = {
21
- /**
22
- * direction
23
- * - 0: 正常竖向
24
- * - 90: 屏幕逆时针90度
25
- * - -90: 屏幕顺时针90度
26
- * @type 0 | 90 | -90
27
- * @uniPlatform {
28
- * "app": {
29
- * "android": {
30
- * "osVer": "4.4",
31
- * "uniVer": "√",
32
- * "unixVer": "3.9.0"
33
- * }
34
- * },
35
- * "web": {
36
- * "uniVer": "x",
37
- * "unixVer": "x"
38
- * }
39
- * }
40
- */
41
- direction ?: number | null
42
- };
43
-
44
- export interface VideoContext {
45
- /**
46
- * @description 播放
47
- * @uniPlatform {
48
- * "app": {
49
- * "android": {
50
- * "osVer": "4.4",
51
- * "uniVer": "√",
52
- * "unixVer": "3.9.0"
53
- * }
54
- * },
55
- * "web": {
56
- * "uniVer": "√",
57
- * "unixVer": "4.0"
58
- * }
59
- * }
60
- * @uniVueVersion 2,3
61
- */
62
- play() : void;
63
- /**
64
- * @description 暂停
65
- * @uniPlatform {
66
- * "app": {
67
- * "android": {
68
- * "osVer": "4.4",
69
- * "uniVer": "√",
70
- * "unixVer": "3.9.0"
71
- * }
72
- * },
73
- * "web": {
74
- * "uniVer": "√",
75
- * "unixVer": "4.0"
76
- * }
77
- * }
78
- * @uniVueVersion 2,3
79
- */
80
- pause() : void;
81
- /**
82
- * @description 跳转到指定位置
83
- * @param {number} position 跳转到指定位置(秒)
84
- * @uniPlatform {
85
- * "app": {
86
- * "android": {
87
- * "osVer": "4.4",
88
- * "uniVer": "√",
89
- * "unixVer": "3.9.0"
90
- * }
91
- * },
92
- * "web": {
93
- * "uniVer": "√",
94
- * "unixVer": "4.0"
95
- * }
96
- * }
97
- * @uniVueVersion 2,3
98
- */
99
- seek(position : number) : void;
100
- /**
101
- * @description 停止视频
102
- * @uniPlatform {
103
- * "app": {
104
- * "android": {
105
- * "osVer": "4.4",
106
- * "uniVer": "√",
107
- * "unixVer": "3.9.0"
108
- * }
109
- * },
110
- * "web": {
111
- * "uniVer": "√",
112
- * "unixVer": "4.0"
113
- * }
114
- * }
115
- * @uniVueVersion 2,3
116
- */
117
- stop() : void;
118
- /**
119
- * @description 发送弹幕
120
- * @param {Danmu} 属性 text, color
121
- * @uniPlatform {
122
- * "app": {
123
- * "android": {
124
- * "osVer": "4.4",
125
- * "uniVer": "√",
126
- * "unixVer": "3.9.0"
127
- * }
128
- * },
129
- * "web": {
130
- * "uniVer": "√",
131
- * "unixVer": "4.0"
132
- * }
133
- * }
134
- * @uniVueVersion 2,3
135
- */
136
- sendDanmu(danmu : Danmu) : void;
137
- /**
138
- * @description 设置倍速播放
139
- * @param {number} rate, 支持倍率 0.5/0.8/1.0/1.25/1.5
140
- * @uniPlatform {
141
- * "app": {
142
- * "android": {
143
- * "osVer": "4.4",
144
- * "uniVer": "√",
145
- * "unixVer": "3.9.0"
146
- * }
147
- * },
148
- * "web": {
149
- * "uniVer": "√",
150
- * "unixVer": "4.0"
151
- * }
152
- * }
153
- * @uniVueVersion 2,3
154
- */
155
- playbackRate(rate : number) : void;
156
- /**
157
- * @description 进入全屏
158
- * @param {RequestFullScreenOptions} direction, 0|正常竖向, 90|屏幕逆时针90度, -90|屏幕顺时针90度
159
- * @uniPlatform {
160
- * "app": {
161
- * "android": {
162
- * "osVer": "4.4",
163
- * "uniVer": "√",
164
- * "unixVer": "3.9.0"
165
- * }
166
- * },
167
- * "web": {
168
- * "uniVer": "√",
169
- * "unixVer": "4.0"
170
- * }
171
- * }
172
- * @uniVueVersion 2,3
173
- */
174
- requestFullScreen(direction ?: RequestFullScreenOptions | null) : void;
175
- /**
176
- * 退出全屏
177
- * @description 退出全屏
178
- * @uniPlatform {
179
- * "app": {
180
- * "android": {
181
- * "osVer": "4.4",
182
- * "uniVer": "√",
183
- * "unixVer": "3.9.0"
184
- * }
185
- * },
186
- * "web": {
187
- * "uniVer": "√",
188
- * "unixVer": "4.0"
189
- * }
190
- * }
191
- * @uniVueVersion 2,3
192
- */
193
- exitFullScreen() : void;
194
- }
195
-
196
- export interface Uni {
197
- /**
198
- * 创建并返回 video 上下文 videoContext 对象
199
- * @description 创建并返回 video 上下文 videoContext 对象
200
- * @uniPlatform {
201
- * "app": {
202
- * "android": {
203
- * "osVer": "4.4",
204
- * "uniVer": "√",
205
- * "unixVer": "√"
206
- * }
207
- * },
208
- * "web": {
209
- * "uniVer": "√",
210
- * "unixVer": "4.0"
211
- * }
212
- * }
213
- * @uniVueVersion 2,3
214
- * @return {VideoContext} video组件上下文对象
215
- *
216
- * @tutorial http://uniapp.dcloud.io/api/media/video-context?id=createVideoContext
217
- *
218
- */
219
- createVideoContext : CreateVideoContext
220
- }
221
-
222
- /**
223
- * 通用事件
224
- */
225
- interface UniVideoEvent {
226
- type : string
227
- target : Element | null
228
- currentTarget : Element | null
229
- timeStamp : Long
230
- }
231
-
232
- /**
233
- * timeupdate 事件
234
- * 播放进度变化时触发
235
- */
236
- export interface UniVideoTimeUpdateEvent extends UniVideoEvent {
237
- detail : UniVideoTimeUpdateEventDetail
238
- }
239
-
240
- export type UniVideoTimeUpdateEventDetail = {
241
- /**
242
- * 当前进度
243
- */
244
- currentTime : number,
245
- /**
246
- * 总进度
247
- */
248
- duration : number
249
- }
250
-
251
- /**
252
- * fullscreenchange 事件
253
- * 当视频进入和退出全屏是触发
254
- */
255
- export interface UniVideoFullScreenChangeEvent extends UniVideoEvent {
256
- detail : UniVideoFullScreenChangeEventDetail
257
- }
258
-
259
- export type UniVideoFullScreenChangeEventDetail = {
260
- /**
261
- * 是否全屏
262
- */
263
- fullScreen : boolean,
264
- /**
265
- * 横竖屏,取值 vertical 或 horizontal
266
- */
267
- direction : string
268
- }
269
-
270
- /**
271
- * error 事件
272
- * 视频播放出错时触发
273
- */
274
- export interface UniVideoErrorEvent extends UniVideoEvent {
275
- detail : VideoError
276
- }
277
-
278
- /**
279
- * 统一错误码
280
- * 100001 网络错误
281
- * 200001 内部错误
282
- * 300001 SDK错误
283
- */
284
- export type VideoErrorCode = 100001 | 200001 | 300001
285
-
286
- export interface VideoError extends IUniError {
287
- errCode : VideoErrorCode
288
- }
289
-
290
- /**
291
- * progress 事件
292
- * 加载进度变化时触发
293
- */
294
- export interface UniVideoProgressEvent extends UniVideoEvent {
295
- detail : UniVideoProgressEventDetail
296
- }
297
-
298
- export type UniVideoProgressEventDetail = {
299
- /**
300
- * 加载进度百分比
301
- */
302
- buffered : number
303
- }
304
-
305
- /**
306
- * fullscreenclick 事件
307
- * 视频播放全屏播放时点击事件
308
- */
309
- export interface UniVideoFullScreenClickEvent extends UniVideoEvent {
310
- detail : UniVideoFullScreenClickEventDetail
311
- }
312
-
313
- export type UniVideoFullScreenClickEventDetail = {
314
- /**
315
- * 点击点相对于屏幕左侧边缘的 X 轴坐标
316
- */
317
- screenX : number,
318
- /**
319
- * 点击点相对于屏幕顶部边缘的 Y 轴坐标
320
- */
321
- screenY : number,
322
- /**
323
- * 屏幕总宽度
324
- */
325
- screenWidth : number,
326
- /**
327
- * 屏幕总高度
328
- */
329
- screenHeight : number
330
- }
331
-
332
- /**
333
- * controlstoggle 事件
334
- * 切换播放控件显示隐藏时触发
335
- */
336
- export interface UniVideoControlsToggleEvent extends UniVideoEvent {
337
- detail : UniVideoControlsToggleEventDetail
338
- }
339
-
340
- export type UniVideoControlsToggleEventDetail = {
341
- /**
342
- * 是否显示
343
- */
344
- show : boolean
345
- }
346
-
347
- export type VideoTimeUpdateEvent = UniVideoTimeUpdateEvent
348
- export type VideoTimeUpdateEventDetail = UniVideoTimeUpdateEventDetail
349
- export type VideoFullScreenChangeEvent = UniVideoFullScreenChangeEvent
350
- export type VideoFullScreenChangeEventDetail = UniVideoFullScreenChangeEventDetail
351
- export type VideoErrorEvent = UniVideoErrorEvent
352
- export type VideoProgressEvent = UniVideoProgressEvent
353
- export type VideoProgressEventDetail = UniVideoProgressEventDetail
354
- export type VideoFullScreenClickEvent = UniVideoFullScreenClickEvent
355
- export type VideoFullScreenClickEventDetail = UniVideoFullScreenClickEventDetail
356
- export type VideoControlsToggleEvent = UniVideoControlsToggleEvent
1
+ import { ComponentPublicInstance } from 'vue';
2
+
3
+ export type CreateVideoContext = (videoId : string.VideoIdString, component ?: ComponentPublicInstance | null) => VideoContext | null;
4
+
5
+ export type Danmu = {
6
+ /**
7
+ * 弹幕文字
8
+ */
9
+ text ?: string | null,
10
+ /**
11
+ * 弹幕颜色
12
+ */
13
+ color ?: string | null,
14
+ /**
15
+ * 显示时刻
16
+ */
17
+ time ?: number | null
18
+ };
19
+
20
+ export type RequestFullScreenOptions = {
21
+ /**
22
+ * direction
23
+ * - 0: 正常竖向
24
+ * - 90: 屏幕逆时针90度
25
+ * - -90: 屏幕顺时针90度
26
+ * @type 0 | 90 | -90
27
+ * @uniPlatform {
28
+ * "app": {
29
+ * "android": {
30
+ * "osVer": "4.4",
31
+ * "uniVer": "√",
32
+ * "unixVer": "3.9.0"
33
+ * }
34
+ * },
35
+ * "web": {
36
+ * "uniVer": "x",
37
+ * "unixVer": "x"
38
+ * }
39
+ * }
40
+ */
41
+ direction ?: number | null
42
+ };
43
+
44
+ export interface VideoContext {
45
+ /**
46
+ * @description 播放
47
+ * @uniPlatform {
48
+ * "app": {
49
+ * "android": {
50
+ * "osVer": "4.4",
51
+ * "uniVer": "√",
52
+ * "unixVer": "3.9.0"
53
+ * }
54
+ * },
55
+ * "web": {
56
+ * "uniVer": "√",
57
+ * "unixVer": "4.0"
58
+ * }
59
+ * }
60
+ * @uniVueVersion 2,3
61
+ */
62
+ play() : void;
63
+ /**
64
+ * @description 暂停
65
+ * @uniPlatform {
66
+ * "app": {
67
+ * "android": {
68
+ * "osVer": "4.4",
69
+ * "uniVer": "√",
70
+ * "unixVer": "3.9.0"
71
+ * }
72
+ * },
73
+ * "web": {
74
+ * "uniVer": "√",
75
+ * "unixVer": "4.0"
76
+ * }
77
+ * }
78
+ * @uniVueVersion 2,3
79
+ */
80
+ pause() : void;
81
+ /**
82
+ * @description 跳转到指定位置
83
+ * @param {number} position 跳转到指定位置(秒)
84
+ * @uniPlatform {
85
+ * "app": {
86
+ * "android": {
87
+ * "osVer": "4.4",
88
+ * "uniVer": "√",
89
+ * "unixVer": "3.9.0"
90
+ * }
91
+ * },
92
+ * "web": {
93
+ * "uniVer": "√",
94
+ * "unixVer": "4.0"
95
+ * }
96
+ * }
97
+ * @uniVueVersion 2,3
98
+ */
99
+ seek(position : number) : void;
100
+ /**
101
+ * @description 停止视频
102
+ * @uniPlatform {
103
+ * "app": {
104
+ * "android": {
105
+ * "osVer": "4.4",
106
+ * "uniVer": "√",
107
+ * "unixVer": "3.9.0"
108
+ * }
109
+ * },
110
+ * "web": {
111
+ * "uniVer": "√",
112
+ * "unixVer": "4.0"
113
+ * }
114
+ * }
115
+ * @uniVueVersion 2,3
116
+ */
117
+ stop() : void;
118
+ /**
119
+ * @description 发送弹幕
120
+ * @param {Danmu} 属性 text, color
121
+ * @uniPlatform {
122
+ * "app": {
123
+ * "android": {
124
+ * "osVer": "4.4",
125
+ * "uniVer": "√",
126
+ * "unixVer": "3.9.0"
127
+ * }
128
+ * },
129
+ * "web": {
130
+ * "uniVer": "√",
131
+ * "unixVer": "4.0"
132
+ * }
133
+ * }
134
+ * @uniVueVersion 2,3
135
+ */
136
+ sendDanmu(danmu : Danmu) : void;
137
+ /**
138
+ * @description 设置倍速播放
139
+ * @param {number} rate, 支持倍率 0.5/0.8/1.0/1.25/1.5
140
+ * @uniPlatform {
141
+ * "app": {
142
+ * "android": {
143
+ * "osVer": "4.4",
144
+ * "uniVer": "√",
145
+ * "unixVer": "3.9.0"
146
+ * }
147
+ * },
148
+ * "web": {
149
+ * "uniVer": "√",
150
+ * "unixVer": "4.0"
151
+ * }
152
+ * }
153
+ * @uniVueVersion 2,3
154
+ */
155
+ playbackRate(rate : number) : void;
156
+ /**
157
+ * @description 进入全屏
158
+ * @param {RequestFullScreenOptions} direction, 0|正常竖向, 90|屏幕逆时针90度, -90|屏幕顺时针90度
159
+ * @uniPlatform {
160
+ * "app": {
161
+ * "android": {
162
+ * "osVer": "4.4",
163
+ * "uniVer": "√",
164
+ * "unixVer": "3.9.0"
165
+ * }
166
+ * },
167
+ * "web": {
168
+ * "uniVer": "√",
169
+ * "unixVer": "4.0"
170
+ * }
171
+ * }
172
+ * @uniVueVersion 2,3
173
+ */
174
+ requestFullScreen(direction ?: RequestFullScreenOptions | null) : void;
175
+ /**
176
+ * 退出全屏
177
+ * @description 退出全屏
178
+ * @uniPlatform {
179
+ * "app": {
180
+ * "android": {
181
+ * "osVer": "4.4",
182
+ * "uniVer": "√",
183
+ * "unixVer": "3.9.0"
184
+ * }
185
+ * },
186
+ * "web": {
187
+ * "uniVer": "√",
188
+ * "unixVer": "4.0"
189
+ * }
190
+ * }
191
+ * @uniVueVersion 2,3
192
+ */
193
+ exitFullScreen() : void;
194
+ }
195
+
196
+ export interface Uni {
197
+ /**
198
+ * 创建并返回 video 上下文 videoContext 对象
199
+ * @description 创建并返回 video 上下文 videoContext 对象
200
+ * @uniPlatform {
201
+ * "app": {
202
+ * "android": {
203
+ * "osVer": "4.4",
204
+ * "uniVer": "√",
205
+ * "unixVer": "√"
206
+ * }
207
+ * },
208
+ * "web": {
209
+ * "uniVer": "√",
210
+ * "unixVer": "4.0"
211
+ * }
212
+ * }
213
+ * @uniVueVersion 2,3
214
+ * @return {VideoContext} video组件上下文对象
215
+ *
216
+ * @tutorial http://uniapp.dcloud.io/api/media/video-context?id=createVideoContext
217
+ *
218
+ */
219
+ createVideoContext : CreateVideoContext
220
+ }
221
+
222
+ /**
223
+ * 通用事件
224
+ */
225
+ interface UniVideoEvent {
226
+ type : string
227
+ target : Element | null
228
+ currentTarget : Element | null
229
+ timeStamp : Long
230
+ }
231
+
232
+ /**
233
+ * timeupdate 事件
234
+ * 播放进度变化时触发
235
+ */
236
+ export interface UniVideoTimeUpdateEvent extends UniVideoEvent {
237
+ detail : UniVideoTimeUpdateEventDetail
238
+ }
239
+
240
+ export type UniVideoTimeUpdateEventDetail = {
241
+ /**
242
+ * 当前进度
243
+ */
244
+ currentTime : number,
245
+ /**
246
+ * 总进度
247
+ */
248
+ duration : number
249
+ }
250
+
251
+ /**
252
+ * fullscreenchange 事件
253
+ * 当视频进入和退出全屏是触发
254
+ */
255
+ export interface UniVideoFullScreenChangeEvent extends UniVideoEvent {
256
+ detail : UniVideoFullScreenChangeEventDetail
257
+ }
258
+
259
+ export type UniVideoFullScreenChangeEventDetail = {
260
+ /**
261
+ * 是否全屏
262
+ */
263
+ fullScreen : boolean,
264
+ /**
265
+ * 横竖屏,取值 vertical 或 horizontal
266
+ */
267
+ direction : string
268
+ }
269
+
270
+ /**
271
+ * error 事件
272
+ * 视频播放出错时触发
273
+ */
274
+ export interface UniVideoErrorEvent extends UniVideoEvent {
275
+ detail : VideoError
276
+ }
277
+
278
+ /**
279
+ * 统一错误码
280
+ * 100001 网络错误
281
+ * 200001 内部错误
282
+ * 300001 SDK错误
283
+ */
284
+ export type VideoErrorCode = 100001 | 200001 | 300001
285
+
286
+ export interface VideoError extends IUniError {
287
+ errCode : VideoErrorCode
288
+ }
289
+
290
+ /**
291
+ * progress 事件
292
+ * 加载进度变化时触发
293
+ */
294
+ export interface UniVideoProgressEvent extends UniVideoEvent {
295
+ detail : UniVideoProgressEventDetail
296
+ }
297
+
298
+ export type UniVideoProgressEventDetail = {
299
+ /**
300
+ * 加载进度百分比
301
+ */
302
+ buffered : number
303
+ }
304
+
305
+ /**
306
+ * fullscreenclick 事件
307
+ * 视频播放全屏播放时点击事件
308
+ */
309
+ export interface UniVideoFullScreenClickEvent extends UniVideoEvent {
310
+ detail : UniVideoFullScreenClickEventDetail
311
+ }
312
+
313
+ export type UniVideoFullScreenClickEventDetail = {
314
+ /**
315
+ * 点击点相对于屏幕左侧边缘的 X 轴坐标
316
+ */
317
+ screenX : number,
318
+ /**
319
+ * 点击点相对于屏幕顶部边缘的 Y 轴坐标
320
+ */
321
+ screenY : number,
322
+ /**
323
+ * 屏幕总宽度
324
+ */
325
+ screenWidth : number,
326
+ /**
327
+ * 屏幕总高度
328
+ */
329
+ screenHeight : number
330
+ }
331
+
332
+ /**
333
+ * controlstoggle 事件
334
+ * 切换播放控件显示隐藏时触发
335
+ */
336
+ export interface UniVideoControlsToggleEvent extends UniVideoEvent {
337
+ detail : UniVideoControlsToggleEventDetail
338
+ }
339
+
340
+ export type UniVideoControlsToggleEventDetail = {
341
+ /**
342
+ * 是否显示
343
+ */
344
+ show : boolean
345
+ }
346
+
347
+ export type VideoTimeUpdateEvent = UniVideoTimeUpdateEvent
348
+ export type VideoTimeUpdateEventDetail = UniVideoTimeUpdateEventDetail
349
+ export type VideoFullScreenChangeEvent = UniVideoFullScreenChangeEvent
350
+ export type VideoFullScreenChangeEventDetail = UniVideoFullScreenChangeEventDetail
351
+ export type VideoErrorEvent = UniVideoErrorEvent
352
+ export type VideoProgressEvent = UniVideoProgressEvent
353
+ export type VideoProgressEventDetail = UniVideoProgressEventDetail
354
+ export type VideoFullScreenClickEvent = UniVideoFullScreenClickEvent
355
+ export type VideoFullScreenClickEventDetail = UniVideoFullScreenClickEventDetail
356
+ export type VideoControlsToggleEvent = UniVideoControlsToggleEvent
357
357
  export type VideoControlsToggleEventDetail = UniVideoControlsToggleEventDetail