@dcloudio/uni-app-x 0.7.19 → 0.7.21

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 (335) hide show
  1. package/.prettierrc +5 -5
  2. package/README.md +1 -1
  3. package/index.d.ts +1 -1
  4. package/options.d.ts +9 -9
  5. package/package.json +27 -27
  6. package/types/app.d.ts +1002 -842
  7. package/types/index.d.ts +7 -7
  8. package/types/native/AsyncApiResult.d.ts +7 -7
  9. package/types/native/CSSStyleDeclaration.d.ts +25 -25
  10. package/types/native/CanvasRenderingContext2D.d.ts +2048 -2047
  11. package/types/native/DOMRect.d.ts +56 -56
  12. package/types/native/DrawableContext.d.ts +162 -162
  13. package/types/native/INavigationBar.d.ts +22 -22
  14. package/types/native/IUniElement.d.ts +2859 -2859
  15. package/types/native/IUniError.d.ts +20 -20
  16. package/types/native/IUniForm.d.ts +9 -9
  17. package/types/native/IUniObjectElement.d.ts +124 -124
  18. package/types/native/NativeLoadFontFaceOptions.d.ts +11 -11
  19. package/types/native/NodeData.d.ts +22 -22
  20. package/types/native/PageNode.d.ts +6 -6
  21. package/types/native/Path2D.d.ts +240 -240
  22. package/types/native/SnapshotOptions.d.ts +63 -63
  23. package/types/native/SourceError.d.ts +46 -46
  24. package/types/native/UTSAndroidHookProxy.d.ts +14 -14
  25. package/types/native/UniAggregateError.d.ts +19 -19
  26. package/types/native/UniApp.d.ts +205 -205
  27. package/types/native/UniCallbackWrapper.d.ts +7 -7
  28. package/types/native/UniCanvasElement.d.ts +9 -9
  29. package/types/native/UniCustomEvent.d.ts +24 -24
  30. package/types/native/UniDocument.d.ts +83 -83
  31. package/types/native/UniElement.d.ts +79 -79
  32. package/types/native/UniError.d.ts +70 -70
  33. package/types/native/UniEvent.d.ts +92 -92
  34. package/types/native/UniFormControl.d.ts +8 -8
  35. package/types/native/UniFormControlElement.d.ts +14 -14
  36. package/types/native/UniImageErrorEvent.d.ts +33 -33
  37. package/types/native/UniImageLoadEvent.d.ts +37 -37
  38. package/types/native/UniInputBlurEvent.d.ts +36 -36
  39. package/types/native/UniInputConfirmEvent.d.ts +30 -30
  40. package/types/native/UniInputEvent.d.ts +38 -38
  41. package/types/native/UniInputFocusEvent.d.ts +53 -53
  42. package/types/native/UniNativePage.d.ts +270 -270
  43. package/types/native/UniNestedPreScrollEvent.d.ts +45 -45
  44. package/types/native/UniPageEvent.d.ts +10 -10
  45. package/types/native/UniPageManager.d.ts +27 -20
  46. package/types/native/UniPageScrollEvent.d.ts +13 -13
  47. package/types/native/UniPointerEvent.d.ts +74 -74
  48. package/types/native/UniProvider.d.ts +15 -15
  49. package/types/native/UniRefresherEvent.d.ts +18 -18
  50. package/types/native/UniResizeEvent.d.ts +34 -34
  51. package/types/native/UniResizeObserver.d.ts +184 -184
  52. package/types/native/UniRichTextItemClickEvent.d.ts +41 -41
  53. package/types/native/UniScrollEvent.d.ts +42 -42
  54. package/types/native/UniScrollToLowerEvent.d.ts +23 -23
  55. package/types/native/UniScrollToUpperEvent.d.ts +23 -23
  56. package/types/native/UniStartNestedScrollEvent.d.ts +33 -33
  57. package/types/native/UniStopNestedScrollEvent.d.ts +28 -28
  58. package/types/native/UniSwiperAnimationFinishEvent.d.ts +44 -44
  59. package/types/native/UniSwiperChangeEvent.d.ts +44 -44
  60. package/types/native/UniSwiperTransitionEvent.d.ts +24 -24
  61. package/types/native/UniTabTapEvent.d.ts +18 -18
  62. package/types/native/UniTabsElement.d.ts +59 -59
  63. package/types/native/UniTextElement.d.ts +34 -34
  64. package/types/native/UniTextareaFocusEvent.d.ts +54 -54
  65. package/types/native/UniTouchEvent.d.ts +64 -64
  66. package/types/native/UniVideoElement.d.ts +75 -75
  67. package/types/native/UniWebViewDownloadEvent.d.ts +52 -52
  68. package/types/native/UniWebViewElement.d.ts +10 -10
  69. package/types/native/UniWebViewErrorEvent.d.ts +59 -59
  70. package/types/native/UniWebViewLoadEvent.d.ts +41 -41
  71. package/types/native/UniWebViewLoadingEvent.d.ts +41 -41
  72. package/types/native/UniWebViewMessageEvent.d.ts +36 -36
  73. package/types/native/UniWebViewServiceMessageEvent.d.ts +8 -8
  74. package/types/native/ViewToTempFilePathOptions.d.ts +47 -47
  75. package/types/native/WebViewStyles.d.ts +20 -20
  76. package/types/native/global.d.ts +598 -598
  77. package/types/native/index.d.ts +71 -71
  78. package/types/native-global/index.d.ts +1 -1
  79. package/types/page.d.ts +1682 -1682
  80. package/types/process.d.ts +5 -5
  81. package/types/uni/base/index.d.ts +3 -3
  82. package/types/uni/env/index.d.ts +103 -103
  83. package/types/uni/global.d.ts +6 -6
  84. package/types/uni/index.d.ts +4 -4
  85. package/types/uni/uts-plugin-api/global.d.ts +58 -57
  86. package/types/uni/uts-plugin-api/index.d.ts +58 -57
  87. package/types/uni/uts-plugin-api/lib/uni-addPhoneContact/utssdk/global.d.ts +26 -26
  88. package/types/uni/uts-plugin-api/lib/uni-addPhoneContact/utssdk/index.d.ts +12 -12
  89. package/types/uni/uts-plugin-api/lib/uni-addPhoneContact/utssdk/interface.d.ts +231 -231
  90. package/types/uni/uts-plugin-api/lib/uni-animationFrame/utssdk/global.d.ts +12 -12
  91. package/types/uni/uts-plugin-api/lib/uni-animationFrame/utssdk/index.d.ts +5 -5
  92. package/types/uni/uts-plugin-api/lib/uni-animationFrame/utssdk/interface.d.ts +50 -50
  93. package/types/uni/uts-plugin-api/lib/uni-arrayBufferToBase64/utssdk/global.d.ts +10 -10
  94. package/types/uni/uts-plugin-api/lib/uni-arrayBufferToBase64/utssdk/index.d.ts +4 -4
  95. package/types/uni/uts-plugin-api/lib/uni-arrayBufferToBase64/utssdk/interface.d.ts +77 -77
  96. package/types/uni/uts-plugin-api/lib/uni-authentication/utssdk/global.d.ts +60 -0
  97. package/types/uni/uts-plugin-api/lib/uni-authentication/utssdk/index.d.ts +29 -0
  98. package/types/uni/uts-plugin-api/lib/uni-authentication/utssdk/interface.d.ts +161 -0
  99. package/types/uni/uts-plugin-api/lib/uni-base64ToArrayBuffer/utssdk/global.d.ts +10 -10
  100. package/types/uni/uts-plugin-api/lib/uni-base64ToArrayBuffer/utssdk/index.d.ts +4 -4
  101. package/types/uni/uts-plugin-api/lib/uni-base64ToArrayBuffer/utssdk/interface.d.ts +77 -77
  102. package/types/uni/uts-plugin-api/lib/uni-canvas/utssdk/global.d.ts +20 -20
  103. package/types/uni/uts-plugin-api/lib/uni-canvas/utssdk/index.d.ts +9 -9
  104. package/types/uni/uts-plugin-api/lib/uni-canvas/utssdk/interface.d.ts +264 -242
  105. package/types/uni/uts-plugin-api/lib/uni-clipboard/utssdk/global.d.ts +40 -40
  106. package/types/uni/uts-plugin-api/lib/uni-clipboard/utssdk/index.d.ts +19 -19
  107. package/types/uni/uts-plugin-api/lib/uni-clipboard/utssdk/interface.d.ts +203 -203
  108. package/types/uni/uts-plugin-api/lib/uni-createInnerAudioContext/utssdk/global.d.ts +12 -12
  109. package/types/uni/uts-plugin-api/lib/uni-createInnerAudioContext/utssdk/index.d.ts +5 -5
  110. package/types/uni/uts-plugin-api/lib/uni-createInnerAudioContext/utssdk/interface.d.ts +1733 -1733
  111. package/types/uni/uts-plugin-api/lib/uni-createIntersectionObserver/utssdk/global.d.ts +20 -20
  112. package/types/uni/uts-plugin-api/lib/uni-createIntersectionObserver/utssdk/index.d.ts +9 -9
  113. package/types/uni/uts-plugin-api/lib/uni-createIntersectionObserver/utssdk/interface.d.ts +152 -152
  114. package/types/uni/uts-plugin-api/lib/uni-createRequestPermissionListener/utssdk/global.d.ts +18 -18
  115. package/types/uni/uts-plugin-api/lib/uni-createRequestPermissionListener/utssdk/index.d.ts +8 -8
  116. package/types/uni/uts-plugin-api/lib/uni-createRequestPermissionListener/utssdk/interface.d.ts +61 -61
  117. package/types/uni/uts-plugin-api/lib/uni-createSelectorQuery/utssdk/global.d.ts +20 -20
  118. package/types/uni/uts-plugin-api/lib/uni-createSelectorQuery/utssdk/index.d.ts +9 -9
  119. package/types/uni/uts-plugin-api/lib/uni-createSelectorQuery/utssdk/interface.d.ts +464 -427
  120. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/global.d.ts +12 -12
  121. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/index.d.ts +5 -5
  122. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/interface.d.ts +137 -137
  123. package/types/uni/uts-plugin-api/lib/uni-dialogPage/utssdk/global.d.ts +28 -28
  124. package/types/uni/uts-plugin-api/lib/uni-dialogPage/utssdk/index.d.ts +13 -13
  125. package/types/uni/uts-plugin-api/lib/uni-dialogPage/utssdk/interface.d.ts +1336 -1336
  126. package/types/uni/uts-plugin-api/lib/uni-event/utssdk/global.d.ts +16 -16
  127. package/types/uni/uts-plugin-api/lib/uni-event/utssdk/index.d.ts +7 -7
  128. package/types/uni/uts-plugin-api/lib/uni-event/utssdk/interface.d.ts +305 -305
  129. package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/global.d.ts +26 -26
  130. package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/index.d.ts +12 -12
  131. package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/interface.d.ts +91 -91
  132. package/types/uni/uts-plugin-api/lib/uni-file/utssdk/global.d.ts +80 -80
  133. package/types/uni/uts-plugin-api/lib/uni-file/utssdk/index.d.ts +39 -39
  134. package/types/uni/uts-plugin-api/lib/uni-file/utssdk/interface.d.ts +174 -174
  135. package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/global.d.ts +142 -142
  136. package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/index.d.ts +70 -70
  137. package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/interface.d.ts +1840 -1840
  138. package/types/uni/uts-plugin-api/lib/uni-getAccessibilityInfo/utssdk/global.d.ts +10 -10
  139. package/types/uni/uts-plugin-api/lib/uni-getAccessibilityInfo/utssdk/index.d.ts +4 -4
  140. package/types/uni/uts-plugin-api/lib/uni-getAppAuthorizeSetting/utssdk/global.d.ts +12 -12
  141. package/types/uni/uts-plugin-api/lib/uni-getAppAuthorizeSetting/utssdk/index.d.ts +5 -5
  142. package/types/uni/uts-plugin-api/lib/uni-getAppAuthorizeSetting/utssdk/interface.d.ts +329 -329
  143. package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/global.d.ts +14 -14
  144. package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/index.d.ts +6 -6
  145. package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/interface.d.ts +818 -818
  146. package/types/uni/uts-plugin-api/lib/uni-getBackgroundAudioManager/utssdk/global.d.ts +12 -12
  147. package/types/uni/uts-plugin-api/lib/uni-getBackgroundAudioManager/utssdk/index.d.ts +5 -5
  148. package/types/uni/uts-plugin-api/lib/uni-getBackgroundAudioManager/utssdk/interface.d.ts +297 -297
  149. package/types/uni/uts-plugin-api/lib/uni-getDeviceInfo/utssdk/global.d.ts +14 -14
  150. package/types/uni/uts-plugin-api/lib/uni-getDeviceInfo/utssdk/index.d.ts +6 -6
  151. package/types/uni/uts-plugin-api/lib/uni-getDeviceInfo/utssdk/interface.d.ts +657 -657
  152. package/types/uni/uts-plugin-api/lib/uni-getElementById/utssdk/global.d.ts +10 -10
  153. package/types/uni/uts-plugin-api/lib/uni-getElementById/utssdk/index.d.ts +4 -4
  154. package/types/uni/uts-plugin-api/lib/uni-getElementById/utssdk/interface.d.ts +81 -81
  155. package/types/uni/uts-plugin-api/lib/uni-getEnterOptionsSync/utssdk/global.d.ts +12 -12
  156. package/types/uni/uts-plugin-api/lib/uni-getEnterOptionsSync/utssdk/index.d.ts +5 -5
  157. package/types/uni/uts-plugin-api/lib/uni-getEnterOptionsSync/utssdk/interface.d.ts +155 -155
  158. package/types/uni/uts-plugin-api/lib/uni-getLaunchOptionsSync/utssdk/global.d.ts +12 -12
  159. package/types/uni/uts-plugin-api/lib/uni-getLaunchOptionsSync/utssdk/index.d.ts +5 -5
  160. package/types/uni/uts-plugin-api/lib/uni-getLaunchOptionsSync/utssdk/interface.d.ts +159 -159
  161. package/types/uni/uts-plugin-api/lib/uni-getLocation/utssdk/global.d.ts +24 -24
  162. package/types/uni/uts-plugin-api/lib/uni-getLocation/utssdk/index.d.ts +11 -11
  163. package/types/uni/uts-plugin-api/lib/uni-getLocation/utssdk/interface.d.ts +563 -564
  164. package/types/uni/uts-plugin-api/lib/uni-getLocation-system/utssdk/global.d.ts +8 -8
  165. package/types/uni/uts-plugin-api/lib/uni-getLocation-system/utssdk/index.d.ts +4 -4
  166. package/types/uni/uts-plugin-api/lib/uni-getLocation-system/utssdk/interface.d.ts +1 -1
  167. package/types/uni/uts-plugin-api/lib/uni-getLocation-tencent/utssdk/global.d.ts +8 -8
  168. package/types/uni/uts-plugin-api/lib/uni-getLocation-tencent/utssdk/index.d.ts +4 -4
  169. package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/global.d.ts +32 -32
  170. package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/index.d.ts +15 -15
  171. package/types/uni/uts-plugin-api/lib/uni-getPerformance/utssdk/global.d.ts +22 -22
  172. package/types/uni/uts-plugin-api/lib/uni-getPerformance/utssdk/index.d.ts +10 -10
  173. package/types/uni/uts-plugin-api/lib/uni-getPerformance/utssdk/interface.d.ts +163 -163
  174. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/global.d.ts +30 -32
  175. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/index.d.ts +14 -15
  176. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/interface.d.ts +375 -375
  177. package/types/uni/uts-plugin-api/lib/uni-getRecorderManager/utssdk/global.d.ts +16 -16
  178. package/types/uni/uts-plugin-api/lib/uni-getRecorderManager/utssdk/index.d.ts +7 -7
  179. package/types/uni/uts-plugin-api/lib/uni-getRecorderManager/utssdk/interface.d.ts +980 -980
  180. package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/global.d.ts +30 -30
  181. package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/index.d.ts +14 -14
  182. package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/interface.d.ts +2131 -2131
  183. package/types/uni/uts-plugin-api/lib/uni-getSystemSetting/utssdk/global.d.ts +12 -12
  184. package/types/uni/uts-plugin-api/lib/uni-getSystemSetting/utssdk/index.d.ts +5 -5
  185. package/types/uni/uts-plugin-api/lib/uni-getSystemSetting/utssdk/interface.d.ts +169 -169
  186. package/types/uni/uts-plugin-api/lib/uni-installApk/utssdk/global.d.ts +24 -24
  187. package/types/uni/uts-plugin-api/lib/uni-installApk/utssdk/index.d.ts +11 -11
  188. package/types/uni/uts-plugin-api/lib/uni-interceptor/utssdk/global.d.ts +16 -16
  189. package/types/uni/uts-plugin-api/lib/uni-interceptor/utssdk/index.d.ts +7 -7
  190. package/types/uni/uts-plugin-api/lib/uni-interceptor/utssdk/interface.d.ts +169 -169
  191. package/types/uni/uts-plugin-api/lib/uni-keyboard/utssdk/global.d.ts +22 -22
  192. package/types/uni/uts-plugin-api/lib/uni-keyboard/utssdk/index.d.ts +10 -10
  193. package/types/uni/uts-plugin-api/lib/uni-keyboard/utssdk/interface.d.ts +60 -60
  194. package/types/uni/uts-plugin-api/lib/uni-loadFontFace/utssdk/global.d.ts +26 -26
  195. package/types/uni/uts-plugin-api/lib/uni-loadFontFace/utssdk/index.d.ts +12 -12
  196. package/types/uni/uts-plugin-api/lib/uni-loadFontFace/utssdk/interface.d.ts +564 -564
  197. package/types/uni/uts-plugin-api/lib/uni-makePhoneCall/utssdk/global.d.ts +24 -24
  198. package/types/uni/uts-plugin-api/lib/uni-makePhoneCall/utssdk/index.d.ts +11 -11
  199. package/types/uni/uts-plugin-api/lib/uni-makePhoneCall/utssdk/interface.d.ts +100 -100
  200. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/global.d.ts +160 -160
  201. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/index.d.ts +79 -79
  202. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/interface.d.ts +1339 -1339
  203. package/types/uni/uts-plugin-api/lib/uni-navigationBar/utssdk/global.d.ts +68 -68
  204. package/types/uni/uts-plugin-api/lib/uni-navigationBar/utssdk/index.d.ts +33 -33
  205. package/types/uni/uts-plugin-api/lib/uni-navigationBar/utssdk/interface.d.ts +1002 -1002
  206. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/global.d.ts +72 -72
  207. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/index.d.ts +35 -35
  208. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/interface.d.ts +1493 -1493
  209. package/types/uni/uts-plugin-api/lib/uni-openAppAuthorizeSetting/utssdk/global.d.ts +24 -24
  210. package/types/uni/uts-plugin-api/lib/uni-openAppAuthorizeSetting/utssdk/index.d.ts +11 -11
  211. package/types/uni/uts-plugin-api/lib/uni-openDocument/utssdk/global.d.ts +24 -24
  212. package/types/uni/uts-plugin-api/lib/uni-openDocument/utssdk/index.d.ts +11 -11
  213. package/types/uni/uts-plugin-api/lib/uni-openDocument/utssdk/interface.d.ts +70 -70
  214. package/types/uni/uts-plugin-api/lib/uni-pageScrollTo/utssdk/global.d.ts +26 -26
  215. package/types/uni/uts-plugin-api/lib/uni-pageScrollTo/utssdk/index.d.ts +12 -12
  216. package/types/uni/uts-plugin-api/lib/uni-pageScrollTo/utssdk/interface.d.ts +153 -153
  217. package/types/uni/uts-plugin-api/lib/uni-payment/utssdk/global.d.ts +32 -32
  218. package/types/uni/uts-plugin-api/lib/uni-payment/utssdk/index.d.ts +15 -15
  219. package/types/uni/uts-plugin-api/lib/uni-payment/utssdk/interface.d.ts +240 -240
  220. package/types/uni/uts-plugin-api/lib/uni-payment-alipay/utssdk/global.d.ts +8 -8
  221. package/types/uni/uts-plugin-api/lib/uni-payment-alipay/utssdk/index.d.ts +4 -4
  222. package/types/uni/uts-plugin-api/lib/uni-payment-wxpay/utssdk/global.d.ts +8 -8
  223. package/types/uni/uts-plugin-api/lib/uni-payment-wxpay/utssdk/index.d.ts +4 -4
  224. package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/global.d.ts +78 -74
  225. package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/index.d.ts +38 -36
  226. package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/interface.d.ts +193 -8
  227. package/types/uni/uts-plugin-api/lib/uni-pullDownRefresh/utssdk/global.d.ts +28 -28
  228. package/types/uni/uts-plugin-api/lib/uni-pullDownRefresh/utssdk/index.d.ts +13 -13
  229. package/types/uni/uts-plugin-api/lib/uni-pullDownRefresh/utssdk/interface.d.ts +189 -189
  230. package/types/uni/uts-plugin-api/lib/uni-route/utssdk/global.d.ts +58 -58
  231. package/types/uni/uts-plugin-api/lib/uni-route/utssdk/index.d.ts +28 -28
  232. package/types/uni/uts-plugin-api/lib/uni-route/utssdk/interface.d.ts +2165 -2165
  233. package/types/uni/uts-plugin-api/lib/uni-rpx2px/utssdk/global.d.ts +10 -10
  234. package/types/uni/uts-plugin-api/lib/uni-rpx2px/utssdk/index.d.ts +4 -4
  235. package/types/uni/uts-plugin-api/lib/uni-rpx2px/utssdk/interface.d.ts +38 -38
  236. package/types/uni/uts-plugin-api/lib/uni-scanCode/utssdk/global.d.ts +24 -24
  237. package/types/uni/uts-plugin-api/lib/uni-scanCode/utssdk/index.d.ts +11 -11
  238. package/types/uni/uts-plugin-api/lib/uni-scanCode/utssdk/interface.d.ts +73 -73
  239. package/types/uni/uts-plugin-api/lib/uni-storage/utssdk/global.d.ts +78 -78
  240. package/types/uni/uts-plugin-api/lib/uni-storage/utssdk/index.d.ts +38 -38
  241. package/types/uni/uts-plugin-api/lib/uni-storage/utssdk/interface.d.ts +600 -600
  242. package/types/uni/uts-plugin-api/lib/uni-tabBar/utssdk/global.d.ts +148 -148
  243. package/types/uni/uts-plugin-api/lib/uni-tabBar/utssdk/index.d.ts +73 -73
  244. package/types/uni/uts-plugin-api/lib/uni-tabBar/utssdk/interface.d.ts +1086 -1086
  245. package/types/uni/uts-plugin-api/lib/uni-theme/utssdk/global.d.ts +42 -42
  246. package/types/uni/uts-plugin-api/lib/uni-theme/utssdk/index.d.ts +20 -20
  247. package/types/uni/uts-plugin-api/lib/uni-virtualPayment/utssdk/global.d.ts +112 -112
  248. package/types/uni/uts-plugin-api/lib/uni-virtualPayment/utssdk/index.d.ts +55 -55
  249. package/types/uni/uts-plugin-api/lib/uni-websocket/utssdk/global.d.ts +58 -58
  250. package/types/uni/uts-plugin-api/lib/uni-websocket/utssdk/index.d.ts +28 -28
  251. package/types/uni/uts-plugin-api/lib/uni-websocket/utssdk/interface.d.ts +844 -844
  252. package/types/uni/uts-plugin-biz/global.d.ts +4 -4
  253. package/types/uni/uts-plugin-biz/index.d.ts +4 -4
  254. package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/global.d.ts +36 -36
  255. package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/index.d.ts +17 -17
  256. package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/interface.d.ts +141 -141
  257. package/types/uni/uts-plugin-biz/lib/uni-facialRecognitionVerify/utssdk/global.d.ts +28 -28
  258. package/types/uni/uts-plugin-biz/lib/uni-facialRecognitionVerify/utssdk/index.d.ts +13 -13
  259. package/types/uni/uts-plugin-biz/lib/uni-facialRecognitionVerify/utssdk/interface.d.ts +160 -160
  260. package/types/uni/uts-plugin-biz/lib/uni-push/utssdk/global.d.ts +60 -60
  261. package/types/uni/uts-plugin-biz/lib/uni-push/utssdk/index.d.ts +29 -29
  262. package/types/uni/uts-plugin-biz/lib/uni-push/utssdk/interface.d.ts +808 -778
  263. package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/global.d.ts +46 -46
  264. package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/index.d.ts +22 -22
  265. package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/interface.d.ts +207 -207
  266. package/types/uni/uts-plugin-component/global.d.ts +1 -1
  267. package/types/uni/uts-plugin-component/index.d.ts +1 -1
  268. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/global.d.ts +64 -64
  269. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/index.d.ts +31 -31
  270. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/interface.d.ts +522 -522
  271. package/types/uni/uts-plugin-extend/README.md +3 -3
  272. package/types/uni/uts-plugin-extend/global.d.ts +14 -14
  273. package/types/uni/uts-plugin-extend/index.d.ts +14 -14
  274. package/types/uni/uts-plugin-extend/lib/uni-accelerometer/utssdk/global.d.ts +12 -12
  275. package/types/uni/uts-plugin-extend/lib/uni-accelerometer/utssdk/index.d.ts +1 -1
  276. package/types/uni/uts-plugin-extend/lib/uni-accelerometer/utssdk/interface.d.ts +365 -365
  277. package/types/uni/uts-plugin-extend/lib/uni-canvas/utssdk/global.d.ts +23 -23
  278. package/types/uni/uts-plugin-extend/lib/uni-canvas/utssdk/index.d.ts +10 -10
  279. package/types/uni/uts-plugin-extend/lib/uni-canvas/utssdk/interface.d.ts +710 -710
  280. package/types/uni/uts-plugin-extend/lib/uni-chooseLocation/utssdk/global.d.ts +21 -21
  281. package/types/uni/uts-plugin-extend/lib/uni-chooseLocation/utssdk/index.d.ts +9 -9
  282. package/types/uni/uts-plugin-extend/lib/uni-chooseLocation/utssdk/interface.d.ts +151 -151
  283. package/types/uni/uts-plugin-extend/lib/uni-compass/utssdk/global.d.ts +25 -25
  284. package/types/uni/uts-plugin-extend/lib/uni-compass/utssdk/index.d.ts +11 -11
  285. package/types/uni/uts-plugin-extend/lib/uni-compass/utssdk/interface.d.ts +363 -363
  286. package/types/uni/uts-plugin-extend/lib/uni-createInnerAudioContext/utssdk/global.d.ts +11 -11
  287. package/types/uni/uts-plugin-extend/lib/uni-createInnerAudioContext/utssdk/index.d.ts +4 -4
  288. package/types/uni/uts-plugin-extend/lib/uni-createInnerAudioContext/utssdk/interface.d.ts +224 -224
  289. package/types/uni/uts-plugin-extend/lib/uni-createMapContext/utssdk/global.d.ts +53 -53
  290. package/types/uni/uts-plugin-extend/lib/uni-createMapContext/utssdk/index.d.ts +25 -25
  291. package/types/uni/uts-plugin-extend/lib/uni-createMapContext/utssdk/interface.d.ts +487 -487
  292. package/types/uni/uts-plugin-extend/lib/uni-createMediaQueryObserver/utssdk/global.d.ts +13 -13
  293. package/types/uni/uts-plugin-extend/lib/uni-createMediaQueryObserver/utssdk/index.d.ts +5 -5
  294. package/types/uni/uts-plugin-extend/lib/uni-createMediaQueryObserver/utssdk/interface.d.ts +126 -126
  295. package/types/uni/uts-plugin-extend/lib/uni-getBackgroundAudioManager/utssdk/global.d.ts +7 -7
  296. package/types/uni/uts-plugin-extend/lib/uni-getBackgroundAudioManager/utssdk/index.d.ts +1 -1
  297. package/types/uni/uts-plugin-extend/lib/uni-getBackgroundAudioManager/utssdk/interface.d.ts +296 -296
  298. package/types/uni/uts-plugin-extend/lib/uni-locale/utssdk/global.d.ts +15 -15
  299. package/types/uni/uts-plugin-extend/lib/uni-locale/utssdk/index.d.ts +1 -1
  300. package/types/uni/uts-plugin-extend/lib/uni-locale/utssdk/interface.d.ts +229 -229
  301. package/types/uni/uts-plugin-extend/lib/uni-localeChange/utssdk/global.d.ts +14 -14
  302. package/types/uni/uts-plugin-extend/lib/uni-localeChange/utssdk/index.d.ts +1 -1
  303. package/types/uni/uts-plugin-extend/lib/uni-localeChange/utssdk/interface.d.ts +559 -559
  304. package/types/uni/uts-plugin-extend/lib/uni-memory/utssdk/global.d.ts +9 -9
  305. package/types/uni/uts-plugin-extend/lib/uni-memory/utssdk/index.d.ts +1 -1
  306. package/types/uni/uts-plugin-extend/lib/uni-memory/utssdk/interface.d.ts +163 -163
  307. package/types/uni/uts-plugin-extend/lib/uni-openLocation/utssdk/global.d.ts +21 -21
  308. package/types/uni/uts-plugin-extend/lib/uni-openLocation/utssdk/index.d.ts +9 -9
  309. package/types/uni/uts-plugin-extend/lib/uni-openLocation/utssdk/interface.d.ts +143 -143
  310. package/types/uni/uts-plugin-extend/lib/uni-preloadPage/utssdk/global.d.ts +7 -7
  311. package/types/uni/uts-plugin-extend/lib/uni-preloadPage/utssdk/index.d.ts +1 -1
  312. package/types/uni/uts-plugin-extend/lib/uni-preloadPage/utssdk/interface.d.ts +106 -106
  313. package/types/uni/uts-plugin-extend/lib/uni-theme/utssdk/global.d.ts +9 -9
  314. package/types/uni/uts-plugin-extend/lib/uni-theme/utssdk/index.d.ts +1 -1
  315. package/types/uni/uts-plugin-extend/lib/uni-theme/utssdk/interface.d.ts +165 -165
  316. package/types/uni-cloud/index.d.ts +67 -63
  317. package/types/uni-cloud/interface.d.ts +987 -991
  318. package/types/uni-cloud/unicloud-db/index.ts +314 -314
  319. package/types/uni-global/index.d.ts +1 -1
  320. package/types/vue/CheckboxGroupChangeEvent.d.ts +41 -41
  321. package/types/vue/LifeCycle.d.ts +55 -55
  322. package/types/vue/PickerViewChangeEvent.d.ts +41 -41
  323. package/types/vue/ProgressActiveendEvent.d.ts +32 -32
  324. package/types/vue/RadioGroupChangeEvent.d.ts +41 -41
  325. package/types/vue/SliderChangeEvent.d.ts +35 -35
  326. package/types/vue/SwitchChangeEvent.d.ts +32 -32
  327. package/types/vue/UniCanvasElement.d.ts +275 -275
  328. package/types/vue/UniCloudDBElement.d.ts +217 -217
  329. package/types/vue/UniFormElement.d.ts +54 -54
  330. package/types/vue/UniNavigatorElement.d.ts +11 -11
  331. package/types/vue/global.d.ts +191 -191
  332. package/types/vue/index.d.ts +10 -10
  333. package/types/vue-global/index.d.ts +1 -1
  334. package/uts-plugin.d.ts +27 -27
  335. package/types/shim-uts-basic.d.ts +0 -4495
@@ -1,1339 +1,1339 @@
1
- export type MediaOrientation =
2
- | 'up'
3
- | 'down'
4
- | 'left'
5
- | 'right'
6
- | 'up-mirrored'
7
- | 'down-mirrored'
8
- | 'left-mirrored'
9
- | 'right-mirrored'
10
-
11
- /**
12
- * 错误码
13
- * - 1101001 用户取消
14
- * - 1101002 urls至少包含一张图片地址
15
- * - 1101003 文件不存在
16
- * - 1101004 图片加载失败
17
- * - 1101005 未获取权限
18
- * - 1101006 图片或视频保存失败
19
- * - 1101007 图片裁剪失败
20
- * - 1101008 拍照或录像失败
21
- * - 1101009 图片压缩失败
22
- * - 1101010 其他错误
23
- */
24
-
25
- export type MediaErrorCode = 1101001 | 1101002 | 1101003 | 1101004 | 1101005 | 1101006 | 1101007 | 1101008 | 1101009 | 1101010;
26
-
27
- /**
28
- * 图片或视频操作失败的错误回调
29
- */
30
- export interface IMediaError extends IUniError {
31
- errCode : MediaErrorCode
32
- };
33
-
34
-
35
- export type ChooseImageSuccess = {
36
- /**
37
- * 调用API的名称
38
- */
39
- errSubject : string,
40
- /**
41
- * 描述信息
42
- */
43
- errMsg : string,
44
- /**
45
- * 图片的本地文件路径列表
46
- * @type string | string []
47
- */
48
- tempFilePaths : Array<string>,
49
- /**
50
- * 图片的本地文件列表
51
- */
52
- tempFiles : any
53
- }
54
-
55
- export type ChooseImageFail = IMediaError;
56
- export type ChooseImageSuccessCallback = (callback : ChooseImageSuccess) => void
57
- export type ChooseImageFailCallback = (callback : ChooseImageFail) => void
58
- export type ChooseImageCompleteCallback = (callback : any) => void
59
-
60
- export type ChooseImageCropOptions = {
61
- /**
62
- * 裁剪的宽度,单位为px,用于计算裁剪宽高比。
63
- */
64
- width : number;
65
- /**
66
- * 裁剪的高度,单位为px,用于计算裁剪宽高比。
67
- */
68
- height : number;
69
- /**
70
- * 取值范围为1-100,数值越小,质量越低(仅对jpg格式有效)。默认值为80。
71
- * @defaultValue 80
72
- */
73
- quality : (number) | null;
74
- /**
75
- * 是否将width和height作为裁剪保存图片真实的像素值。默认值为true。注:设置为false时在裁剪编辑界面显示图片的像素值,设置为true时不显示。
76
- * @type boolean
77
- */
78
- resize : (boolean) | null;
79
- }
80
-
81
- export type ChooseImageOptions = {
82
- /**
83
- * 最多可以选择的图片张数,app端不限制,微信小程序最多可支持20个。
84
- * @defaultValue 9
85
- */
86
- count ?: (number) | null,
87
- /**
88
- * original 原图,compressed 压缩图,默认二者都有
89
- * @type string | string []
90
- * @defaultValue ['original','compressed']
91
- * @uniPlatform {
92
- * "app":{
93
- * "harmony": {
94
- * "osVer": "3.0",
95
- * "uniVer": "4.23",
96
- * "unixVer": "x"
97
- * }
98
- * },
99
- * "web": {
100
- * "uniVer": "x",
101
- * "unixVer": "x"
102
- * }
103
- * }
104
- */
105
- sizeType ?: (string[]) | null,
106
- /**
107
- * album 从相册选图,camera 使用相机,默认二者都有
108
- * @defaultValue ['album','camera']
109
- */
110
- sourceType ?: (string[]) | null,
111
- /**
112
- * 根据文件拓展名过滤,每一项都不能是空字符串。默认不过滤。仅H5支持
113
- * @uniPlatform {
114
- * "app": {
115
- * "android": {
116
- * "osVer": "5.0",
117
- * "uniVer": "√",
118
- * "unixVer": "x"
119
- * },
120
- * "harmony": {
121
- * "osVer": "3.0",
122
- * "uniVer": "4.23",
123
- * "unixVer": "x"
124
- * }
125
- * }
126
- * }
127
- */
128
- extension ?: (string[]) | null,
129
- /**
130
- * 图像裁剪参数,设置后 sizeType 失效。
131
- * @uniPlatform {
132
- * "app":{
133
- * "harmony": {
134
- * "osVer": "3.0",
135
- * "uniVer": "4.23",
136
- * "unixVer": "x"
137
- * }
138
- * },
139
- * "web": {
140
- * "uniVer": "x",
141
- * "unixVer": "x"
142
- * }
143
- * }
144
- */
145
- crop ?: (ChooseImageCropOptions) | null,
146
- /**
147
- * 成功则返回图片的本地文件路径列表 tempFilePaths
148
- */
149
- success ?: (ChooseImageSuccessCallback) | null,
150
- /**
151
- * 接口调用失败的回调函数
152
- */
153
- fail ?: (ChooseImageFailCallback) | null,
154
- /**
155
- * 接口调用结束的回调函数(调用成功、失败都会执行)
156
- */
157
- complete ?: (ChooseImageCompleteCallback) | null
158
- }
159
-
160
- export type ChooseImage = (options : ChooseImageOptions) => void
161
-
162
- export type PreviewImageSuccess = {
163
- /**
164
- * 调用API的名称
165
- */
166
- errSubject : string,
167
- /**
168
- * 描述信息
169
- */
170
- errMsg : string
171
- }
172
-
173
- export type LongPressActionsSuccessData = {
174
- /**
175
- * 接口调用失败的回调函数
176
- */
177
- tapIndex : number,
178
- /**
179
- * 接口调用结束的回调函数(调用成功、失败都会执行)
180
- */
181
- index : number
182
- };
183
- export type LongPressActionsOptions = {
184
- /**
185
- * 按钮的文字数组
186
- */
187
- itemList : string[],
188
- /**
189
- * 按钮的文字颜色,字符串格式,默认为"#000000"
190
- */
191
- itemColor : string | null,
192
- /**
193
- * 接口调用成功的回调函数
194
- */
195
- success : ((result : LongPressActionsSuccessData) => void) | null,
196
- /**
197
- * 接口调用失败的回调函数
198
- */
199
- fail : ((result : any) => void) | null,
200
- /**
201
- * 接口调用结束的回调函数(调用成功、失败都会执行)
202
- */
203
- complete : ((result : any) => void) | null
204
- };
205
-
206
-
207
- export type PreviewImageFail = IMediaError;
208
- export type PreviewImageSuccessCallback = (callback : PreviewImageSuccess) => void
209
- export type PreviewImageFailCallback = (callback : PreviewImageFail) => void
210
- export type PreviewImageCompleteCallback = ChooseImageCompleteCallback
211
-
212
- export type PreviewImageOptions = {
213
- /**
214
- * current 为当前显示图片的链接/索引值,不填或填写的值无效则为 urls 的第一张。APP平台仅支持索引值。
215
- * @type string | number
216
- */
217
- current ?: any | null,
218
- /**
219
- * 需要预览的图片链接列表
220
- */
221
- urls : Array<string.ImageURIString>,
222
- /**
223
- * 是否显示长按菜单
224
- */
225
- showmenu ?: boolean | null,
226
- /**
227
- * 图片指示器样式
228
- * - default: 底部圆点指示器
229
- * - number: 顶部数字指示器
230
- * - none: 不显示指示器
231
- * @type 'default' | 'number' | 'none'
232
- * @uniPlatform {
233
- * "app": {
234
- * "harmony": {
235
- * "osVer": "x",
236
- * "uniVer": "x",
237
- * "unixVer": "x"
238
- * }
239
- * }
240
- * }
241
- */
242
- indicator ?: string | null,
243
- /**
244
- * 是否可循环预览
245
- * @type boolean
246
- */
247
- loop ?: boolean | null,
248
- /**
249
- * 长按图片显示操作菜单,如不填默认为保存相册。
250
- * @uniPlatform {
251
- * "app": {
252
- * "android": {
253
- * "osVer": "5.0",
254
- * "uniVer": "√",
255
- * "unixVer": "x"
256
- * },
257
- * "harmony": {
258
- * "osVer": "x",
259
- * "uniVer": "x",
260
- * "unixVer": "x"
261
- * }
262
- * }
263
- * }
264
- */
265
- longPressActions ?: LongPressActionsOptions | null,
266
- /**
267
- * 接口调用成功的回调函数
268
- */
269
- success ?: (PreviewImageSuccessCallback) | null,
270
- /**
271
- * 接口调用失败的回调函数
272
- */
273
- fail ?: (PreviewImageFailCallback) | null,
274
- /**
275
- * 接口调用结束的回调函数(调用成功、失败都会执行)
276
- */
277
- complete ?: (PreviewImageCompleteCallback) | null
278
- };
279
-
280
- export type PreviewImage = (options : PreviewImageOptions) => void;
281
-
282
- export type ClosePreviewImage = (options : ClosePreviewImageOptions) => void;
283
- export type ClosePreviewImageSuccess = {
284
- /**
285
- * 错误信息
286
- */
287
- errMsg : string
288
- };
289
-
290
- export type ClosePreviewImageFail = IMediaError;
291
- export type ClosePreviewImageSuccessCallback = (callback : ClosePreviewImageSuccess) => void
292
- export type ClosePreviewImageFailCallback = (callback : ClosePreviewImageFail) => void
293
- export type ClosePreviewImageCompleteCallback = ChooseImageCompleteCallback
294
-
295
- export type ClosePreviewImageOptions = {
296
- /**
297
- * 接口调用成功的回调函数
298
- */
299
- success ?: (ClosePreviewImageSuccessCallback) | null,
300
- /**
301
- * 接口调用失败的回调函数
302
- */
303
- fail ?: (ClosePreviewImageFailCallback) | null,
304
- /**
305
- * 接口调用结束的回调函数(调用成功、失败都会执行)
306
- */
307
- complete ?: (ClosePreviewImageCompleteCallback) | null
308
- };
309
-
310
- export type GetImageInfo = (options : GetImageInfoOptions) => void;
311
- export type GetImageInfoSuccess = {
312
- /**
313
- * 图片宽度,单位px
314
- */
315
- width : number,
316
- /**
317
- * 图片高度,单位px
318
- */
319
- height : number,
320
- /**
321
- * 返回图片的本地路径
322
- */
323
- path : string,
324
- /**
325
- * 返回图片的方向
326
- * @uniPlatform {
327
- * "web": {
328
- * "uniVer": "x",
329
- * "unixVer": "x"
330
- * }
331
- * }
332
- */
333
- orientation ?: MediaOrientation,
334
- /**
335
- * 返回图片的格式
336
- * @uniPlatform {
337
- * "web": {
338
- * "uniVer": "x",
339
- * "unixVer": "x"
340
- * }
341
- * }
342
- */
343
- type : string | null
344
- };
345
-
346
- export type GetImageInfoFail = IMediaError;
347
- export type GetImageInfoSuccessCallback = (callback : GetImageInfoSuccess) => void
348
- export type GetImageInfoFailCallback = (callback : GetImageInfoFail) => void
349
- export type GetImageInfoCompleteCallback = ChooseImageCompleteCallback
350
-
351
- export type GetImageInfoOptions = {
352
- /**
353
- * 图片的路径,可以是相对路径,临时文件路径,存储文件路径,网络图片路径
354
- */
355
- src : string.ImageURIString,
356
- /**
357
- * 接口调用成功的回调函数
358
- */
359
- success ?: (GetImageInfoSuccessCallback) | null,
360
- /**
361
- * 接口调用失败的回调函数
362
- */
363
- fail ?: (GetImageInfoFailCallback) | null,
364
- /**
365
- * 接口调用结束的回调函数(调用成功、失败都会执行)
366
- */
367
- complete ?: (GetImageInfoCompleteCallback) | null
368
- };
369
-
370
- export type SaveImageToPhotosAlbum = (options : SaveImageToPhotosAlbumOptions) => void;
371
-
372
- export type SaveImageToPhotosAlbumSuccess = {
373
- /**
374
- * 保存到相册的图片路径
375
- */
376
- path : string
377
- };
378
-
379
- export type SaveImageToPhotosAlbumFail = IMediaError;
380
- export type SaveImageToPhotosAlbumSuccessCallback = (callback : SaveImageToPhotosAlbumSuccess) => void
381
- export type SaveImageToPhotosAlbumFailCallback = (callback : SaveImageToPhotosAlbumFail) => void
382
- export type SaveImageToPhotosAlbumCompleteCallback = ChooseImageCompleteCallback
383
-
384
- export type SaveImageToPhotosAlbumOptions = {
385
- /**
386
- * 图片文件路径,可以是临时文件路径也可以是永久文件路径,不支持网络图片路径
387
- */
388
- filePath : string.ImageURIString,
389
- /**
390
- * 接口调用成功的回调函数
391
- */
392
- success ?: (SaveImageToPhotosAlbumSuccessCallback) | null,
393
- /**
394
- * 接口调用失败的回调函数
395
- */
396
- fail ?: (SaveImageToPhotosAlbumFailCallback) | null,
397
- /**
398
- * 接口调用结束的回调函数(调用成功、失败都会执行)
399
- */
400
- complete ?: (SaveImageToPhotosAlbumCompleteCallback) | null
401
- };
402
- export type CompressImage = (options : CompressImageOptions) => void;
403
- export type CompressImageSuccess = {
404
- /**
405
- * 压缩后图片的临时文件路径
406
- */
407
- tempFilePath : string
408
- };
409
-
410
- export type CompressImageFail = IMediaError;
411
- export type CompressImageSuccessCallback = (callback : CompressImageSuccess) => void
412
- export type CompressImageFailCallback = (callback : CompressImageFail) => void
413
- export type CompressImageCompleteCallback = ChooseImageCompleteCallback
414
-
415
- export type CompressImageOptions = {
416
- /**
417
- * 图片路径,图片的路径,可以是相对路径、临时文件路径、存储文件路径
418
- */
419
- src : string.ImageURIString,
420
- /**
421
- * 压缩质量,范围0~100,数值越小,质量越低,压缩率越高(仅对jpg有效)
422
- */
423
- quality ?: number | null,
424
- /**
425
- * 旋转度数,范围0~360
426
- */
427
- rotate ?: number | null,
428
- /**
429
- * 缩放图片的宽度
430
- * @deprecated 已废弃
431
- */
432
- width ?: string | null,
433
- /**
434
- * 缩放图片的高度
435
- * @deprecated 已废弃
436
- */
437
- height ?: string | null,
438
- /**
439
- * 压缩后图片的高度,单位为px,若不填写则默认以compressedWidth为准等比缩放
440
- */
441
- compressedHeight ?: number | null,
442
- /**
443
- * 压缩后图片的宽度,单位为px,若不填写则默认以compressedHeight为准等比缩放。
444
- */
445
- compressedWidth ?: number | null,
446
- /**
447
- * 接口调用成功的回调函数
448
- */
449
- success ?: (CompressImageSuccessCallback) | null,
450
- /**
451
- * 接口调用失败的回调函数
452
- */
453
- fail ?: (CompressImageFailCallback) | null,
454
- /**
455
- * 接口调用结束的回调函数(调用成功、失败都会执行)
456
- */
457
- complete ?: (CompressImageCompleteCallback) | null
458
- };
459
-
460
- export type ChooseVideoSuccess = {
461
- /**
462
- * 选定视频的临时文件路径
463
- */
464
- tempFilePath : string,
465
- /**
466
- * 选定的视频文件,仅H5支持
467
- */
468
- // tempFile: File|null,
469
- /**
470
- * 选定视频的时间长度
471
- */
472
- duration : number,
473
- /**
474
- * 选定视频的数据量大小
475
- */
476
- size : number,
477
- /**
478
- * 返回选定视频的长
479
- */
480
- height : number,
481
- /**
482
- * 返回选定视频的宽
483
- */
484
- width : number,
485
- /**
486
- * 包含扩展名的文件名称(仅H5支持)
487
- */
488
- // name: string | null
489
- };
490
-
491
- export type ChooseVideoFail = IMediaError;
492
- export type ChooseVideoSuccessCallback = (callback : ChooseVideoSuccess) => void
493
- export type ChooseVideoFailCallback = (callback : ChooseVideoFail) => void
494
- export type ChooseVideoCompleteCallback = ChooseImageCompleteCallback
495
-
496
- export type ChooseVideoOptions = {
497
- /**
498
- * album 从相册选视频,camera 使用相机拍摄,默认为:['album', 'camera']
499
- */
500
- sourceType ?: (string[]) | null,
501
- /**
502
- * 是否压缩所选的视频源文件,默认值为true,需要压缩
503
- * @type boolean
504
- * @default true
505
- * @uniPlatform {
506
- * "app": {
507
- * "harmony": {
508
- * "osVer": "x",
509
- * "uniVer": "x",
510
- * "unixVer": "x"
511
- * }
512
- * },
513
- * "web": {
514
- * "uniVer": "x",
515
- * "unixVer": "x"
516
- * }
517
- * }
518
- */
519
- compressed ?: boolean | null,
520
- /**
521
- * 拍摄视频最长拍摄时间,单位秒。最长支持 60 秒
522
- * @uniPlatform {
523
- * "app": {
524
- * "harmony": {
525
- * "osVer": "x",
526
- * "uniVer": "x",
527
- * "unixVer": "x"
528
- * }
529
- * },
530
- * "web": {
531
- * "uniVer": "x",
532
- * "unixVer": "x"
533
- * }
534
- * }
535
- */
536
- maxDuration ?: number | null,
537
- /**
538
- * 摄像切换
539
- * - front: 前置摄像头
540
- * - back: 后置摄像头
541
- * @type 'front' | 'back'
542
- * @uniPlatform {
543
- * "app": {
544
- * "harmony": {
545
- * "osVer": "x",
546
- * "uniVer": "x",
547
- * "unixVer": "x"
548
- * }
549
- * },
550
- * "web": {
551
- * "uniVer": "x",
552
- * "unixVer": "x"
553
- * }
554
- * }
555
- */
556
- camera ?: string | null,
557
- /**
558
- * 根据文件拓展名过滤,每一项都不能是空字符串。默认不过滤。
559
- * @uniPlatform {
560
- * "app": {
561
- * "android": {
562
- * "osVer": "5.0",
563
- * "uniVer": "√",
564
- * "unixVer": "x"
565
- * },
566
- * "harmony": {
567
- * "osVer": "x",
568
- * "uniVer": "x",
569
- * "unixVer": "x"
570
- * }
571
- * }
572
- * }
573
- */
574
- extension ?: (string[]) | null,
575
- /**
576
- * 接口调用成功,返回视频文件的临时文件路径,详见返回参数说明
577
- */
578
- success ?: (ChooseVideoSuccessCallback) | null,
579
- /**
580
- * 接口调用失败的回调函数
581
- */
582
- fail ?: (ChooseVideoFailCallback) | null,
583
- /**
584
- * 接口调用结束的回调函数(调用成功、失败都会执行)
585
- */
586
- complete ?: (ChooseVideoCompleteCallback) | null
587
- };
588
-
589
- export type ChooseVideo = (options : ChooseVideoOptions) => void;
590
-
591
- export type GetVideoInfoSuccess = {
592
- /**
593
- * 画面方向
594
- * @uniPlatform {
595
- * "app": {
596
- * "harmony": {
597
- * "osVer": "3.0",
598
- * "uniVer": "4.23",
599
- * "unixVer": "x"
600
- * }
601
- * },
602
- * "web": {
603
- * "uniVer": "x",
604
- * "unixVer": "x"
605
- * }
606
- * }
607
- */
608
- orientation ?: MediaOrientation,
609
- /**
610
- * 视频格式
611
- * @uniPlatform {
612
- * "app": {
613
- * "harmony": {
614
- * "osVer": "3.0",
615
- * "uniVer": "4.23",
616
- * "unixVer": "x"
617
- * }
618
- * },
619
- * "web": {
620
- * "uniVer": "x",
621
- * "unixVer": "x"
622
- * }
623
- * }
624
- */
625
- type : string | null,
626
- /**
627
- * 视频长度
628
- */
629
- duration : number,
630
- /**
631
- * 视频大小,单位 kB
632
- */
633
- size : number,
634
- /**
635
- * 视频的长,单位 px
636
- */
637
- height : number,
638
- /**
639
- * 视频的宽,单位 px
640
- */
641
- width : number,
642
- /**
643
- * 视频帧率
644
- * @uniPlatform {
645
- * "app": {
646
- * "harmony": {
647
- * "osVer": "x",
648
- * "uniVer": "x",
649
- * "unixVer": "x"
650
- * }
651
- * },
652
- * "web": {
653
- * "uniVer": "x",
654
- * "unixVer": "x"
655
- * }
656
- * }
657
- */
658
- fps : number | null,
659
- /**
660
- * 视频码率,单位 kbps
661
- * @uniPlatform {
662
- * "app": {
663
- * "harmony": {
664
- * "osVer": "x",
665
- * "uniVer": "x",
666
- * "unixVer": "x"
667
- * }
668
- * },
669
- * "web": {
670
- * "uniVer": "x",
671
- * "unixVer": "x"
672
- * }
673
- * }
674
- */
675
- bitrate : number | null
676
- };
677
-
678
- export type GetVideoInfoFail = IMediaError;
679
- export type GetVideoInfoSuccessCallback = (callback : GetVideoInfoSuccess) => void
680
- export type GetVideoInfoFailCallback = (callback : GetVideoInfoFail) => void
681
- export type GetVideoInfoCompleteCallback = ChooseImageCompleteCallback
682
-
683
- export type GetVideoInfoOptions = {
684
- /**
685
- * 视频文件路径,可以是临时文件路径也可以是永久文件路径
686
- */
687
- src : string.VideoURIString,
688
- /**
689
- * 接口调用成功的回调函数
690
- */
691
- success ?: (GetVideoInfoSuccessCallback) | null,
692
- /**
693
- * 接口调用失败的回调函数
694
- */
695
- fail ?: (GetVideoInfoFailCallback) | null,
696
- /**
697
- * 接口调用结束的回调函数(调用成功、失败都会执行)
698
- */
699
- complete ?: (GetVideoInfoCompleteCallback) | null
700
- };
701
-
702
- export type GetVideoInfo = (options : GetVideoInfoOptions) => void;
703
-
704
- export type SaveVideoToPhotosAlbumSuccess = {};
705
-
706
- export type SaveVideoToPhotosAlbumFail = IMediaError;
707
- export type SaveVideoToPhotosAlbumSuccessCallback = (callback : SaveVideoToPhotosAlbumSuccess) => void
708
- export type SaveVideoToPhotosAlbumFailCallback = (callback : SaveVideoToPhotosAlbumFail) => void
709
- export type SaveVideoToPhotosAlbumCompleteCallback = ChooseImageCompleteCallback
710
-
711
- export type SaveVideoToPhotosAlbumOptions = {
712
- /**
713
- * 视频文件路径,可以是临时文件路径也可以是永久文件路径
714
- */
715
- filePath : string.VideoURIString,
716
- /**
717
- * 接口调用成功的回调函数
718
- */
719
- success ?: (SaveVideoToPhotosAlbumSuccessCallback) | null,
720
- /**
721
- * 接口调用失败的回调函数
722
- */
723
- fail ?: (SaveVideoToPhotosAlbumFailCallback) | null,
724
- /**
725
- * 接口调用结束的回调函数(调用成功、失败都会执行)
726
- */
727
- complete ?: (SaveVideoToPhotosAlbumCompleteCallback) | null
728
- };
729
-
730
- export type SaveVideoToPhotosAlbum = (options : SaveVideoToPhotosAlbumOptions) => void;
731
-
732
- export type CompressVideoSuccess = {
733
- /**
734
- * 压缩后的临时文件地址
735
- */
736
- tempFilePath : string,
737
- /**
738
- * 压缩后的大小,单位 kB
739
- */
740
- size : number
741
- };
742
-
743
- export type CompressVideoFail = IMediaError;
744
- export type CompressVideoSuccessCallback = (callback : CompressVideoSuccess) => void
745
- export type CompressVideoFailCallback = (callback : CompressVideoFail) => void
746
- export type CompressVideoCompleteCallback = ChooseImageCompleteCallback
747
-
748
- export type CompressVideoOptions = {
749
- /**
750
- * 视频文件路径,可以是临时文件路径也可以是永久文件路径
751
- */
752
- src : string.VideoURIString,
753
- /**
754
- * 压缩质量
755
- * - low: 低
756
- * - medium: 中
757
- * - high: 高
758
- * @type 'low' | 'medium' | 'high'
759
- */
760
- quality ?: string | null,
761
- /**
762
- * 码率,单位 kbps
763
- * @uniPlatform {
764
- * "app": {
765
- * "android": {
766
- * "osVer": "5.0",
767
- * "uniVer": "√",
768
- * "unixVer": "x"
769
- * }
770
- * }
771
- * }
772
- */
773
- bitrate ?: number | null,
774
- /**
775
- * 帧率
776
- * @uniPlatform {
777
- * "app": {
778
- * "android": {
779
- * "osVer": "5.0",
780
- * "uniVer": "√",
781
- * "unixVer": "x"
782
- * }
783
- * }
784
- * }
785
- */
786
- fps ?: number | null,
787
- /**
788
- * 相对于原视频的分辨率比例,取值范围(0, 1]
789
- */
790
- resolution ?: number | null,
791
- /**
792
- * 接口调用成功的回调函数
793
- */
794
- success ?: (CompressVideoSuccessCallback) | null,
795
- /**
796
- * 接口调用失败的回调函数
797
- */
798
- fail ?: (CompressVideoFailCallback) | null,
799
- /**
800
- * 接口调用结束的回调函数(调用成功、失败都会执行)
801
- */
802
- complete ?: (CompressVideoCompleteCallback) | null
803
- };
804
-
805
- export type CompressVideo = (options : CompressVideoOptions) => void;
806
-
807
- export interface Uni {
808
- /**
809
- * 从本地相册选择图片或使用相机拍照
810
- * @description 从本地相册选择图片或使用相机拍照
811
- * @uniPlatform {
812
- * "app": {
813
- * "android": {
814
- * "osVer": "5.0",
815
- * "uniVer": "√",
816
- * "unixVer": "3.9+"
817
- * },
818
- * "ios": {
819
- * "osVer": "12.0",
820
- * "uniVer": "√",
821
- * "unixVer": "4.11"
822
- * },
823
- * "harmony": {
824
- * "osVer": "3.0",
825
- * "uniVer": "4.23",
826
- * "unixVer": "x"
827
- * }
828
- * },
829
- * "web": {
830
- * "uniVer": "√",
831
- * "unixVer": "4.0"
832
- * },
833
- * "mp": {
834
- * "weixin": {
835
- * "hostVer": "√",
836
- * "uniVer": "√",
837
- * "unixVer": "x"
838
- * },
839
- * "alipay": {
840
- * "hostVer": "√",
841
- * "uniVer": "√",
842
- * "unixVer": "x"
843
- * },
844
- * "baidu": {
845
- * "hostVer": "√",
846
- * "uniVer": "√",
847
- * "unixVer": "x"
848
- * },
849
- * "toutiao": {
850
- * "hostVer": "√",
851
- * "uniVer": "√",
852
- * "unixVer": "x"
853
- * },
854
- * "lark": {
855
- * "hostVer": "√",
856
- * "uniVer": "√",
857
- * "unixVer": "x"
858
- * },
859
- * "qq": {
860
- * "hostVer": "√",
861
- * "uniVer": "√",
862
- * "unixVer": "x"
863
- * },
864
- * "kuaishou": {
865
- * "hostVer": "√",
866
- * "uniVer": "√",
867
- * "unixVer": "x"
868
- * },
869
- * "jd": {
870
- * "hostVer": "√",
871
- * "uniVer": "√",
872
- * "unixVer": "x"
873
- * }
874
- * }
875
- * }
876
- * @uniVueVersion 2,3
877
- * @example
878
- * ```typescript
879
- * uni.chooseImage({
880
- * count:3,
881
- * success(e){
882
- * console.log(JSON.stringify(e))
883
- * }
884
- * })
885
- * ```
886
- * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/media/image.html#chooseimage
887
- * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/choose-image.html
888
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/choose-image.html
889
- * @autotest {
890
- generated:false
891
- }
892
- */
893
- chooseImage(options : ChooseImageOptions) : void;
894
- /**
895
- * 预览图片
896
- * @description 预览图片
897
- * @uniPlatform {
898
- * "app": {
899
- * "android": {
900
- * "osVer": "5.0",
901
- * "uniVer": "√",
902
- * "unixVer": "3.9+"
903
- * },
904
- * "ios": {
905
- * "osVer": "12.0",
906
- * "uniVer": "√",
907
- * "unixVer": "4.11"
908
- * },
909
- * "harmony": {
910
- * "osVer": "3.0",
911
- * "uniVer": "4.23",
912
- * "unixVer": "x"
913
- * }
914
- * },
915
- * "web": {
916
- * "uniVer": "√",
917
- * "unixVer": "4.0"
918
- * },
919
- * "mp": {
920
- * "weixin": {
921
- * "hostVer": "√",
922
- * "uniVer": "√",
923
- * "unixVer": "x"
924
- * },
925
- * "alipay": {
926
- * "hostVer": "√",
927
- * "uniVer": "√",
928
- * "unixVer": "x"
929
- * },
930
- * "baidu": {
931
- * "hostVer": "√",
932
- * "uniVer": "√",
933
- * "unixVer": "x"
934
- * },
935
- * "toutiao": {
936
- * "hostVer": "√",
937
- * "uniVer": "√",
938
- * "unixVer": "x"
939
- * },
940
- * "lark": {
941
- * "hostVer": "√",
942
- * "uniVer": "√",
943
- * "unixVer": "x"
944
- * },
945
- * "qq": {
946
- * "hostVer": "√",
947
- * "uniVer": "√",
948
- * "unixVer": "x"
949
- * },
950
- * "kuaishou": {
951
- * "hostVer": "√",
952
- * "uniVer": "√",
953
- * "unixVer": "x"
954
- * },
955
- * "jd": {
956
- * "hostVer": "x",
957
- * "uniVer": "x",
958
- * "unixVer": "x"
959
- * }
960
- * }
961
- * }
962
- * @uniVueVersion 2,3
963
- * @example
964
- * ```typescript
965
- * uni.previewImage({
966
- * urls:['/static/a.jpg','/static/b.jpg'],
967
- * success(e){
968
- * console.log(JSON.stringify(e))
969
- * }
970
- * })
971
- * ```
972
- * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/media/image.html#unipreviewimageobject
973
- * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/preview-image.html
974
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/preview-image.html
975
- * @autotest {
976
- generated:false
977
- }
978
- */
979
- previewImage(options : PreviewImageOptions) : void;
980
- /**
981
- * 关闭图片预览
982
- * @description 关闭图片预览
983
- * @uniPlatform {
984
- * "app": {
985
- * "android": {
986
- * "osVer": "5.0",
987
- * "uniVer": "√",
988
- * "unixVer": "3.9+"
989
- * },
990
- * "ios": {
991
- * "osVer": "12.0",
992
- * "uniVer": "√",
993
- * "unixVer": "4.11"
994
- * },
995
- * "harmony": {
996
- * "osVer": "3.0",
997
- * "uniVer": "4.23",
998
- * "unixVer": "x"
999
- * }
1000
- * },
1001
- * "web": {
1002
- * "uniVer": "√",
1003
- * "unixVer": "4.0"
1004
- * }
1005
- * }
1006
- * @uniVueVersion 2,3
1007
- * @example
1008
- * ```typescript
1009
- * uni.closePreviewImage({
1010
- * success(e){
1011
- * console.log(JSON.stringify(e))
1012
- * }
1013
- * })
1014
- * ```
1015
- * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/media/image.html#closepreviewimage
1016
- * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/preview-image.html#closepreviewimage
1017
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/preview-image.html#closepreviewimage
1018
- * @autotest {
1019
- generated:false
1020
- }
1021
- */
1022
- closePreviewImage(options : ClosePreviewImageOptions) : void;
1023
- /**
1024
- * 获取图片信息
1025
- * @description 获取图片信息
1026
- * @uniPlatform {
1027
- * "app": {
1028
- * "android": {
1029
- * "osVer": "5.0",
1030
- * "uniVer": "√",
1031
- * "unixVer": "4.18"
1032
- * },
1033
- * "ios": {
1034
- * "osVer": "12.0",
1035
- * "uniVer": "√",
1036
- * "unixVer": "4.25"
1037
- * },
1038
- * "harmony": {
1039
- * "osVer": "3.0",
1040
- * "uniVer": "4.23",
1041
- * "unixVer": "x"
1042
- * }
1043
- * },
1044
- * "web": {
1045
- * "uniVer": "√",
1046
- * "unixVer": "4.0"
1047
- * }
1048
- * }
1049
- * @uniVueVersion 2,3
1050
- * @example
1051
- * ```typescript
1052
- * uni.getImageInfo({
1053
- * src:'/static/a.jpg',
1054
- * success(e){
1055
- * console.log(JSON.stringify(e))
1056
- * },
1057
- * })
1058
- * ```
1059
- * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/media/image.html#getimageinfo
1060
- * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/get-image-info.html
1061
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/get-image-info.html
1062
- * @autotest {
1063
- generated:false,
1064
- case:[
1065
- {
1066
- input:[{"src":"/static/a.jpg"}]
1067
- }
1068
- ]
1069
- }
1070
- */
1071
- getImageInfo(options : GetImageInfoOptions) : void;
1072
- /**
1073
- * 保存图片到系统相册
1074
- * @description 保存图片到系统相册
1075
- * @uniPlatform {
1076
- * "app": {
1077
- * "android": {
1078
- * "osVer": "5.0",
1079
- * "uniVer": "√",
1080
- * "unixVer": "3.9+"
1081
- * },
1082
- * "ios": {
1083
- * "osVer": "12.0",
1084
- * "uniVer": "√",
1085
- * "unixVer": "4.11"
1086
- * },
1087
- * "harmony": {
1088
- * "osVer": "3.0",
1089
- * "uniVer": "4.23",
1090
- * "unixVer": "x"
1091
- * }
1092
- * },
1093
- * "web": {
1094
- * "uniVer": "x",
1095
- * "unixVer": "x"
1096
- * }
1097
- * }
1098
- * @uniVueVersion 2,3
1099
- * @example
1100
- * ```typescript
1101
- * uni.saveImageToPhotosAlbum({
1102
- * filePath:'/static/a.jpg',
1103
- * success(e){
1104
- * console.log(JSON.stringify(e))
1105
- * },
1106
- * })
1107
- * ```
1108
- * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/media/image.html#saveimagetophotosalbum
1109
- * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/save-image-to-photos-album.html
1110
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/save-image-to-photos-album.html
1111
- * @autotest {
1112
- generated:false,
1113
- case:[
1114
- {
1115
- input:[{"filePath":"/static/a.jpg"}]
1116
- }
1117
- ]
1118
- }
1119
- */
1120
- saveImageToPhotosAlbum(options : SaveImageToPhotosAlbumOptions) : void;
1121
- /**
1122
- * 压缩图片
1123
- * @description 压缩图片
1124
- * @uniPlatform {
1125
- * "app": {
1126
- * "android": {
1127
- * "osVer": "5.0",
1128
- * "uniVer": "√",
1129
- * "unixVer": "4.18"
1130
- * },
1131
- * "ios": {
1132
- * "osVer": "12.0",
1133
- * "uniVer": "√",
1134
- * "unixVer": "4.25"
1135
- * },
1136
- * "harmony": {
1137
- * "osVer": "x",
1138
- * "uniVer": "x",
1139
- * "unixVer": "x"
1140
- * }
1141
- * },
1142
- * "web": {
1143
- * "uniVer": "x",
1144
- * "unixVer": "x"
1145
- * }
1146
- * }
1147
- * @uniVueVersion 2,3
1148
- * @example
1149
- * ```typescript
1150
- * uni.compressImage({
1151
- * src:'/static/a.jpg',
1152
- * quality:80,
1153
- * success(e){
1154
- * console.log(JSON.stringify(e))
1155
- * },
1156
- * })
1157
- * ```
1158
- * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/media/image.html#compressimage
1159
- * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/compress-image.html
1160
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/compress-image.html
1161
- * @autotest {
1162
- generated:false,
1163
- case:[
1164
- {
1165
- input:[{"src":"/static/d.jpg"},{"rotate","30"}]
1166
- }
1167
- ]
1168
- }
1169
- */
1170
- compressImage(options : CompressImageOptions) : void;
1171
- /**
1172
- * 拍摄视频或从手机相册中选视频,返回视频的临时文件路径。
1173
- * @description 拍摄视频或从手机相册中选视频,返回视频的临时文件路径。
1174
- * @uniPlatform {
1175
- * "app": {
1176
- * "android": {
1177
- * "osVer": "5.0",
1178
- * "uniVer": "√",
1179
- * "unixVer": "4.18"
1180
- * },
1181
- * "ios": {
1182
- * "osVer": "12.0",
1183
- * "uniVer": "√",
1184
- * "unixVer": "4.18"
1185
- * },
1186
- * "harmony": {
1187
- * "osVer": "3.0",
1188
- * "uniVer": "4.23",
1189
- * "unixVer": "x"
1190
- * }
1191
- * },
1192
- * "web": {
1193
- * "uniVer": "√",
1194
- * "unixVer": "4.0"
1195
- * }
1196
- * }
1197
- * @uniVueVersion 2,3
1198
- * @example
1199
- * ```typescript
1200
- * uni.chooseVideo({
1201
- * success(e){
1202
- * console.log(JSON.stringify(e))
1203
- * },
1204
- * })
1205
- * ```
1206
- * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/media/video.html
1207
- * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/choose-video.html
1208
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/choose-video.html
1209
- *
1210
- */
1211
- chooseVideo(options : ChooseVideoOptions) : void;
1212
- /**
1213
- * 获取视频详细信息
1214
- * @description 获取视频详细信息
1215
- * @uniPlatform {
1216
- * "app": {
1217
- * "android": {
1218
- * "osVer": "5.0",
1219
- * "uniVer": "√",
1220
- * "unixVer": "4.18"
1221
- * },
1222
- * "ios": {
1223
- * "osVer": "12.0",
1224
- * "uniVer": "√",
1225
- * "unixVer": "4.25"
1226
- * },
1227
- * "harmony": {
1228
- * "osVer": "3.0",
1229
- * "uniVer": "4.23",
1230
- * "unixVer": "x"
1231
- * }
1232
- * },
1233
- * "web": {
1234
- * "uniVer": "√",
1235
- * "unixVer": "4.0"
1236
- * }
1237
- * }
1238
- * @uniVueVersion 2,3
1239
- * @example
1240
- * ```typescript
1241
- * uni.GetVideoInfo({
1242
- * src:"/static/a.mp4",
1243
- * success(e){
1244
- * console.log(JSON.stringify(e))
1245
- * },
1246
- * })
1247
- * ```
1248
- * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/media/video.html#getvideoinfo
1249
- * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/get-video-info.html
1250
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/get-video-info.html
1251
- *
1252
- */
1253
- getVideoInfo(options : GetVideoInfoOptions) : void;
1254
- /**
1255
- * 保存视频到系统相册
1256
- * @description 保存视频到系统相册
1257
- * @uniPlatform {
1258
- * "app": {
1259
- * "android": {
1260
- * "osVer": "5.0",
1261
- * "uniVer": "√",
1262
- * "unixVer": "4.18"
1263
- * },
1264
- * "ios": {
1265
- * "osVer": "12.0",
1266
- * "uniVer": "√",
1267
- * "unixVer": "4.18"
1268
- * },
1269
- * "harmony": {
1270
- * "osVer": "3.0",
1271
- * "uniVer": "4.23",
1272
- * "unixVer": "x"
1273
- * }
1274
- * },
1275
- * "web": {
1276
- * "uniVer": "x",
1277
- * "unixVer": "x"
1278
- * }
1279
- * }
1280
- * @uniVueVersion 2,3
1281
- * @example
1282
- * ```typescript
1283
- * uni.saveVideoToPhotosAlbum({
1284
- * filePath:"/static/a.mp4",
1285
- * success(e){
1286
- * console.log(JSON.stringify(e))
1287
- * },
1288
- * })
1289
- * ```
1290
- * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/media/video.html#savevideotophotosalbum
1291
- * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/save-video-to-photos-album.html
1292
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/save-video-to-photos-album.html
1293
- *
1294
- */
1295
- saveVideoToPhotosAlbum(options : SaveVideoToPhotosAlbumOptions) : void;
1296
- /**
1297
- * 压缩视频
1298
- * @description 压缩视频
1299
- * @uniPlatform {
1300
- * "app": {
1301
- * "android": {
1302
- * "osVer": "5.0",
1303
- * "uniVer": "3,1.10",
1304
- * "unixVer": "4.18"
1305
- * },
1306
- * "ios": {
1307
- * "osVer": "12.0",
1308
- * "uniVer": "√",
1309
- * "unixVer": "4.25"
1310
- * },
1311
- * "harmony": {
1312
- * "osVer": "x",
1313
- * "uniVer": "x",
1314
- * "unixVer": "x"
1315
- * }
1316
- * },
1317
- * "web": {
1318
- * "uniVer": "x",
1319
- * "unixVer": "x"
1320
- * }
1321
- * }
1322
- * @uniVueVersion 2,3
1323
- * @example
1324
- * ```typescript
1325
- * uni.compressVideo({
1326
- * src:"/static/a.mp4",
1327
- * quality:"low",
1328
- * success(e){
1329
- * console.log(JSON.stringify(e))
1330
- * },
1331
- * })
1332
- * ```
1333
- * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/media/video.html#compressvideo
1334
- * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/compress-video.html
1335
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/compress-video.html
1336
- *
1337
- */
1338
- compressVideo(options : CompressVideoOptions) : void;
1339
- }
1
+ export type MediaOrientation =
2
+ | 'up'
3
+ | 'down'
4
+ | 'left'
5
+ | 'right'
6
+ | 'up-mirrored'
7
+ | 'down-mirrored'
8
+ | 'left-mirrored'
9
+ | 'right-mirrored'
10
+
11
+ /**
12
+ * 错误码
13
+ * - 1101001 用户取消
14
+ * - 1101002 urls至少包含一张图片地址
15
+ * - 1101003 文件不存在
16
+ * - 1101004 图片加载失败
17
+ * - 1101005 未获取权限
18
+ * - 1101006 图片或视频保存失败
19
+ * - 1101007 图片裁剪失败
20
+ * - 1101008 拍照或录像失败
21
+ * - 1101009 图片压缩失败
22
+ * - 1101010 其他错误
23
+ */
24
+
25
+ export type MediaErrorCode = 1101001 | 1101002 | 1101003 | 1101004 | 1101005 | 1101006 | 1101007 | 1101008 | 1101009 | 1101010;
26
+
27
+ /**
28
+ * 图片或视频操作失败的错误回调
29
+ */
30
+ export interface IMediaError extends IUniError {
31
+ errCode : MediaErrorCode
32
+ };
33
+
34
+
35
+ export type ChooseImageSuccess = {
36
+ /**
37
+ * 调用API的名称
38
+ */
39
+ errSubject : string,
40
+ /**
41
+ * 描述信息
42
+ */
43
+ errMsg : string,
44
+ /**
45
+ * 图片的本地文件路径列表
46
+ * @type string | string []
47
+ */
48
+ tempFilePaths : Array<string>,
49
+ /**
50
+ * 图片的本地文件列表
51
+ */
52
+ tempFiles : any
53
+ }
54
+
55
+ export type ChooseImageFail = IMediaError;
56
+ export type ChooseImageSuccessCallback = (callback : ChooseImageSuccess) => void
57
+ export type ChooseImageFailCallback = (callback : ChooseImageFail) => void
58
+ export type ChooseImageCompleteCallback = (callback : any) => void
59
+
60
+ export type ChooseImageCropOptions = {
61
+ /**
62
+ * 裁剪的宽度,单位为px,用于计算裁剪宽高比。
63
+ */
64
+ width : number;
65
+ /**
66
+ * 裁剪的高度,单位为px,用于计算裁剪宽高比。
67
+ */
68
+ height : number;
69
+ /**
70
+ * 取值范围为1-100,数值越小,质量越低(仅对jpg格式有效)。默认值为80。
71
+ * @defaultValue 80
72
+ */
73
+ quality : (number) | null;
74
+ /**
75
+ * 是否将width和height作为裁剪保存图片真实的像素值。默认值为true。注:设置为false时在裁剪编辑界面显示图片的像素值,设置为true时不显示。
76
+ * @type boolean
77
+ */
78
+ resize : (boolean) | null;
79
+ }
80
+
81
+ export type ChooseImageOptions = {
82
+ /**
83
+ * 最多可以选择的图片张数,app端不限制,微信小程序最多可支持20个。
84
+ * @defaultValue 9
85
+ */
86
+ count ?: (number) | null,
87
+ /**
88
+ * original 原图,compressed 压缩图,默认二者都有
89
+ * @type string | string []
90
+ * @defaultValue ['original','compressed']
91
+ * @uniPlatform {
92
+ * "app":{
93
+ * "harmony": {
94
+ * "osVer": "3.0",
95
+ * "uniVer": "4.23",
96
+ * "unixVer": "x"
97
+ * }
98
+ * },
99
+ * "web": {
100
+ * "uniVer": "x",
101
+ * "unixVer": "x"
102
+ * }
103
+ * }
104
+ */
105
+ sizeType ?: (string[]) | null,
106
+ /**
107
+ * album 从相册选图,camera 使用相机,默认二者都有
108
+ * @defaultValue ['album','camera']
109
+ */
110
+ sourceType ?: (string[]) | null,
111
+ /**
112
+ * 根据文件拓展名过滤,每一项都不能是空字符串。默认不过滤。仅H5支持
113
+ * @uniPlatform {
114
+ * "app": {
115
+ * "android": {
116
+ * "osVer": "5.0",
117
+ * "uniVer": "√",
118
+ * "unixVer": "x"
119
+ * },
120
+ * "harmony": {
121
+ * "osVer": "3.0",
122
+ * "uniVer": "4.23",
123
+ * "unixVer": "x"
124
+ * }
125
+ * }
126
+ * }
127
+ */
128
+ extension ?: (string[]) | null,
129
+ /**
130
+ * 图像裁剪参数,设置后 sizeType 失效。
131
+ * @uniPlatform {
132
+ * "app":{
133
+ * "harmony": {
134
+ * "osVer": "3.0",
135
+ * "uniVer": "4.23",
136
+ * "unixVer": "x"
137
+ * }
138
+ * },
139
+ * "web": {
140
+ * "uniVer": "x",
141
+ * "unixVer": "x"
142
+ * }
143
+ * }
144
+ */
145
+ crop ?: (ChooseImageCropOptions) | null,
146
+ /**
147
+ * 成功则返回图片的本地文件路径列表 tempFilePaths
148
+ */
149
+ success ?: (ChooseImageSuccessCallback) | null,
150
+ /**
151
+ * 接口调用失败的回调函数
152
+ */
153
+ fail ?: (ChooseImageFailCallback) | null,
154
+ /**
155
+ * 接口调用结束的回调函数(调用成功、失败都会执行)
156
+ */
157
+ complete ?: (ChooseImageCompleteCallback) | null
158
+ }
159
+
160
+ export type ChooseImage = (options : ChooseImageOptions) => void
161
+
162
+ export type PreviewImageSuccess = {
163
+ /**
164
+ * 调用API的名称
165
+ */
166
+ errSubject : string,
167
+ /**
168
+ * 描述信息
169
+ */
170
+ errMsg : string
171
+ }
172
+
173
+ export type LongPressActionsSuccessData = {
174
+ /**
175
+ * 接口调用失败的回调函数
176
+ */
177
+ tapIndex : number,
178
+ /**
179
+ * 接口调用结束的回调函数(调用成功、失败都会执行)
180
+ */
181
+ index : number
182
+ };
183
+ export type LongPressActionsOptions = {
184
+ /**
185
+ * 按钮的文字数组
186
+ */
187
+ itemList : string[],
188
+ /**
189
+ * 按钮的文字颜色,字符串格式,默认为"#000000"
190
+ */
191
+ itemColor : string | null,
192
+ /**
193
+ * 接口调用成功的回调函数
194
+ */
195
+ success : ((result : LongPressActionsSuccessData) => void) | null,
196
+ /**
197
+ * 接口调用失败的回调函数
198
+ */
199
+ fail : ((result : any) => void) | null,
200
+ /**
201
+ * 接口调用结束的回调函数(调用成功、失败都会执行)
202
+ */
203
+ complete : ((result : any) => void) | null
204
+ };
205
+
206
+
207
+ export type PreviewImageFail = IMediaError;
208
+ export type PreviewImageSuccessCallback = (callback : PreviewImageSuccess) => void
209
+ export type PreviewImageFailCallback = (callback : PreviewImageFail) => void
210
+ export type PreviewImageCompleteCallback = ChooseImageCompleteCallback
211
+
212
+ export type PreviewImageOptions = {
213
+ /**
214
+ * current 为当前显示图片的链接/索引值,不填或填写的值无效则为 urls 的第一张。APP平台仅支持索引值。
215
+ * @type string | number
216
+ */
217
+ current ?: any | null,
218
+ /**
219
+ * 需要预览的图片链接列表
220
+ */
221
+ urls : Array<string.ImageURIString>,
222
+ /**
223
+ * 是否显示长按菜单
224
+ */
225
+ showmenu ?: boolean | null,
226
+ /**
227
+ * 图片指示器样式
228
+ * - default: 底部圆点指示器
229
+ * - number: 顶部数字指示器
230
+ * - none: 不显示指示器
231
+ * @type 'default' | 'number' | 'none'
232
+ * @uniPlatform {
233
+ * "app": {
234
+ * "harmony": {
235
+ * "osVer": "x",
236
+ * "uniVer": "x",
237
+ * "unixVer": "x"
238
+ * }
239
+ * }
240
+ * }
241
+ */
242
+ indicator ?: string | null,
243
+ /**
244
+ * 是否可循环预览
245
+ * @type boolean
246
+ */
247
+ loop ?: boolean | null,
248
+ /**
249
+ * 长按图片显示操作菜单,如不填默认为保存相册。
250
+ * @uniPlatform {
251
+ * "app": {
252
+ * "android": {
253
+ * "osVer": "5.0",
254
+ * "uniVer": "√",
255
+ * "unixVer": "x"
256
+ * },
257
+ * "harmony": {
258
+ * "osVer": "x",
259
+ * "uniVer": "x",
260
+ * "unixVer": "x"
261
+ * }
262
+ * }
263
+ * }
264
+ */
265
+ longPressActions ?: LongPressActionsOptions | null,
266
+ /**
267
+ * 接口调用成功的回调函数
268
+ */
269
+ success ?: (PreviewImageSuccessCallback) | null,
270
+ /**
271
+ * 接口调用失败的回调函数
272
+ */
273
+ fail ?: (PreviewImageFailCallback) | null,
274
+ /**
275
+ * 接口调用结束的回调函数(调用成功、失败都会执行)
276
+ */
277
+ complete ?: (PreviewImageCompleteCallback) | null
278
+ };
279
+
280
+ export type PreviewImage = (options : PreviewImageOptions) => void;
281
+
282
+ export type ClosePreviewImage = (options : ClosePreviewImageOptions) => void;
283
+ export type ClosePreviewImageSuccess = {
284
+ /**
285
+ * 错误信息
286
+ */
287
+ errMsg : string
288
+ };
289
+
290
+ export type ClosePreviewImageFail = IMediaError;
291
+ export type ClosePreviewImageSuccessCallback = (callback : ClosePreviewImageSuccess) => void
292
+ export type ClosePreviewImageFailCallback = (callback : ClosePreviewImageFail) => void
293
+ export type ClosePreviewImageCompleteCallback = ChooseImageCompleteCallback
294
+
295
+ export type ClosePreviewImageOptions = {
296
+ /**
297
+ * 接口调用成功的回调函数
298
+ */
299
+ success ?: (ClosePreviewImageSuccessCallback) | null,
300
+ /**
301
+ * 接口调用失败的回调函数
302
+ */
303
+ fail ?: (ClosePreviewImageFailCallback) | null,
304
+ /**
305
+ * 接口调用结束的回调函数(调用成功、失败都会执行)
306
+ */
307
+ complete ?: (ClosePreviewImageCompleteCallback) | null
308
+ };
309
+
310
+ export type GetImageInfo = (options : GetImageInfoOptions) => void;
311
+ export type GetImageInfoSuccess = {
312
+ /**
313
+ * 图片宽度,单位px
314
+ */
315
+ width : number,
316
+ /**
317
+ * 图片高度,单位px
318
+ */
319
+ height : number,
320
+ /**
321
+ * 返回图片的本地路径
322
+ */
323
+ path : string,
324
+ /**
325
+ * 返回图片的方向
326
+ * @uniPlatform {
327
+ * "web": {
328
+ * "uniVer": "x",
329
+ * "unixVer": "x"
330
+ * }
331
+ * }
332
+ */
333
+ orientation ?: MediaOrientation,
334
+ /**
335
+ * 返回图片的格式
336
+ * @uniPlatform {
337
+ * "web": {
338
+ * "uniVer": "x",
339
+ * "unixVer": "x"
340
+ * }
341
+ * }
342
+ */
343
+ type : string | null
344
+ };
345
+
346
+ export type GetImageInfoFail = IMediaError;
347
+ export type GetImageInfoSuccessCallback = (callback : GetImageInfoSuccess) => void
348
+ export type GetImageInfoFailCallback = (callback : GetImageInfoFail) => void
349
+ export type GetImageInfoCompleteCallback = ChooseImageCompleteCallback
350
+
351
+ export type GetImageInfoOptions = {
352
+ /**
353
+ * 图片的路径,可以是相对路径,临时文件路径,存储文件路径,网络图片路径
354
+ */
355
+ src : string.ImageURIString,
356
+ /**
357
+ * 接口调用成功的回调函数
358
+ */
359
+ success ?: (GetImageInfoSuccessCallback) | null,
360
+ /**
361
+ * 接口调用失败的回调函数
362
+ */
363
+ fail ?: (GetImageInfoFailCallback) | null,
364
+ /**
365
+ * 接口调用结束的回调函数(调用成功、失败都会执行)
366
+ */
367
+ complete ?: (GetImageInfoCompleteCallback) | null
368
+ };
369
+
370
+ export type SaveImageToPhotosAlbum = (options : SaveImageToPhotosAlbumOptions) => void;
371
+
372
+ export type SaveImageToPhotosAlbumSuccess = {
373
+ /**
374
+ * 保存到相册的图片路径
375
+ */
376
+ path : string
377
+ };
378
+
379
+ export type SaveImageToPhotosAlbumFail = IMediaError;
380
+ export type SaveImageToPhotosAlbumSuccessCallback = (callback : SaveImageToPhotosAlbumSuccess) => void
381
+ export type SaveImageToPhotosAlbumFailCallback = (callback : SaveImageToPhotosAlbumFail) => void
382
+ export type SaveImageToPhotosAlbumCompleteCallback = ChooseImageCompleteCallback
383
+
384
+ export type SaveImageToPhotosAlbumOptions = {
385
+ /**
386
+ * 图片文件路径,可以是临时文件路径也可以是永久文件路径,不支持网络图片路径
387
+ */
388
+ filePath : string.ImageURIString,
389
+ /**
390
+ * 接口调用成功的回调函数
391
+ */
392
+ success ?: (SaveImageToPhotosAlbumSuccessCallback) | null,
393
+ /**
394
+ * 接口调用失败的回调函数
395
+ */
396
+ fail ?: (SaveImageToPhotosAlbumFailCallback) | null,
397
+ /**
398
+ * 接口调用结束的回调函数(调用成功、失败都会执行)
399
+ */
400
+ complete ?: (SaveImageToPhotosAlbumCompleteCallback) | null
401
+ };
402
+ export type CompressImage = (options : CompressImageOptions) => void;
403
+ export type CompressImageSuccess = {
404
+ /**
405
+ * 压缩后图片的临时文件路径
406
+ */
407
+ tempFilePath : string
408
+ };
409
+
410
+ export type CompressImageFail = IMediaError;
411
+ export type CompressImageSuccessCallback = (callback : CompressImageSuccess) => void
412
+ export type CompressImageFailCallback = (callback : CompressImageFail) => void
413
+ export type CompressImageCompleteCallback = ChooseImageCompleteCallback
414
+
415
+ export type CompressImageOptions = {
416
+ /**
417
+ * 图片路径,图片的路径,可以是相对路径、临时文件路径、存储文件路径
418
+ */
419
+ src : string.ImageURIString,
420
+ /**
421
+ * 压缩质量,范围0~100,数值越小,质量越低,压缩率越高(仅对jpg有效)
422
+ */
423
+ quality ?: number | null,
424
+ /**
425
+ * 旋转度数,范围0~360
426
+ */
427
+ rotate ?: number | null,
428
+ /**
429
+ * 缩放图片的宽度
430
+ * @deprecated 已废弃
431
+ */
432
+ width ?: string | null,
433
+ /**
434
+ * 缩放图片的高度
435
+ * @deprecated 已废弃
436
+ */
437
+ height ?: string | null,
438
+ /**
439
+ * 压缩后图片的高度,单位为px,若不填写则默认以compressedWidth为准等比缩放
440
+ */
441
+ compressedHeight ?: number | null,
442
+ /**
443
+ * 压缩后图片的宽度,单位为px,若不填写则默认以compressedHeight为准等比缩放。
444
+ */
445
+ compressedWidth ?: number | null,
446
+ /**
447
+ * 接口调用成功的回调函数
448
+ */
449
+ success ?: (CompressImageSuccessCallback) | null,
450
+ /**
451
+ * 接口调用失败的回调函数
452
+ */
453
+ fail ?: (CompressImageFailCallback) | null,
454
+ /**
455
+ * 接口调用结束的回调函数(调用成功、失败都会执行)
456
+ */
457
+ complete ?: (CompressImageCompleteCallback) | null
458
+ };
459
+
460
+ export type ChooseVideoSuccess = {
461
+ /**
462
+ * 选定视频的临时文件路径
463
+ */
464
+ tempFilePath : string,
465
+ /**
466
+ * 选定的视频文件,仅H5支持
467
+ */
468
+ // tempFile: File|null,
469
+ /**
470
+ * 选定视频的时间长度
471
+ */
472
+ duration : number,
473
+ /**
474
+ * 选定视频的数据量大小
475
+ */
476
+ size : number,
477
+ /**
478
+ * 返回选定视频的长
479
+ */
480
+ height : number,
481
+ /**
482
+ * 返回选定视频的宽
483
+ */
484
+ width : number,
485
+ /**
486
+ * 包含扩展名的文件名称(仅H5支持)
487
+ */
488
+ // name: string | null
489
+ };
490
+
491
+ export type ChooseVideoFail = IMediaError;
492
+ export type ChooseVideoSuccessCallback = (callback : ChooseVideoSuccess) => void
493
+ export type ChooseVideoFailCallback = (callback : ChooseVideoFail) => void
494
+ export type ChooseVideoCompleteCallback = ChooseImageCompleteCallback
495
+
496
+ export type ChooseVideoOptions = {
497
+ /**
498
+ * album 从相册选视频,camera 使用相机拍摄,默认为:['album', 'camera']
499
+ */
500
+ sourceType ?: (string[]) | null,
501
+ /**
502
+ * 是否压缩所选的视频源文件,默认值为true,需要压缩
503
+ * @type boolean
504
+ * @default true
505
+ * @uniPlatform {
506
+ * "app": {
507
+ * "harmony": {
508
+ * "osVer": "x",
509
+ * "uniVer": "x",
510
+ * "unixVer": "x"
511
+ * }
512
+ * },
513
+ * "web": {
514
+ * "uniVer": "x",
515
+ * "unixVer": "x"
516
+ * }
517
+ * }
518
+ */
519
+ compressed ?: boolean | null,
520
+ /**
521
+ * 拍摄视频最长拍摄时间,单位秒。最长支持 60 秒
522
+ * @uniPlatform {
523
+ * "app": {
524
+ * "harmony": {
525
+ * "osVer": "x",
526
+ * "uniVer": "x",
527
+ * "unixVer": "x"
528
+ * }
529
+ * },
530
+ * "web": {
531
+ * "uniVer": "x",
532
+ * "unixVer": "x"
533
+ * }
534
+ * }
535
+ */
536
+ maxDuration ?: number | null,
537
+ /**
538
+ * 摄像切换
539
+ * - front: 前置摄像头
540
+ * - back: 后置摄像头
541
+ * @type 'front' | 'back'
542
+ * @uniPlatform {
543
+ * "app": {
544
+ * "harmony": {
545
+ * "osVer": "x",
546
+ * "uniVer": "x",
547
+ * "unixVer": "x"
548
+ * }
549
+ * },
550
+ * "web": {
551
+ * "uniVer": "x",
552
+ * "unixVer": "x"
553
+ * }
554
+ * }
555
+ */
556
+ camera ?: string | null,
557
+ /**
558
+ * 根据文件拓展名过滤,每一项都不能是空字符串。默认不过滤。
559
+ * @uniPlatform {
560
+ * "app": {
561
+ * "android": {
562
+ * "osVer": "5.0",
563
+ * "uniVer": "√",
564
+ * "unixVer": "x"
565
+ * },
566
+ * "harmony": {
567
+ * "osVer": "x",
568
+ * "uniVer": "x",
569
+ * "unixVer": "x"
570
+ * }
571
+ * }
572
+ * }
573
+ */
574
+ extension ?: (string[]) | null,
575
+ /**
576
+ * 接口调用成功,返回视频文件的临时文件路径,详见返回参数说明
577
+ */
578
+ success ?: (ChooseVideoSuccessCallback) | null,
579
+ /**
580
+ * 接口调用失败的回调函数
581
+ */
582
+ fail ?: (ChooseVideoFailCallback) | null,
583
+ /**
584
+ * 接口调用结束的回调函数(调用成功、失败都会执行)
585
+ */
586
+ complete ?: (ChooseVideoCompleteCallback) | null
587
+ };
588
+
589
+ export type ChooseVideo = (options : ChooseVideoOptions) => void;
590
+
591
+ export type GetVideoInfoSuccess = {
592
+ /**
593
+ * 画面方向
594
+ * @uniPlatform {
595
+ * "app": {
596
+ * "harmony": {
597
+ * "osVer": "3.0",
598
+ * "uniVer": "4.23",
599
+ * "unixVer": "x"
600
+ * }
601
+ * },
602
+ * "web": {
603
+ * "uniVer": "x",
604
+ * "unixVer": "x"
605
+ * }
606
+ * }
607
+ */
608
+ orientation ?: MediaOrientation,
609
+ /**
610
+ * 视频格式
611
+ * @uniPlatform {
612
+ * "app": {
613
+ * "harmony": {
614
+ * "osVer": "3.0",
615
+ * "uniVer": "4.23",
616
+ * "unixVer": "x"
617
+ * }
618
+ * },
619
+ * "web": {
620
+ * "uniVer": "x",
621
+ * "unixVer": "x"
622
+ * }
623
+ * }
624
+ */
625
+ type : string | null,
626
+ /**
627
+ * 视频长度
628
+ */
629
+ duration : number,
630
+ /**
631
+ * 视频大小,单位 kB
632
+ */
633
+ size : number,
634
+ /**
635
+ * 视频的长,单位 px
636
+ */
637
+ height : number,
638
+ /**
639
+ * 视频的宽,单位 px
640
+ */
641
+ width : number,
642
+ /**
643
+ * 视频帧率
644
+ * @uniPlatform {
645
+ * "app": {
646
+ * "harmony": {
647
+ * "osVer": "x",
648
+ * "uniVer": "x",
649
+ * "unixVer": "x"
650
+ * }
651
+ * },
652
+ * "web": {
653
+ * "uniVer": "x",
654
+ * "unixVer": "x"
655
+ * }
656
+ * }
657
+ */
658
+ fps : number | null,
659
+ /**
660
+ * 视频码率,单位 kbps
661
+ * @uniPlatform {
662
+ * "app": {
663
+ * "harmony": {
664
+ * "osVer": "x",
665
+ * "uniVer": "x",
666
+ * "unixVer": "x"
667
+ * }
668
+ * },
669
+ * "web": {
670
+ * "uniVer": "x",
671
+ * "unixVer": "x"
672
+ * }
673
+ * }
674
+ */
675
+ bitrate : number | null
676
+ };
677
+
678
+ export type GetVideoInfoFail = IMediaError;
679
+ export type GetVideoInfoSuccessCallback = (callback : GetVideoInfoSuccess) => void
680
+ export type GetVideoInfoFailCallback = (callback : GetVideoInfoFail) => void
681
+ export type GetVideoInfoCompleteCallback = ChooseImageCompleteCallback
682
+
683
+ export type GetVideoInfoOptions = {
684
+ /**
685
+ * 视频文件路径,可以是临时文件路径也可以是永久文件路径
686
+ */
687
+ src : string.VideoURIString,
688
+ /**
689
+ * 接口调用成功的回调函数
690
+ */
691
+ success ?: (GetVideoInfoSuccessCallback) | null,
692
+ /**
693
+ * 接口调用失败的回调函数
694
+ */
695
+ fail ?: (GetVideoInfoFailCallback) | null,
696
+ /**
697
+ * 接口调用结束的回调函数(调用成功、失败都会执行)
698
+ */
699
+ complete ?: (GetVideoInfoCompleteCallback) | null
700
+ };
701
+
702
+ export type GetVideoInfo = (options : GetVideoInfoOptions) => void;
703
+
704
+ export type SaveVideoToPhotosAlbumSuccess = {};
705
+
706
+ export type SaveVideoToPhotosAlbumFail = IMediaError;
707
+ export type SaveVideoToPhotosAlbumSuccessCallback = (callback : SaveVideoToPhotosAlbumSuccess) => void
708
+ export type SaveVideoToPhotosAlbumFailCallback = (callback : SaveVideoToPhotosAlbumFail) => void
709
+ export type SaveVideoToPhotosAlbumCompleteCallback = ChooseImageCompleteCallback
710
+
711
+ export type SaveVideoToPhotosAlbumOptions = {
712
+ /**
713
+ * 视频文件路径,可以是临时文件路径也可以是永久文件路径
714
+ */
715
+ filePath : string.VideoURIString,
716
+ /**
717
+ * 接口调用成功的回调函数
718
+ */
719
+ success ?: (SaveVideoToPhotosAlbumSuccessCallback) | null,
720
+ /**
721
+ * 接口调用失败的回调函数
722
+ */
723
+ fail ?: (SaveVideoToPhotosAlbumFailCallback) | null,
724
+ /**
725
+ * 接口调用结束的回调函数(调用成功、失败都会执行)
726
+ */
727
+ complete ?: (SaveVideoToPhotosAlbumCompleteCallback) | null
728
+ };
729
+
730
+ export type SaveVideoToPhotosAlbum = (options : SaveVideoToPhotosAlbumOptions) => void;
731
+
732
+ export type CompressVideoSuccess = {
733
+ /**
734
+ * 压缩后的临时文件地址
735
+ */
736
+ tempFilePath : string,
737
+ /**
738
+ * 压缩后的大小,单位 kB
739
+ */
740
+ size : number
741
+ };
742
+
743
+ export type CompressVideoFail = IMediaError;
744
+ export type CompressVideoSuccessCallback = (callback : CompressVideoSuccess) => void
745
+ export type CompressVideoFailCallback = (callback : CompressVideoFail) => void
746
+ export type CompressVideoCompleteCallback = ChooseImageCompleteCallback
747
+
748
+ export type CompressVideoOptions = {
749
+ /**
750
+ * 视频文件路径,可以是临时文件路径也可以是永久文件路径
751
+ */
752
+ src : string.VideoURIString,
753
+ /**
754
+ * 压缩质量
755
+ * - low: 低
756
+ * - medium: 中
757
+ * - high: 高
758
+ * @type 'low' | 'medium' | 'high'
759
+ */
760
+ quality ?: string | null,
761
+ /**
762
+ * 码率,单位 kbps
763
+ * @uniPlatform {
764
+ * "app": {
765
+ * "android": {
766
+ * "osVer": "5.0",
767
+ * "uniVer": "√",
768
+ * "unixVer": "x"
769
+ * }
770
+ * }
771
+ * }
772
+ */
773
+ bitrate ?: number | null,
774
+ /**
775
+ * 帧率
776
+ * @uniPlatform {
777
+ * "app": {
778
+ * "android": {
779
+ * "osVer": "5.0",
780
+ * "uniVer": "√",
781
+ * "unixVer": "x"
782
+ * }
783
+ * }
784
+ * }
785
+ */
786
+ fps ?: number | null,
787
+ /**
788
+ * 相对于原视频的分辨率比例,取值范围(0, 1]
789
+ */
790
+ resolution ?: number | null,
791
+ /**
792
+ * 接口调用成功的回调函数
793
+ */
794
+ success ?: (CompressVideoSuccessCallback) | null,
795
+ /**
796
+ * 接口调用失败的回调函数
797
+ */
798
+ fail ?: (CompressVideoFailCallback) | null,
799
+ /**
800
+ * 接口调用结束的回调函数(调用成功、失败都会执行)
801
+ */
802
+ complete ?: (CompressVideoCompleteCallback) | null
803
+ };
804
+
805
+ export type CompressVideo = (options : CompressVideoOptions) => void;
806
+
807
+ export interface Uni {
808
+ /**
809
+ * 从本地相册选择图片或使用相机拍照
810
+ * @description 从本地相册选择图片或使用相机拍照
811
+ * @uniPlatform {
812
+ * "app": {
813
+ * "android": {
814
+ * "osVer": "5.0",
815
+ * "uniVer": "√",
816
+ * "unixVer": "3.9+"
817
+ * },
818
+ * "ios": {
819
+ * "osVer": "12.0",
820
+ * "uniVer": "√",
821
+ * "unixVer": "4.11"
822
+ * },
823
+ * "harmony": {
824
+ * "osVer": "3.0",
825
+ * "uniVer": "4.23",
826
+ * "unixVer": "x"
827
+ * }
828
+ * },
829
+ * "web": {
830
+ * "uniVer": "√",
831
+ * "unixVer": "4.0"
832
+ * },
833
+ * "mp": {
834
+ * "weixin": {
835
+ * "hostVer": "√",
836
+ * "uniVer": "√",
837
+ * "unixVer": "x"
838
+ * },
839
+ * "alipay": {
840
+ * "hostVer": "√",
841
+ * "uniVer": "√",
842
+ * "unixVer": "x"
843
+ * },
844
+ * "baidu": {
845
+ * "hostVer": "√",
846
+ * "uniVer": "√",
847
+ * "unixVer": "x"
848
+ * },
849
+ * "toutiao": {
850
+ * "hostVer": "√",
851
+ * "uniVer": "√",
852
+ * "unixVer": "x"
853
+ * },
854
+ * "lark": {
855
+ * "hostVer": "√",
856
+ * "uniVer": "√",
857
+ * "unixVer": "x"
858
+ * },
859
+ * "qq": {
860
+ * "hostVer": "√",
861
+ * "uniVer": "√",
862
+ * "unixVer": "x"
863
+ * },
864
+ * "kuaishou": {
865
+ * "hostVer": "√",
866
+ * "uniVer": "√",
867
+ * "unixVer": "x"
868
+ * },
869
+ * "jd": {
870
+ * "hostVer": "√",
871
+ * "uniVer": "√",
872
+ * "unixVer": "x"
873
+ * }
874
+ * }
875
+ * }
876
+ * @uniVueVersion 2,3
877
+ * @example
878
+ * ```typescript
879
+ * uni.chooseImage({
880
+ * count:3,
881
+ * success(e){
882
+ * console.log(JSON.stringify(e))
883
+ * }
884
+ * })
885
+ * ```
886
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/media/image.html#chooseimage
887
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/choose-image.html
888
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/choose-image.html
889
+ * @autotest {
890
+ generated:false
891
+ }
892
+ */
893
+ chooseImage(options : ChooseImageOptions) : void;
894
+ /**
895
+ * 预览图片
896
+ * @description 预览图片
897
+ * @uniPlatform {
898
+ * "app": {
899
+ * "android": {
900
+ * "osVer": "5.0",
901
+ * "uniVer": "√",
902
+ * "unixVer": "3.9+"
903
+ * },
904
+ * "ios": {
905
+ * "osVer": "12.0",
906
+ * "uniVer": "√",
907
+ * "unixVer": "4.11"
908
+ * },
909
+ * "harmony": {
910
+ * "osVer": "3.0",
911
+ * "uniVer": "4.23",
912
+ * "unixVer": "x"
913
+ * }
914
+ * },
915
+ * "web": {
916
+ * "uniVer": "√",
917
+ * "unixVer": "4.0"
918
+ * },
919
+ * "mp": {
920
+ * "weixin": {
921
+ * "hostVer": "√",
922
+ * "uniVer": "√",
923
+ * "unixVer": "x"
924
+ * },
925
+ * "alipay": {
926
+ * "hostVer": "√",
927
+ * "uniVer": "√",
928
+ * "unixVer": "x"
929
+ * },
930
+ * "baidu": {
931
+ * "hostVer": "√",
932
+ * "uniVer": "√",
933
+ * "unixVer": "x"
934
+ * },
935
+ * "toutiao": {
936
+ * "hostVer": "√",
937
+ * "uniVer": "√",
938
+ * "unixVer": "x"
939
+ * },
940
+ * "lark": {
941
+ * "hostVer": "√",
942
+ * "uniVer": "√",
943
+ * "unixVer": "x"
944
+ * },
945
+ * "qq": {
946
+ * "hostVer": "√",
947
+ * "uniVer": "√",
948
+ * "unixVer": "x"
949
+ * },
950
+ * "kuaishou": {
951
+ * "hostVer": "√",
952
+ * "uniVer": "√",
953
+ * "unixVer": "x"
954
+ * },
955
+ * "jd": {
956
+ * "hostVer": "x",
957
+ * "uniVer": "x",
958
+ * "unixVer": "x"
959
+ * }
960
+ * }
961
+ * }
962
+ * @uniVueVersion 2,3
963
+ * @example
964
+ * ```typescript
965
+ * uni.previewImage({
966
+ * urls:['/static/a.jpg','/static/b.jpg'],
967
+ * success(e){
968
+ * console.log(JSON.stringify(e))
969
+ * }
970
+ * })
971
+ * ```
972
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/media/image.html#unipreviewimageobject
973
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/preview-image.html
974
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/preview-image.html
975
+ * @autotest {
976
+ generated:false
977
+ }
978
+ */
979
+ previewImage(options : PreviewImageOptions) : void;
980
+ /**
981
+ * 关闭图片预览
982
+ * @description 关闭图片预览
983
+ * @uniPlatform {
984
+ * "app": {
985
+ * "android": {
986
+ * "osVer": "5.0",
987
+ * "uniVer": "√",
988
+ * "unixVer": "3.9+"
989
+ * },
990
+ * "ios": {
991
+ * "osVer": "12.0",
992
+ * "uniVer": "√",
993
+ * "unixVer": "4.11"
994
+ * },
995
+ * "harmony": {
996
+ * "osVer": "3.0",
997
+ * "uniVer": "4.23",
998
+ * "unixVer": "x"
999
+ * }
1000
+ * },
1001
+ * "web": {
1002
+ * "uniVer": "√",
1003
+ * "unixVer": "4.0"
1004
+ * }
1005
+ * }
1006
+ * @uniVueVersion 2,3
1007
+ * @example
1008
+ * ```typescript
1009
+ * uni.closePreviewImage({
1010
+ * success(e){
1011
+ * console.log(JSON.stringify(e))
1012
+ * }
1013
+ * })
1014
+ * ```
1015
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/media/image.html#closepreviewimage
1016
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/preview-image.html#closepreviewimage
1017
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/preview-image.html#closepreviewimage
1018
+ * @autotest {
1019
+ generated:false
1020
+ }
1021
+ */
1022
+ closePreviewImage(options : ClosePreviewImageOptions) : void;
1023
+ /**
1024
+ * 获取图片信息
1025
+ * @description 获取图片信息
1026
+ * @uniPlatform {
1027
+ * "app": {
1028
+ * "android": {
1029
+ * "osVer": "5.0",
1030
+ * "uniVer": "√",
1031
+ * "unixVer": "4.18"
1032
+ * },
1033
+ * "ios": {
1034
+ * "osVer": "12.0",
1035
+ * "uniVer": "√",
1036
+ * "unixVer": "4.25"
1037
+ * },
1038
+ * "harmony": {
1039
+ * "osVer": "3.0",
1040
+ * "uniVer": "4.23",
1041
+ * "unixVer": "x"
1042
+ * }
1043
+ * },
1044
+ * "web": {
1045
+ * "uniVer": "√",
1046
+ * "unixVer": "4.0"
1047
+ * }
1048
+ * }
1049
+ * @uniVueVersion 2,3
1050
+ * @example
1051
+ * ```typescript
1052
+ * uni.getImageInfo({
1053
+ * src:'/static/a.jpg',
1054
+ * success(e){
1055
+ * console.log(JSON.stringify(e))
1056
+ * },
1057
+ * })
1058
+ * ```
1059
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/media/image.html#getimageinfo
1060
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/get-image-info.html
1061
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/get-image-info.html
1062
+ * @autotest {
1063
+ generated:false,
1064
+ case:[
1065
+ {
1066
+ input:[{"src":"/static/a.jpg"}]
1067
+ }
1068
+ ]
1069
+ }
1070
+ */
1071
+ getImageInfo(options : GetImageInfoOptions) : void;
1072
+ /**
1073
+ * 保存图片到系统相册
1074
+ * @description 保存图片到系统相册
1075
+ * @uniPlatform {
1076
+ * "app": {
1077
+ * "android": {
1078
+ * "osVer": "5.0",
1079
+ * "uniVer": "√",
1080
+ * "unixVer": "3.9+"
1081
+ * },
1082
+ * "ios": {
1083
+ * "osVer": "12.0",
1084
+ * "uniVer": "√",
1085
+ * "unixVer": "4.11"
1086
+ * },
1087
+ * "harmony": {
1088
+ * "osVer": "3.0",
1089
+ * "uniVer": "4.23",
1090
+ * "unixVer": "x"
1091
+ * }
1092
+ * },
1093
+ * "web": {
1094
+ * "uniVer": "x",
1095
+ * "unixVer": "x"
1096
+ * }
1097
+ * }
1098
+ * @uniVueVersion 2,3
1099
+ * @example
1100
+ * ```typescript
1101
+ * uni.saveImageToPhotosAlbum({
1102
+ * filePath:'/static/a.jpg',
1103
+ * success(e){
1104
+ * console.log(JSON.stringify(e))
1105
+ * },
1106
+ * })
1107
+ * ```
1108
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/media/image.html#saveimagetophotosalbum
1109
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/save-image-to-photos-album.html
1110
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/save-image-to-photos-album.html
1111
+ * @autotest {
1112
+ generated:false,
1113
+ case:[
1114
+ {
1115
+ input:[{"filePath":"/static/a.jpg"}]
1116
+ }
1117
+ ]
1118
+ }
1119
+ */
1120
+ saveImageToPhotosAlbum(options : SaveImageToPhotosAlbumOptions) : void;
1121
+ /**
1122
+ * 压缩图片
1123
+ * @description 压缩图片
1124
+ * @uniPlatform {
1125
+ * "app": {
1126
+ * "android": {
1127
+ * "osVer": "5.0",
1128
+ * "uniVer": "√",
1129
+ * "unixVer": "4.18"
1130
+ * },
1131
+ * "ios": {
1132
+ * "osVer": "12.0",
1133
+ * "uniVer": "√",
1134
+ * "unixVer": "4.25"
1135
+ * },
1136
+ * "harmony": {
1137
+ * "osVer": "x",
1138
+ * "uniVer": "x",
1139
+ * "unixVer": "x"
1140
+ * }
1141
+ * },
1142
+ * "web": {
1143
+ * "uniVer": "x",
1144
+ * "unixVer": "x"
1145
+ * }
1146
+ * }
1147
+ * @uniVueVersion 2,3
1148
+ * @example
1149
+ * ```typescript
1150
+ * uni.compressImage({
1151
+ * src:'/static/a.jpg',
1152
+ * quality:80,
1153
+ * success(e){
1154
+ * console.log(JSON.stringify(e))
1155
+ * },
1156
+ * })
1157
+ * ```
1158
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/media/image.html#compressimage
1159
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/compress-image.html
1160
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/compress-image.html
1161
+ * @autotest {
1162
+ generated:false,
1163
+ case:[
1164
+ {
1165
+ input:[{"src":"/static/d.jpg"},{"rotate","30"}]
1166
+ }
1167
+ ]
1168
+ }
1169
+ */
1170
+ compressImage(options : CompressImageOptions) : void;
1171
+ /**
1172
+ * 拍摄视频或从手机相册中选视频,返回视频的临时文件路径。
1173
+ * @description 拍摄视频或从手机相册中选视频,返回视频的临时文件路径。
1174
+ * @uniPlatform {
1175
+ * "app": {
1176
+ * "android": {
1177
+ * "osVer": "5.0",
1178
+ * "uniVer": "√",
1179
+ * "unixVer": "4.18"
1180
+ * },
1181
+ * "ios": {
1182
+ * "osVer": "12.0",
1183
+ * "uniVer": "√",
1184
+ * "unixVer": "4.18"
1185
+ * },
1186
+ * "harmony": {
1187
+ * "osVer": "3.0",
1188
+ * "uniVer": "4.23",
1189
+ * "unixVer": "x"
1190
+ * }
1191
+ * },
1192
+ * "web": {
1193
+ * "uniVer": "√",
1194
+ * "unixVer": "4.0"
1195
+ * }
1196
+ * }
1197
+ * @uniVueVersion 2,3
1198
+ * @example
1199
+ * ```typescript
1200
+ * uni.chooseVideo({
1201
+ * success(e){
1202
+ * console.log(JSON.stringify(e))
1203
+ * },
1204
+ * })
1205
+ * ```
1206
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/media/video.html
1207
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/choose-video.html
1208
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/choose-video.html
1209
+ *
1210
+ */
1211
+ chooseVideo(options : ChooseVideoOptions) : void;
1212
+ /**
1213
+ * 获取视频详细信息
1214
+ * @description 获取视频详细信息
1215
+ * @uniPlatform {
1216
+ * "app": {
1217
+ * "android": {
1218
+ * "osVer": "5.0",
1219
+ * "uniVer": "√",
1220
+ * "unixVer": "4.18"
1221
+ * },
1222
+ * "ios": {
1223
+ * "osVer": "12.0",
1224
+ * "uniVer": "√",
1225
+ * "unixVer": "4.25"
1226
+ * },
1227
+ * "harmony": {
1228
+ * "osVer": "3.0",
1229
+ * "uniVer": "4.23",
1230
+ * "unixVer": "x"
1231
+ * }
1232
+ * },
1233
+ * "web": {
1234
+ * "uniVer": "√",
1235
+ * "unixVer": "4.0"
1236
+ * }
1237
+ * }
1238
+ * @uniVueVersion 2,3
1239
+ * @example
1240
+ * ```typescript
1241
+ * uni.GetVideoInfo({
1242
+ * src:"/static/a.mp4",
1243
+ * success(e){
1244
+ * console.log(JSON.stringify(e))
1245
+ * },
1246
+ * })
1247
+ * ```
1248
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/media/video.html#getvideoinfo
1249
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/get-video-info.html
1250
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/get-video-info.html
1251
+ *
1252
+ */
1253
+ getVideoInfo(options : GetVideoInfoOptions) : void;
1254
+ /**
1255
+ * 保存视频到系统相册
1256
+ * @description 保存视频到系统相册
1257
+ * @uniPlatform {
1258
+ * "app": {
1259
+ * "android": {
1260
+ * "osVer": "5.0",
1261
+ * "uniVer": "√",
1262
+ * "unixVer": "4.18"
1263
+ * },
1264
+ * "ios": {
1265
+ * "osVer": "12.0",
1266
+ * "uniVer": "√",
1267
+ * "unixVer": "4.18"
1268
+ * },
1269
+ * "harmony": {
1270
+ * "osVer": "3.0",
1271
+ * "uniVer": "4.23",
1272
+ * "unixVer": "x"
1273
+ * }
1274
+ * },
1275
+ * "web": {
1276
+ * "uniVer": "x",
1277
+ * "unixVer": "x"
1278
+ * }
1279
+ * }
1280
+ * @uniVueVersion 2,3
1281
+ * @example
1282
+ * ```typescript
1283
+ * uni.saveVideoToPhotosAlbum({
1284
+ * filePath:"/static/a.mp4",
1285
+ * success(e){
1286
+ * console.log(JSON.stringify(e))
1287
+ * },
1288
+ * })
1289
+ * ```
1290
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/media/video.html#savevideotophotosalbum
1291
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/save-video-to-photos-album.html
1292
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/save-video-to-photos-album.html
1293
+ *
1294
+ */
1295
+ saveVideoToPhotosAlbum(options : SaveVideoToPhotosAlbumOptions) : void;
1296
+ /**
1297
+ * 压缩视频
1298
+ * @description 压缩视频
1299
+ * @uniPlatform {
1300
+ * "app": {
1301
+ * "android": {
1302
+ * "osVer": "5.0",
1303
+ * "uniVer": "3,1.10",
1304
+ * "unixVer": "4.18"
1305
+ * },
1306
+ * "ios": {
1307
+ * "osVer": "12.0",
1308
+ * "uniVer": "√",
1309
+ * "unixVer": "4.25"
1310
+ * },
1311
+ * "harmony": {
1312
+ * "osVer": "x",
1313
+ * "uniVer": "x",
1314
+ * "unixVer": "x"
1315
+ * }
1316
+ * },
1317
+ * "web": {
1318
+ * "uniVer": "x",
1319
+ * "unixVer": "x"
1320
+ * }
1321
+ * }
1322
+ * @uniVueVersion 2,3
1323
+ * @example
1324
+ * ```typescript
1325
+ * uni.compressVideo({
1326
+ * src:"/static/a.mp4",
1327
+ * quality:"low",
1328
+ * success(e){
1329
+ * console.log(JSON.stringify(e))
1330
+ * },
1331
+ * })
1332
+ * ```
1333
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/media/video.html#compressvideo
1334
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/compress-video.html
1335
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/compress-video.html
1336
+ *
1337
+ */
1338
+ compressVideo(options : CompressVideoOptions) : void;
1339
+ }