@capgo/camera-preview 6.5.7 → 6.5.9

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.
@@ -274,10 +274,10 @@ public class CameraActivity extends Fragment {
274
274
  switch (event.getAction()) {
275
275
  case MotionEvent.ACTION_DOWN:
276
276
  if (mLastTouchX == 0 || mLastTouchY == 0) {
277
- mLastTouchX = (int) event.getRawX() -
278
- layoutParams.leftMargin;
279
- mLastTouchY = (int) event.getRawY() -
280
- layoutParams.topMargin;
277
+ mLastTouchX =
278
+ (int) event.getRawX() - layoutParams.leftMargin;
279
+ mLastTouchY =
280
+ (int) event.getRawY() - layoutParams.topMargin;
281
281
  } else {
282
282
  mLastTouchX = (int) event.getRawX();
283
283
  mLastTouchY = (int) event.getRawY();
@@ -440,8 +440,8 @@ public class CameraActivity extends Fragment {
440
440
  frameContainerLayout.getWidth(),
441
441
  frameContainerLayout.getHeight()
442
442
  );
443
- camViewLayout.gravity = Gravity.CENTER_HORIZONTAL |
444
- Gravity.CENTER_VERTICAL;
443
+ camViewLayout.gravity =
444
+ Gravity.CENTER_HORIZONTAL | Gravity.CENTER_VERTICAL;
445
445
  frameCamContainerLayout.setLayoutParams(camViewLayout);
446
446
  }
447
447
  }
@@ -526,8 +526,8 @@ public class CameraActivity extends Fragment {
526
526
  "cameraCurrentlyLocked := " + Integer.toString(cameraCurrentlyLocked)
527
527
  );
528
528
  try {
529
- cameraCurrentlyLocked = (cameraCurrentlyLocked + 1) %
530
- getNumberOfCameras();
529
+ cameraCurrentlyLocked =
530
+ (cameraCurrentlyLocked + 1) % getNumberOfCameras();
531
531
  Log.d(TAG, "cameraCurrentlyLocked new: " + cameraCurrentlyLocked);
532
532
  } catch (Exception exception) {
533
533
  Log.d(TAG, Objects.requireNonNull(exception.getMessage()));
@@ -528,12 +528,13 @@ public class CameraPreview
528
528
  }
529
529
 
530
530
  if (height != 0) {
531
- computedHeight = (int) TypedValue.applyDimension(
532
- TypedValue.COMPLEX_UNIT_DIP,
533
- height,
534
- metrics
535
- ) -
536
- computedPaddingBottom;
531
+ computedHeight =
532
+ (int) TypedValue.applyDimension(
533
+ TypedValue.COMPLEX_UNIT_DIP,
534
+ height,
535
+ metrics
536
+ ) -
537
+ computedPaddingBottom;
537
538
  } else {
538
539
  Display defaultDisplay = getBridge()
539
540
  .getActivity()
@@ -542,12 +543,13 @@ public class CameraPreview
542
543
  final Point size = new Point();
543
544
  defaultDisplay.getSize(size);
544
545
 
545
- computedHeight = (int) TypedValue.applyDimension(
546
- TypedValue.COMPLEX_UNIT_PX,
547
- size.y,
548
- metrics
549
- ) -
550
- computedPaddingBottom;
546
+ computedHeight =
547
+ (int) TypedValue.applyDimension(
548
+ TypedValue.COMPLEX_UNIT_PX,
549
+ size.y,
550
+ metrics
551
+ ) -
552
+ computedPaddingBottom;
551
553
  }
552
554
 
553
555
  fragment.setRect(
@@ -644,7 +644,7 @@ extension CameraControllerError: LocalizedError {
644
644
  case .cannotFindDocumentsDirectory:
645
645
  return NSLocalizedString("Cannot find documents directory", comment: "This should never happen")
646
646
  case .fileVideoOutputNotFound:
647
- return NSLocalizedString("Cannot find fileVideoOutput", comment: "Perhaps you are running IOS < 17 or you are not recording?")
647
+ return NSLocalizedString("Video recording is not available. Make sure the camera is properly initialized.", comment: "Video recording not available")
648
648
  }
649
649
  }
650
650
  }
@@ -387,9 +387,6 @@ public class CameraPreview: CAPPlugin {
387
387
  }
388
388
 
389
389
  @objc func startRecordVideo(_ call: CAPPluginCall) {
390
- if #unavailable(iOS 17) {
391
- call.reject("You cannot record video on IOS < 17")
392
- }
393
390
  DispatchQueue.main.async {
394
391
  do {
395
392
  try self.cameraController.captureVideo()
package/ios/Podfile.lock CHANGED
@@ -1,5 +1,5 @@
1
1
  PODS:
2
- - Capacitor (6.1.0):
2
+ - Capacitor (6.1.2):
3
3
  - CapacitorCordova
4
4
  - CapacitorCordova (2.0.1)
5
5
 
@@ -15,7 +15,7 @@ EXTERNAL SOURCES:
15
15
  :path: "../node_modules/@capacitor/ios"
16
16
 
17
17
  SPEC CHECKSUMS:
18
- Capacitor: 187bd7847b6f71467015a20200a1a071be3e5f14
18
+ Capacitor: 679f9673fdf30597493a6362a5d5bf233d46abc2
19
19
  CapacitorCordova: 9fee2eb6780331b6ff09710d6a7d1f2e4707f1b9
20
20
 
21
21
  PODFILE CHECKSUM: e80ffb7ef3a0ac7d0d6143f3e64f287d4d027c84
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/camera-preview",
3
- "version": "6.5.7",
3
+ "version": "6.5.9",
4
4
  "description": "Camera preview",
5
5
  "author": "Martin Donadieu <martindonadieu@gmail.com>",
6
6
  "license": "MIT",
@@ -44,22 +44,22 @@
44
44
  "@capacitor/android": "^6.0.0",
45
45
  "@capacitor/cli": "^6.0.0",
46
46
  "@capacitor/core": "^6.0.0",
47
- "@capacitor/docgen": "^0.2.2",
47
+ "@capacitor/docgen": "^0.3.0",
48
48
  "@capacitor/ios": "^6.0.0",
49
49
  "@ionic/eslint-config": "^0.4.0",
50
50
  "@ionic/prettier-config": "^4.0.0",
51
- "@ionic/swiftlint-config": "^1.1.2",
52
- "@types/node": "^20.12.12",
53
- "@typescript-eslint/eslint-plugin": "^7.11.0",
54
- "@typescript-eslint/parser": "^7.11.0",
51
+ "@ionic/swiftlint-config": "^2.0.0",
52
+ "@types/node": "^22.10.2",
53
+ "@typescript-eslint/eslint-plugin": "^8.18.0",
54
+ "@typescript-eslint/parser": "^8.18.0",
55
55
  "eslint": "^8.57.0",
56
56
  "eslint-plugin-import": "^2.29.1",
57
- "prettier": "^3.2.5",
58
- "prettier-plugin-java": "^2.6.0",
59
- "rimraf": "^5.0.7",
60
- "rollup": "^4.18.0",
61
- "swiftlint": "^1.0.2",
62
- "typescript": "^5.4.5"
57
+ "prettier": "^3.4.2",
58
+ "prettier-plugin-java": "^2.6.5",
59
+ "rimraf": "^6.0.1",
60
+ "rollup": "^4.28.1",
61
+ "swiftlint": "^2.0.0",
62
+ "typescript": "^5.7.2"
63
63
  },
64
64
  "peerDependencies": {
65
65
  "@capacitor/core": "^6.0.0"
@@ -78,6 +78,5 @@
78
78
  "android": {
79
79
  "src": "android"
80
80
  }
81
- },
82
- "packageManager": "pnpm@9.12.3+sha512.cce0f9de9c5a7c95bef944169cc5dfe8741abfb145078c0d508b868056848a87c81e626246cb60967cbd7fd29a6c062ef73ff840d96b3c86c40ac92cf4a813ee"
81
+ }
83
82
  }