capacitor-camera-module 0.0.43 → 0.0.45

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.
@@ -5,7 +5,7 @@ import UIKit
5
5
 
6
6
 
7
7
  @objc(CameraModule)
8
- public class CameraModulePlugin: CAPPlugin,
8
+ public class CameraModulePlugin: CAPPlugin,CAPBridgedPlugin,
9
9
  AVCaptureVideoDataOutputSampleBufferDelegate {
10
10
 
11
11
  private var previewView: UIView?
@@ -26,6 +26,25 @@ public class CameraModulePlugin: CAPPlugin,
26
26
  private var lastScanTime: Date?
27
27
  private let scanDebounceInterval: TimeInterval = 0.5 // medio segundo
28
28
 
29
+ public let identifier = "CameraModule"
30
+ public let jsName = "CameraModule"
31
+
32
+
33
+ public let pluginMethods: [CAPPluginMethod] = [
34
+ CAPPluginMethod(name: "checkPermission", returnType: CAPPluginReturnPromise),
35
+ CAPPluginMethod(name: "requestPermission", returnType: CAPPluginReturnPromise),
36
+
37
+ CAPPluginMethod(name: "startPreview", returnType: CAPPluginReturnPromise),
38
+ CAPPluginMethod(name: "stopPreview", returnType: CAPPluginReturnPromise),
39
+
40
+ CAPPluginMethod(name: "toggleFlash", returnType: CAPPluginReturnPromise),
41
+ CAPPluginMethod(name: "hasFlash", returnType: CAPPluginReturnPromise),
42
+
43
+ CAPPluginMethod(name: "takePhotoBase64", returnType: CAPPluginReturnPromise),
44
+
45
+ CAPPluginMethod(name: "startBarcodeScan", returnType: CAPPluginReturnPromise),
46
+ CAPPluginMethod(name: "stopBarcodeScan", returnType: CAPPluginReturnPromise)
47
+ ]
29
48
 
30
49
  // MARK: - Lifecycle
31
50
 
@@ -34,6 +53,7 @@ public class CameraModulePlugin: CAPPlugin,
34
53
  bridge?.webView?.backgroundColor = .clear
35
54
  }
36
55
 
56
+
37
57
  // MARK: - Permissions
38
58
 
39
59
  @objc func checkPermission(_ call: CAPPluginCall) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "capacitor-camera-module",
3
- "version": "0.0.43",
3
+ "version": "0.0.45",
4
4
  "description": "Plugin to request permissiones view camera take phots",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",