@mpxjs/api-proxy 2.10.16-beta.2 → 2.10.16-beta.6

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mpxjs/api-proxy",
3
- "version": "2.10.16-beta.2",
3
+ "version": "2.10.16-beta.6",
4
4
  "description": "convert miniprogram API at each end",
5
5
  "module": "src/index.js",
6
6
  "types": "@types/index.d.ts",
@@ -13,11 +13,12 @@ export default class CreateCamera {
13
13
  }
14
14
 
15
15
  setZoom (options = {}) {
16
- const { zoom, success = noop, fail = noop, complete = noop } = options
16
+ const { zoom } = options
17
17
  if (this.camera.setZoom) {
18
18
  this.camera.setZoom(zoom)
19
19
  }
20
20
  }
21
+
21
22
  takePhoto (options = {}) {
22
23
  const { success = noop, fail = noop, complete = noop } = options
23
24
  const takePhoto = this.camera.getTakePhoto?.()
@@ -40,11 +41,12 @@ export default class CreateCamera {
40
41
  })
41
42
  }
42
43
  }
44
+
43
45
  startRecord (options = {}) {
44
46
  let { timeout = 30, success = noop, fail = noop, complete = noop, timeoutCallback = noop } = options
45
47
  timeout = timeout > 300 ? 300 : timeout
46
48
  let recordTimer = null
47
- let isTimeout = false
49
+ const isTimeout = false
48
50
  const startRecord = this.camera.getStartRecord?.()
49
51
  if (startRecord) {
50
52
  const result = {
@@ -78,7 +80,8 @@ export default class CreateCamera {
78
80
  complete(result)
79
81
  }
80
82
  }
81
- stopRecord(options = {}) {
83
+
84
+ stopRecord (options = {}) {
82
85
  const { success = noop, fail = noop, complete = noop } = options
83
86
  const stopRecord = this.camera.getStopRecord?.()
84
87
  if (stopRecord) {