@tarojs/taro-h5 3.4.2 → 3.4.5

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 (144) hide show
  1. package/dist/api/location/chooseLocation.js +16 -7
  2. package/dist/api/media/image/chooseImage.js +12 -1
  3. package/dist/api/media/image/getImageInfo.js +16 -1
  4. package/dist/api/network/request/index.js +4 -0
  5. package/dist/dist/api/ad/index.d.ts +6 -0
  6. package/dist/dist/api/ai/facial.d.ts +9 -0
  7. package/dist/dist/api/ai/index.d.ts +2 -0
  8. package/dist/dist/api/ai/visual.d.ts +6 -0
  9. package/dist/dist/api/alipay/index.d.ts +3 -0
  10. package/dist/dist/api/base/crypto.d.ts +3 -0
  11. package/dist/dist/api/base/debug.d.ts +9 -0
  12. package/dist/dist/api/base/index.d.ts +12 -0
  13. package/dist/dist/api/base/performance.d.ts +6 -0
  14. package/dist/dist/api/base/system.d.ts +25 -0
  15. package/dist/dist/api/base/update.d.ts +6 -0
  16. package/dist/dist/api/base/weapp/app-event.d.ts +48 -0
  17. package/dist/dist/api/base/weapp/life-cycle.d.ts +6 -0
  18. package/dist/dist/api/canvas/CanvasContext.d.ts +104 -0
  19. package/dist/dist/api/canvas/canvasGetImageData.d.ts +5 -0
  20. package/dist/dist/api/canvas/canvasPutImageData.d.ts +6 -0
  21. package/dist/dist/api/canvas/canvasToTempFilePath.d.ts +6 -0
  22. package/dist/dist/api/canvas/createCanvasContext.d.ts +5 -0
  23. package/dist/dist/api/canvas/index.d.ts +12 -0
  24. package/dist/dist/api/cloud/index.d.ts +31 -0
  25. package/dist/dist/api/data-analysis/index.d.ts +12 -0
  26. package/dist/dist/api/device/accelerometer.d.ts +17 -0
  27. package/dist/dist/api/device/accessibility.d.ts +3 -0
  28. package/dist/dist/api/device/battery.d.ts +5 -0
  29. package/dist/dist/api/device/bluetooth-ble.d.ts +48 -0
  30. package/dist/dist/api/device/bluetooth-peripheral.d.ts +9 -0
  31. package/dist/dist/api/device/bluetooth.d.ts +39 -0
  32. package/dist/dist/api/device/calendar.d.ts +6 -0
  33. package/dist/dist/api/device/clipboard.d.ts +15 -0
  34. package/dist/dist/api/device/compass.d.ts +17 -0
  35. package/dist/dist/api/device/contact.d.ts +6 -0
  36. package/dist/dist/api/device/crypto.d.ts +3 -0
  37. package/dist/dist/api/device/gyroscope.d.ts +12 -0
  38. package/dist/dist/api/device/iBeacon.d.ts +21 -0
  39. package/dist/dist/api/device/index.d.ts +23 -0
  40. package/dist/dist/api/device/keyboard.d.ts +12 -0
  41. package/dist/dist/api/device/memory.d.ts +6 -0
  42. package/dist/dist/api/device/motion.d.ts +17 -0
  43. package/dist/dist/api/device/network.d.ts +20 -0
  44. package/dist/dist/api/device/nfc.d.ts +21 -0
  45. package/dist/dist/api/device/phone.d.ts +2 -0
  46. package/dist/dist/api/device/scan.d.ts +1 -0
  47. package/dist/dist/api/device/screen.d.ts +18 -0
  48. package/dist/dist/api/device/vibrate.d.ts +9 -0
  49. package/dist/dist/api/device/wifi.d.ts +33 -0
  50. package/dist/dist/api/ext/index.d.ts +6 -0
  51. package/dist/dist/api/files/index.d.ts +24 -0
  52. package/dist/dist/api/framework/index.d.ts +4 -0
  53. package/dist/dist/api/index.d.ts +24 -0
  54. package/dist/dist/api/location/chooseLocation.d.ts +6 -0
  55. package/dist/dist/api/location/index.d.ts +27 -0
  56. package/dist/dist/api/media/EditorContext.d.ts +42 -0
  57. package/dist/dist/api/media/audio/InnerAudioContext.d.ts +58 -0
  58. package/dist/dist/api/media/audio/index.d.ts +29 -0
  59. package/dist/dist/api/media/background-audio/BackgroundAudioManager.d.ts +71 -0
  60. package/dist/dist/api/media/background-audio/index.d.ts +29 -0
  61. package/dist/dist/api/media/camera.d.ts +3 -0
  62. package/dist/dist/api/media/image/chooseImage.d.ts +5 -0
  63. package/dist/dist/api/media/image/getImageInfo.d.ts +5 -0
  64. package/dist/dist/api/media/image/index.d.ts +15 -0
  65. package/dist/dist/api/media/image/previewImage.d.ts +8 -0
  66. package/dist/dist/api/media/index.d.ts +12 -0
  67. package/dist/dist/api/media/live.d.ts +6 -0
  68. package/dist/dist/api/media/map.d.ts +3 -0
  69. package/dist/dist/api/media/media-recorder.d.ts +3 -0
  70. package/dist/dist/api/media/recorder.d.ts +9 -0
  71. package/dist/dist/api/media/video/index.d.ts +24 -0
  72. package/dist/dist/api/media/video-decoder.d.ts +3 -0
  73. package/dist/dist/api/media/video-processing.d.ts +3 -0
  74. package/dist/dist/api/media/voip.d.ts +42 -0
  75. package/dist/dist/api/navigate/index.d.ts +12 -0
  76. package/dist/dist/api/network/download.d.ts +6 -0
  77. package/dist/dist/api/network/index.d.ts +7 -0
  78. package/dist/dist/api/network/mdns.d.ts +30 -0
  79. package/dist/dist/api/network/request/index.d.ts +4 -0
  80. package/dist/dist/api/network/tcp.d.ts +3 -0
  81. package/dist/dist/api/network/udp.d.ts +3 -0
  82. package/dist/dist/api/network/upload.d.ts +5 -0
  83. package/dist/dist/api/network/utils.d.ts +44 -0
  84. package/dist/dist/api/network/websocket/index.d.ts +7 -0
  85. package/dist/dist/api/network/websocket/socketTask.d.ts +25 -0
  86. package/dist/dist/api/open-api/account.d.ts +3 -0
  87. package/dist/dist/api/open-api/address.d.ts +3 -0
  88. package/dist/dist/api/open-api/authorize.d.ts +6 -0
  89. package/dist/dist/api/open-api/card.d.ts +6 -0
  90. package/dist/dist/api/open-api/channels-live.d.ts +18 -0
  91. package/dist/dist/api/open-api/customer-service.d.ts +3 -0
  92. package/dist/dist/api/open-api/facial.d.ts +12 -0
  93. package/dist/dist/api/open-api/favorites.d.ts +6 -0
  94. package/dist/dist/api/open-api/group.d.ts +3 -0
  95. package/dist/dist/api/open-api/index.d.ts +18 -0
  96. package/dist/dist/api/open-api/invoice.d.ts +6 -0
  97. package/dist/dist/api/open-api/license-plate.d.ts +3 -0
  98. package/dist/dist/api/open-api/login.d.ts +9 -0
  99. package/dist/dist/api/open-api/red-package.d.ts +3 -0
  100. package/dist/dist/api/open-api/settings.d.ts +6 -0
  101. package/dist/dist/api/open-api/soter.d.ts +9 -0
  102. package/dist/dist/api/open-api/subscribe-message.d.ts +3 -0
  103. package/dist/dist/api/open-api/user-info.d.ts +6 -0
  104. package/dist/dist/api/open-api/werun.d.ts +6 -0
  105. package/dist/dist/api/payment/index.d.ts +6 -0
  106. package/dist/dist/api/route/index.d.ts +1 -0
  107. package/dist/dist/api/share/index.d.ts +30 -0
  108. package/dist/dist/api/storage/background-fetch.d.ts +12 -0
  109. package/dist/dist/api/storage/index.d.ts +18 -0
  110. package/dist/dist/api/swan/index.d.ts +63 -0
  111. package/dist/dist/api/taro.d.ts +12 -0
  112. package/dist/dist/api/ui/animation/index.d.ts +2 -0
  113. package/dist/dist/api/ui/background.d.ts +6 -0
  114. package/dist/dist/api/ui/custom-component.d.ts +1 -0
  115. package/dist/dist/api/ui/fonts.d.ts +2 -0
  116. package/dist/dist/api/ui/index.d.ts +12 -0
  117. package/dist/dist/api/ui/interaction/actionSheet.d.ts +61 -0
  118. package/dist/dist/api/ui/interaction/index.d.ts +14 -0
  119. package/dist/dist/api/ui/interaction/modal.d.ts +69 -0
  120. package/dist/dist/api/ui/interaction/toast.d.ts +85 -0
  121. package/dist/dist/api/ui/menu.d.ts +3 -0
  122. package/dist/dist/api/ui/navigation-bar/index.d.ts +15 -0
  123. package/dist/dist/api/ui/pull-down-refresh.d.ts +9 -0
  124. package/dist/dist/api/ui/scroll/index.d.ts +5 -0
  125. package/dist/dist/api/ui/sticky.d.ts +3 -0
  126. package/dist/dist/api/ui/tab-bar.d.ts +34 -0
  127. package/dist/dist/api/ui/window.d.ts +15 -0
  128. package/dist/dist/api/utils/handler.d.ts +48 -0
  129. package/dist/dist/api/utils/index.d.ts +38 -0
  130. package/dist/dist/api/worker/index.d.ts +3 -0
  131. package/dist/dist/api/wxml/index.d.ts +5 -0
  132. package/dist/dist/api/wxml/nodesRef.d.ts +13 -0
  133. package/dist/dist/api/wxml/selectorQuery.d.ts +24 -0
  134. package/dist/dist/index.d.ts +4 -0
  135. package/dist/dist/types/type.d.ts +29 -0
  136. package/dist/index.cjs.js +4599 -8469
  137. package/dist/index.cjs.js.map +1 -0
  138. package/dist/taroApis.js +1 -0
  139. package/dist/taroApis.js.map +1 -0
  140. package/package.json +11 -8
  141. package/src/api/location/chooseLocation.ts +14 -4
  142. package/src/api/media/image/chooseImage.ts +18 -1
  143. package/src/api/media/image/getImageInfo.ts +16 -1
  144. package/src/api/network/request/index.ts +4 -0
@@ -0,0 +1,17 @@
1
+ import Taro from '@tarojs/api';
2
+ /**
3
+ * 停止监听罗盘数据
4
+ */
5
+ export declare const stopCompass: typeof Taro.stopCompass;
6
+ /**
7
+ * 开始监听罗盘数据
8
+ */
9
+ export declare const startCompass: typeof Taro.startCompass;
10
+ /**
11
+ * 监听罗盘数据变化事件。频率:5 次/秒,接口调用后会自动开始监听,可使用 wx.stopCompass 停止监听。
12
+ */
13
+ export declare const onCompassChange: typeof Taro.onCompassChange;
14
+ /**
15
+ * 取消监听罗盘数据变化事件,参数为空,则取消所有的事件监听。
16
+ */
17
+ export declare const offCompassChange: typeof Taro.offCompassChange;
@@ -0,0 +1,6 @@
1
+ export declare const chooseContact: () => Promise<{
2
+ errMsg: string;
3
+ }>;
4
+ export declare const addPhoneContact: () => Promise<{
5
+ errMsg: string;
6
+ }>;
@@ -0,0 +1,3 @@
1
+ export declare const getRandomValues: () => Promise<{
2
+ errMsg: string;
3
+ }>;
@@ -0,0 +1,12 @@
1
+ export declare const stopGyroscope: () => Promise<{
2
+ errMsg: string;
3
+ }>;
4
+ export declare const startGyroscope: () => Promise<{
5
+ errMsg: string;
6
+ }>;
7
+ export declare const onGyroscopeChange: () => Promise<{
8
+ errMsg: string;
9
+ }>;
10
+ export declare const offGyroscopeChange: () => Promise<{
11
+ errMsg: string;
12
+ }>;
@@ -0,0 +1,21 @@
1
+ export declare const stopBeaconDiscovery: () => Promise<{
2
+ errMsg: string;
3
+ }>;
4
+ export declare const startBeaconDiscovery: () => Promise<{
5
+ errMsg: string;
6
+ }>;
7
+ export declare const onBeaconUpdate: () => Promise<{
8
+ errMsg: string;
9
+ }>;
10
+ export declare const onBeaconServiceChange: () => Promise<{
11
+ errMsg: string;
12
+ }>;
13
+ export declare const offBeaconUpdate: () => Promise<{
14
+ errMsg: string;
15
+ }>;
16
+ export declare const offBeaconServiceChange: () => Promise<{
17
+ errMsg: string;
18
+ }>;
19
+ export declare const getBeacons: () => Promise<{
20
+ errMsg: string;
21
+ }>;
@@ -0,0 +1,23 @@
1
+ export * from './accelerometer';
2
+ export * from './accessibility';
3
+ export * from './battery';
4
+ export * from './bluetooth';
5
+ export * from './bluetooth-ble';
6
+ export * from './bluetooth-peripheral';
7
+ export * from './calendar';
8
+ export * from './clipboard';
9
+ export * from './compass';
10
+ export * from './contact';
11
+ export * from './crypto';
12
+ export * from './gyroscope';
13
+ export * from './iBeacon';
14
+ export * from './keyboard';
15
+ export * from './memory';
16
+ export * from './motion';
17
+ export * from './network';
18
+ export * from './nfc';
19
+ export * from './phone';
20
+ export * from './scan';
21
+ export * from './screen';
22
+ export * from './vibrate';
23
+ export * from './wifi';
@@ -0,0 +1,12 @@
1
+ export declare const onKeyboardHeightChange: () => Promise<{
2
+ errMsg: string;
3
+ }>;
4
+ export declare const offKeyboardHeightChange: () => Promise<{
5
+ errMsg: string;
6
+ }>;
7
+ export declare const hideKeyboard: () => Promise<{
8
+ errMsg: string;
9
+ }>;
10
+ export declare const getSelectedTextRange: () => Promise<{
11
+ errMsg: string;
12
+ }>;
@@ -0,0 +1,6 @@
1
+ export declare const onMemoryWarning: () => Promise<{
2
+ errMsg: string;
3
+ }>;
4
+ export declare const offMemoryWarning: () => Promise<{
5
+ errMsg: string;
6
+ }>;
@@ -0,0 +1,17 @@
1
+ import Taro from '@tarojs/api';
2
+ /**
3
+ * 停止监听设备方向的变化。
4
+ */
5
+ export declare const stopDeviceMotionListening: typeof Taro.stopDeviceMotionListening;
6
+ /**
7
+ * 开始监听设备方向的变化。
8
+ */
9
+ export declare const startDeviceMotionListening: typeof Taro.startDeviceMotionListening;
10
+ /**
11
+ * 监听设备方向变化事件。
12
+ */
13
+ export declare const onDeviceMotionChange: typeof Taro.onDeviceMotionChange;
14
+ /**
15
+ * 取消监听设备方向变化事件,参数为空,则取消所有的事件监听。
16
+ */
17
+ export declare const offDeviceMotionChange: typeof Taro.offDeviceMotionChange;
@@ -0,0 +1,20 @@
1
+ import Taro from '@tarojs/api';
2
+ export declare const getNetworkType: typeof Taro.getNetworkType;
3
+ /**
4
+ * 在最近的八次网络请求中, 出现下列三个现象之一则判定弱网。
5
+ * - 出现三次以上连接超时
6
+ * - 出现三次 rtt 超过 400
7
+ * - 出现三次以上的丢包
8
+ * > 弱网事件通知规则是: 弱网状态变化时立即通知, 状态不变时 30s 内最多通知一次。
9
+ */
10
+ export declare const onNetworkWeakChange: () => Promise<{
11
+ errMsg: string;
12
+ }>;
13
+ export declare const onNetworkStatusChange: typeof Taro.onNetworkStatusChange;
14
+ export declare const offNetworkWeakChange: () => Promise<{
15
+ errMsg: string;
16
+ }>;
17
+ export declare const offNetworkStatusChange: typeof Taro.offNetworkStatusChange;
18
+ export declare const getLocalIPAddress: () => Promise<{
19
+ errMsg: string;
20
+ }>;
@@ -0,0 +1,21 @@
1
+ export declare const stopHCE: () => Promise<{
2
+ errMsg: string;
3
+ }>;
4
+ export declare const startHCE: () => Promise<{
5
+ errMsg: string;
6
+ }>;
7
+ export declare const sendHCEMessage: () => Promise<{
8
+ errMsg: string;
9
+ }>;
10
+ export declare const onHCEMessage: () => Promise<{
11
+ errMsg: string;
12
+ }>;
13
+ export declare const offHCEMessage: () => Promise<{
14
+ errMsg: string;
15
+ }>;
16
+ export declare const getNFCAdapter: () => Promise<{
17
+ errMsg: string;
18
+ }>;
19
+ export declare const getHCEState: () => Promise<{
20
+ errMsg: string;
21
+ }>;
@@ -0,0 +1,2 @@
1
+ import Taro from '@tarojs/api';
2
+ export declare const makePhoneCall: typeof Taro.makePhoneCall;
@@ -0,0 +1 @@
1
+ export declare const scanCode: (options: any) => Promise<unknown>;
@@ -0,0 +1,18 @@
1
+ export declare const setVisualEffectOnCapture: () => Promise<{
2
+ errMsg: string;
3
+ }>;
4
+ export declare const setScreenBrightness: () => Promise<{
5
+ errMsg: string;
6
+ }>;
7
+ export declare const setKeepScreenOn: () => Promise<{
8
+ errMsg: string;
9
+ }>;
10
+ export declare const onUserCaptureScreen: () => Promise<{
11
+ errMsg: string;
12
+ }>;
13
+ export declare const offUserCaptureScreen: () => Promise<{
14
+ errMsg: string;
15
+ }>;
16
+ export declare const getScreenBrightness: () => Promise<{
17
+ errMsg: string;
18
+ }>;
@@ -0,0 +1,9 @@
1
+ import Taro from '@tarojs/api';
2
+ /**
3
+ * 使手机发生较短时间的振动(15 ms)。仅在 iPhone 7 / 7 Plus 以上及 Android 机型生效
4
+ */
5
+ export declare const vibrateShort: typeof Taro.vibrateShort;
6
+ /**
7
+ * 使手机发生较长时间的振动(400 ms)
8
+ */
9
+ export declare const vibrateLong: typeof Taro.vibrateLong;
@@ -0,0 +1,33 @@
1
+ export declare const stopWifi: () => Promise<{
2
+ errMsg: string;
3
+ }>;
4
+ export declare const startWifi: () => Promise<{
5
+ errMsg: string;
6
+ }>;
7
+ export declare const setWifiList: () => Promise<{
8
+ errMsg: string;
9
+ }>;
10
+ export declare const onWifiConnectedWithPartialInfo: () => Promise<{
11
+ errMsg: string;
12
+ }>;
13
+ export declare const onWifiConnected: () => Promise<{
14
+ errMsg: string;
15
+ }>;
16
+ export declare const onGetWifiList: () => Promise<{
17
+ errMsg: string;
18
+ }>;
19
+ export declare const offWifiConnected: () => Promise<{
20
+ errMsg: string;
21
+ }>;
22
+ export declare const offGetWifiList: () => Promise<{
23
+ errMsg: string;
24
+ }>;
25
+ export declare const getWifiList: () => Promise<{
26
+ errMsg: string;
27
+ }>;
28
+ export declare const getConnectedWifi: () => Promise<{
29
+ errMsg: string;
30
+ }>;
31
+ export declare const connectWifi: () => Promise<{
32
+ errMsg: string;
33
+ }>;
@@ -0,0 +1,6 @@
1
+ export declare const getExtConfigSync: () => Promise<{
2
+ errMsg: string;
3
+ }>;
4
+ export declare const getExtConfig: () => Promise<{
5
+ errMsg: string;
6
+ }>;
@@ -0,0 +1,24 @@
1
+ export declare const saveFileToDisk: () => Promise<{
2
+ errMsg: string;
3
+ }>;
4
+ export declare const saveFile: () => Promise<{
5
+ errMsg: string;
6
+ }>;
7
+ export declare const removeSavedFile: () => Promise<{
8
+ errMsg: string;
9
+ }>;
10
+ export declare const openDocument: () => Promise<{
11
+ errMsg: string;
12
+ }>;
13
+ export declare const getSavedFileList: () => Promise<{
14
+ errMsg: string;
15
+ }>;
16
+ export declare const getSavedFileInfo: () => Promise<{
17
+ errMsg: string;
18
+ }>;
19
+ export declare const getFileSystemManager: () => Promise<{
20
+ errMsg: string;
21
+ }>;
22
+ export declare const getFileInfo: () => Promise<{
23
+ errMsg: string;
24
+ }>;
@@ -0,0 +1,4 @@
1
+ import Taro from '@tarojs/api';
2
+ export declare const getApp: typeof Taro.getApp;
3
+ export { getCurrentPages } from '@tarojs/router';
4
+ export declare const getCurrentInstance: () => Taro.Current;
@@ -0,0 +1,24 @@
1
+ export * from './ad';
2
+ export * from './ai';
3
+ export * from './base';
4
+ export * from './canvas';
5
+ export * from './cloud';
6
+ export * from './data-analysis';
7
+ export * from './device';
8
+ export * from './ext';
9
+ export * from './files';
10
+ export * from './framework';
11
+ export * from './location';
12
+ export * from './media';
13
+ export * from './navigate';
14
+ export * from './network';
15
+ export * from './open-api';
16
+ export * from './payment';
17
+ export * from './route';
18
+ export * from './share';
19
+ export * from './storage';
20
+ export * from './ui';
21
+ export * from './worker';
22
+ export * from './wxml';
23
+ export * from './alipay';
24
+ export * from './swan';
@@ -0,0 +1,6 @@
1
+ import Taro from '@tarojs/api';
2
+ import './style.css';
3
+ /**
4
+ * 打开地图选择位置。
5
+ */
6
+ export declare const chooseLocation: typeof Taro.chooseLocation;
@@ -0,0 +1,27 @@
1
+ export declare const stopLocationUpdate: () => Promise<{
2
+ errMsg: string;
3
+ }>;
4
+ export declare const startLocationUpdateBackground: () => Promise<{
5
+ errMsg: string;
6
+ }>;
7
+ export declare const startLocationUpdate: () => Promise<{
8
+ errMsg: string;
9
+ }>;
10
+ export declare const openLocation: (options: any) => Promise<unknown>;
11
+ export declare const onLocationChangeError: () => Promise<{
12
+ errMsg: string;
13
+ }>;
14
+ export declare const onLocationChange: () => Promise<{
15
+ errMsg: string;
16
+ }>;
17
+ export declare const offLocationChangeError: () => Promise<{
18
+ errMsg: string;
19
+ }>;
20
+ export declare const offLocationChange: () => Promise<{
21
+ errMsg: string;
22
+ }>;
23
+ export declare const getLocation: (options: any) => Promise<unknown>;
24
+ export declare const choosePoi: () => Promise<{
25
+ errMsg: string;
26
+ }>;
27
+ export * from './chooseLocation';
@@ -0,0 +1,42 @@
1
+ import Taro from '@tarojs/api';
2
+ export declare class EditorContext implements Taro.EditorContext {
3
+ blur: () => Promise<{
4
+ errMsg: string;
5
+ }>;
6
+ clear: () => Promise<{
7
+ errMsg: string;
8
+ }>;
9
+ format: () => Promise<{
10
+ errMsg: string;
11
+ }>;
12
+ getContents: () => Promise<{
13
+ errMsg: string;
14
+ }>;
15
+ getSelectionText: () => Promise<{
16
+ errMsg: string;
17
+ }>;
18
+ insertDivider: () => Promise<{
19
+ errMsg: string;
20
+ }>;
21
+ insertImage: () => Promise<{
22
+ errMsg: string;
23
+ }>;
24
+ insertText: () => Promise<{
25
+ errMsg: string;
26
+ }>;
27
+ redo: () => Promise<{
28
+ errMsg: string;
29
+ }>;
30
+ removeFormat: () => Promise<{
31
+ errMsg: string;
32
+ }>;
33
+ scrollIntoView: () => Promise<{
34
+ errMsg: string;
35
+ }>;
36
+ setContents: () => Promise<{
37
+ errMsg: string;
38
+ }>;
39
+ undo: () => Promise<{
40
+ errMsg: string;
41
+ }>;
42
+ }
@@ -0,0 +1,58 @@
1
+ import Taro from '@tarojs/api';
2
+ import { CallbackManager } from '../../utils/handler';
3
+ export declare class InnerAudioContext implements Taro.InnerAudioContext {
4
+ Instance?: HTMLAudioElement;
5
+ errorStack: CallbackManager;
6
+ stopStack: CallbackManager;
7
+ __startTime: number;
8
+ constructor();
9
+ set autoplay(e: boolean);
10
+ get autoplay(): boolean;
11
+ get buffered(): number;
12
+ get currentTime(): number;
13
+ get duration(): number;
14
+ set loop(e: boolean);
15
+ get loop(): boolean;
16
+ get paused(): true;
17
+ set src(e: string);
18
+ get src(): string;
19
+ set volume(e: number);
20
+ get volume(): number;
21
+ set playbackRate(e: number);
22
+ get playbackRate(): number;
23
+ set obeyMuteSwitch(_e: boolean);
24
+ get obeyMuteSwitch(): boolean;
25
+ set startTime(e: number);
26
+ get startTime(): number;
27
+ set referrerPolicy(e: string);
28
+ get referrerPolicy(): string;
29
+ private setProperty;
30
+ play: () => Promise<void> | undefined;
31
+ pause: () => void | undefined;
32
+ stop: () => void;
33
+ seek: (position: number) => void;
34
+ /**
35
+ * @TODO destroy得并不干净
36
+ */
37
+ destroy: () => void;
38
+ onCanplay: (callback?: () => void) => void | undefined;
39
+ onPlay: (callback?: () => void) => void | undefined;
40
+ onPause: (callback?: () => void) => void | undefined;
41
+ onStop: (callback?: () => void) => void;
42
+ onEnded: (callback?: () => void) => void | undefined;
43
+ onTimeUpdate: (callback?: () => void) => void | undefined;
44
+ onError: (callback?: ((res: Taro.InnerAudioContext.onErrorDetail) => void) | undefined) => void;
45
+ onWaiting: (callback?: () => void) => void | undefined;
46
+ onSeeking: (callback?: () => void) => void | undefined;
47
+ onSeeked: (callback?: () => void) => void | undefined;
48
+ offCanplay: (callback?: () => void) => void | undefined;
49
+ offPlay: (callback?: () => void) => void | undefined;
50
+ offPause: (callback?: () => void) => void | undefined;
51
+ offStop: (callback?: () => void) => void;
52
+ offEnded: (callback?: () => void) => void | undefined;
53
+ offTimeUpdate: (callback?: () => void) => void | undefined;
54
+ offError: (callback?: () => void) => void;
55
+ offWaiting: (callback?: () => void) => void | undefined;
56
+ offSeeking: (callback?: () => void) => void | undefined;
57
+ offSeeked: (callback?: () => void) => void | undefined;
58
+ }
@@ -0,0 +1,29 @@
1
+ import Taro from '@tarojs/api';
2
+ export declare const stopVoice: () => Promise<{
3
+ errMsg: string;
4
+ }>;
5
+ export declare const setInnerAudioOption: () => Promise<{
6
+ errMsg: string;
7
+ }>;
8
+ export declare const playVoice: () => Promise<{
9
+ errMsg: string;
10
+ }>;
11
+ export declare const pauseVoice: () => Promise<{
12
+ errMsg: string;
13
+ }>;
14
+ export declare const getAvailableAudioSources: () => Promise<{
15
+ errMsg: string;
16
+ }>;
17
+ export declare const createWebAudioContext: () => Promise<{
18
+ errMsg: string;
19
+ }>;
20
+ export declare const createMediaAudioPlayer: () => Promise<{
21
+ errMsg: string;
22
+ }>;
23
+ /**
24
+ * 创建内部 audio 上下文 InnerAudioContext 对象。
25
+ */
26
+ export declare const createInnerAudioContext: typeof Taro.createInnerAudioContext;
27
+ export declare const createAudioContext: () => Promise<{
28
+ errMsg: string;
29
+ }>;
@@ -0,0 +1,71 @@
1
+ import Taro from '@tarojs/api';
2
+ import { CallbackManager } from '../../utils/handler';
3
+ export declare class BackgroundAudioManager implements Taro.BackgroundAudioManager {
4
+ Instance?: HTMLAudioElement;
5
+ errorStack: CallbackManager;
6
+ stopStack: CallbackManager;
7
+ __startTime: number;
8
+ constructor();
9
+ set src(e: string);
10
+ get src(): string;
11
+ set startTime(e: number);
12
+ get startTime(): number;
13
+ set title(e: string);
14
+ get title(): string;
15
+ set epname(e: string);
16
+ get epname(): string;
17
+ set singer(e: string);
18
+ get singer(): string;
19
+ set coverImgUrl(e: string);
20
+ get coverImgUrl(): string;
21
+ set webUrl(e: string);
22
+ get webUrl(): string;
23
+ set protocol(e: string);
24
+ get protocol(): string;
25
+ set playbackRate(e: number);
26
+ get playbackRate(): number;
27
+ get duration(): number;
28
+ get currentTime(): number;
29
+ get paused(): boolean;
30
+ get buffered(): number;
31
+ set referrerPolicy(e: string);
32
+ get referrerPolicy(): string;
33
+ private setProperty;
34
+ private dataset;
35
+ play: () => Promise<void> | undefined;
36
+ pause: () => void | undefined;
37
+ seek: (position: number) => void;
38
+ stop: () => void;
39
+ onCanplay: (callback?: () => void) => void | undefined;
40
+ onWaiting: (callback?: () => void) => void | undefined;
41
+ onError: (callback?: ((res: Taro.InnerAudioContext.onErrorDetail) => void) | undefined) => void;
42
+ onPlay: (callback?: () => void) => void | undefined;
43
+ onPause: (callback?: () => void) => void | undefined;
44
+ onSeeking: (callback?: () => void) => void | undefined;
45
+ onSeeked: (callback?: () => void) => void | undefined;
46
+ onEnded: (callback?: () => void) => void | undefined;
47
+ onStop: (callback?: () => void) => void;
48
+ onTimeUpdate: (callback?: () => void) => void | undefined;
49
+ onPrev: () => Promise<{
50
+ errMsg: string;
51
+ }>;
52
+ onNext: () => Promise<{
53
+ errMsg: string;
54
+ }>;
55
+ offCanplay: (callback?: () => void) => void | undefined;
56
+ offWaiting: (callback?: () => void) => void | undefined;
57
+ offError: (callback?: () => void) => void;
58
+ offPlay: (callback?: () => void) => void | undefined;
59
+ offPause: (callback?: () => void) => void | undefined;
60
+ offSeeking: (callback?: () => void) => void | undefined;
61
+ offSeeked: (callback?: () => void) => void | undefined;
62
+ offEnded: (callback?: () => void) => void | undefined;
63
+ offStop: (callback?: () => void) => void;
64
+ offTimeUpdate: (callback?: () => void) => void | undefined;
65
+ offPrev: () => Promise<{
66
+ errMsg: string;
67
+ }>;
68
+ offNext: () => Promise<{
69
+ errMsg: string;
70
+ }>;
71
+ }
@@ -0,0 +1,29 @@
1
+ import { BackgroundAudioManager } from './BackgroundAudioManager';
2
+ export declare const stopBackgroundAudio: () => Promise<{
3
+ errMsg: string;
4
+ }>;
5
+ export declare const seekBackgroundAudio: () => Promise<{
6
+ errMsg: string;
7
+ }>;
8
+ export declare const playBackgroundAudio: () => Promise<{
9
+ errMsg: string;
10
+ }>;
11
+ export declare const pauseBackgroundAudio: () => Promise<{
12
+ errMsg: string;
13
+ }>;
14
+ export declare const onBackgroundAudioStop: () => Promise<{
15
+ errMsg: string;
16
+ }>;
17
+ export declare const onBackgroundAudioPlay: () => Promise<{
18
+ errMsg: string;
19
+ }>;
20
+ export declare const onBackgroundAudioPause: () => Promise<{
21
+ errMsg: string;
22
+ }>;
23
+ export declare const getBackgroundAudioPlayerState: () => Promise<{
24
+ errMsg: string;
25
+ }>;
26
+ /**
27
+ * 获取全局唯一的背景音频管理器
28
+ */
29
+ export declare const getBackgroundAudioManager: () => BackgroundAudioManager;
@@ -0,0 +1,3 @@
1
+ export declare const createCameraContext: () => Promise<{
2
+ errMsg: string;
3
+ }>;
@@ -0,0 +1,5 @@
1
+ import Taro from '@tarojs/api';
2
+ /**
3
+ * 从本地相册选择图片或使用相机拍照。
4
+ */
5
+ export declare const chooseImage: typeof Taro.chooseImage;
@@ -0,0 +1,5 @@
1
+ import Taro from '@tarojs/api';
2
+ /**
3
+ * 获取图片信息。网络图片需先配置download域名才能生效。
4
+ */
5
+ export declare const getImageInfo: typeof Taro.getImageInfo;
@@ -0,0 +1,15 @@
1
+ export declare const saveImageToPhotosAlbum: () => Promise<{
2
+ errMsg: string;
3
+ }>;
4
+ export declare const previewMedia: () => Promise<{
5
+ errMsg: string;
6
+ }>;
7
+ export * from './previewImage';
8
+ export * from './getImageInfo';
9
+ export declare const compressImage: () => Promise<{
10
+ errMsg: string;
11
+ }>;
12
+ export declare const chooseMessageFile: () => Promise<{
13
+ errMsg: string;
14
+ }>;
15
+ export * from './chooseImage';
@@ -0,0 +1,8 @@
1
+ import Taro from '@tarojs/api';
2
+ /**
3
+ * previewImage api基于开源的React组件[react-wx-images-viewer](https://github.com/react-ld/react-wx-images-viewer)开发,感谢!
4
+ */
5
+ /**
6
+ * 在新页面中全屏预览图片。预览的过程中用户可以进行保存图片、发送给朋友等操作。
7
+ */
8
+ export declare const previewImage: typeof Taro.previewImage;
@@ -0,0 +1,12 @@
1
+ export * from './audio';
2
+ export * from './background-audio';
3
+ export * from './camera';
4
+ export * from './image';
5
+ export * from './live';
6
+ export * from './map';
7
+ export * from './media-recorder';
8
+ export * from './recorder';
9
+ export * from './video';
10
+ export * from './video-decoder';
11
+ export * from './video-processing';
12
+ export * from './voip';
@@ -0,0 +1,6 @@
1
+ export declare const createLivePusherContext: () => Promise<{
2
+ errMsg: string;
3
+ }>;
4
+ export declare const createLivePlayerContext: () => Promise<{
5
+ errMsg: string;
6
+ }>;
@@ -0,0 +1,3 @@
1
+ export declare const createMapContext: () => Promise<{
2
+ errMsg: string;
3
+ }>;
@@ -0,0 +1,3 @@
1
+ export declare const createMediaRecorder: () => Promise<{
2
+ errMsg: string;
3
+ }>;