capacitor-plugin-camera-forked 3.0.66 → 3.0.77
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.
|
@@ -813,7 +813,7 @@ public class CameraPreviewPlugin: CAPPlugin, AVCaptureVideoDataOutputSampleBuffe
|
|
|
813
813
|
// Calculate the point in the preview layer's coordinate space
|
|
814
814
|
let previewPoint = CGPoint(x: point.x * previewView.bounds.width,
|
|
815
815
|
y: point.y * previewView.bounds.height)
|
|
816
|
-
showFocusView(at: previewPoint)
|
|
816
|
+
// showFocusView(at: previewPoint)
|
|
817
817
|
call.resolve()
|
|
818
818
|
} else {
|
|
819
819
|
call.reject("Invalid coordinates. Provide normalized x,y values (0.0-1.0)")
|
|
@@ -859,7 +859,7 @@ public class CameraPreviewPlugin: CAPPlugin, AVCaptureVideoDataOutputSampleBuffe
|
|
|
859
859
|
let convertedPoint = self.previewView.videoPreviewLayer.captureDevicePointConverted(fromLayerPoint: location)
|
|
860
860
|
|
|
861
861
|
focusWithPoint(point: convertedPoint)
|
|
862
|
-
showFocusView(at: location)
|
|
862
|
+
// showFocusView(at: location)
|
|
863
863
|
}
|
|
864
864
|
|
|
865
865
|
func focusWithPoint(point: CGPoint) {
|
|
@@ -979,40 +979,40 @@ public class CameraPreviewPlugin: CAPPlugin, AVCaptureVideoDataOutputSampleBuffe
|
|
|
979
979
|
}
|
|
980
980
|
}
|
|
981
981
|
|
|
982
|
-
func showFocusView(at point: CGPoint) {
|
|
983
|
-
|
|
984
|
-
|
|
982
|
+
// func showFocusView(at point: CGPoint) {
|
|
983
|
+
// DispatchQueue.main.async { [weak self] in
|
|
984
|
+
// guard let self = self else { return }
|
|
985
985
|
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
986
|
+
// if self.isFocusAnimating {
|
|
987
|
+
// self.focusView?.removeFromSuperview()
|
|
988
|
+
// self.focusCompletionTimer?.invalidate()
|
|
989
|
+
// }
|
|
990
990
|
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
991
|
+
// // Create focus view if needed - but make it invisible
|
|
992
|
+
// if self.focusView == nil {
|
|
993
|
+
// self.focusView = UIView(frame: CGRect(x: 0, y: 0, width: 80, height: 80))
|
|
994
|
+
// // Make the focus view completely transparent
|
|
995
|
+
// self.focusView?.layer.borderColor = UIColor.clear.cgColor
|
|
996
|
+
// self.focusView?.layer.borderWidth = 0.0
|
|
997
|
+
// self.focusView?.layer.cornerRadius = 40
|
|
998
|
+
// self.focusView?.backgroundColor = .clear
|
|
999
|
+
// self.focusView?.alpha = 0.0
|
|
1000
1000
|
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1001
|
+
// // Remove the inner circle to make it completely invisible
|
|
1002
|
+
// // No inner circle added
|
|
1003
|
+
// }
|
|
1004
1004
|
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1005
|
+
// self.focusView?.center = point
|
|
1006
|
+
// self.focusView?.alpha = 0.0 // Keep invisible
|
|
1007
|
+
// self.focusView?.transform = CGAffineTransform.identity
|
|
1008
|
+
// self.previewView.addSubview(self.focusView!)
|
|
1009
1009
|
|
|
1010
|
-
|
|
1010
|
+
// self.isFocusAnimating = true
|
|
1011
1011
|
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
}
|
|
1012
|
+
// // Skip the animation since the view is invisible
|
|
1013
|
+
// // Focus functionality still works, just no visual feedback
|
|
1014
|
+
// }
|
|
1015
|
+
// }
|
|
1016
1016
|
|
|
1017
1017
|
@objc func requestCameraPermission(_ call: CAPPluginCall) {
|
|
1018
1018
|
AVCaptureDevice.requestAccess(for: .video) { granted in
|
package/package.json
CHANGED