@capgo/camera-preview 7.4.0-beta.9 → 7.4.1
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/README.md +246 -50
- package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/android/src/main/java/com/ahm/capacitor/camera/preview/CameraPreview.java +1249 -143
- package/android/src/main/java/com/ahm/capacitor/camera/preview/CameraXView.java +3400 -1432
- package/android/src/main/java/com/ahm/capacitor/camera/preview/GridOverlayView.java +95 -58
- package/android/src/main/java/com/ahm/capacitor/camera/preview/model/CameraDevice.java +55 -46
- package/android/src/main/java/com/ahm/capacitor/camera/preview/model/CameraLens.java +61 -52
- package/android/src/main/java/com/ahm/capacitor/camera/preview/model/CameraSessionConfiguration.java +160 -72
- package/android/src/main/java/com/ahm/capacitor/camera/preview/model/LensInfo.java +29 -23
- package/android/src/main/java/com/ahm/capacitor/camera/preview/model/ZoomFactors.java +24 -23
- package/dist/docs.json +443 -42
- package/dist/esm/definitions.d.ts +173 -27
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +24 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/web.d.ts +23 -3
- package/dist/esm/web.js +463 -65
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +485 -64
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +485 -64
- package/dist/plugin.js.map +1 -1
- package/ios/Sources/{CapgoCameraPreview → CapgoCameraPreviewPlugin}/CameraController.swift +731 -315
- package/ios/Sources/CapgoCameraPreviewPlugin/Plugin.swift +1902 -0
- package/package.json +11 -3
- package/android/.gradle/8.14.2/checksums/checksums.lock +0 -0
- package/android/.gradle/8.14.2/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/8.14.2/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/8.14.2/executionHistory/executionHistory.bin +0 -0
- package/android/.gradle/8.14.2/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/8.14.2/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.14.2/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/8.14.2/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.14.2/fileHashes/resourceHashesCache.bin +0 -0
- package/android/.gradle/8.14.2/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
- package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- package/android/.gradle/file-system.probe +0 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/ios/Sources/CapgoCameraPreview/Plugin.swift +0 -1369
- /package/ios/Sources/{CapgoCameraPreview → CapgoCameraPreviewPlugin}/GridOverlayView.swift +0 -0
|
@@ -4,31 +4,37 @@ package com.ahm.capacitor.camera.preview.model;
|
|
|
4
4
|
* Represents lens information for a camera device.
|
|
5
5
|
*/
|
|
6
6
|
public class LensInfo {
|
|
7
|
-
private final float focalLength;
|
|
8
|
-
private final String deviceType;
|
|
9
|
-
private final float baseZoomRatio;
|
|
10
|
-
private final float digitalZoom;
|
|
11
7
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
this.digitalZoom = digitalZoom;
|
|
17
|
-
}
|
|
8
|
+
private final float focalLength;
|
|
9
|
+
private final String deviceType;
|
|
10
|
+
private final float baseZoomRatio;
|
|
11
|
+
private final float digitalZoom;
|
|
18
12
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
public LensInfo(
|
|
14
|
+
float focalLength,
|
|
15
|
+
String deviceType,
|
|
16
|
+
float baseZoomRatio,
|
|
17
|
+
float digitalZoom
|
|
18
|
+
) {
|
|
19
|
+
this.focalLength = Math.round(focalLength * 100.0f) / 100.0f;
|
|
20
|
+
this.deviceType = deviceType;
|
|
21
|
+
this.baseZoomRatio = baseZoomRatio;
|
|
22
|
+
this.digitalZoom = digitalZoom;
|
|
23
|
+
}
|
|
22
24
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
public float getFocalLength() {
|
|
26
|
+
return focalLength;
|
|
27
|
+
}
|
|
26
28
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
public String getDeviceType() {
|
|
30
|
+
return deviceType;
|
|
31
|
+
}
|
|
30
32
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
public float getBaseZoomRatio() {
|
|
34
|
+
return baseZoomRatio;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
public float getDigitalZoom() {
|
|
38
|
+
return digitalZoom;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -4,31 +4,32 @@ package com.ahm.capacitor.camera.preview.model;
|
|
|
4
4
|
* Represents zoom factor information for a camera with current lens details.
|
|
5
5
|
*/
|
|
6
6
|
public class ZoomFactors {
|
|
7
|
-
private final float min;
|
|
8
|
-
private final float max;
|
|
9
|
-
private final float current;
|
|
10
|
-
private final LensInfo lens;
|
|
11
7
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
this.lens = lens;
|
|
17
|
-
}
|
|
8
|
+
private final float min;
|
|
9
|
+
private final float max;
|
|
10
|
+
private final float current;
|
|
11
|
+
private final LensInfo lens;
|
|
18
12
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
public ZoomFactors(float min, float max, float current, LensInfo lens) {
|
|
14
|
+
this.min = min;
|
|
15
|
+
this.max = max;
|
|
16
|
+
this.current = current;
|
|
17
|
+
this.lens = lens;
|
|
18
|
+
}
|
|
22
19
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
public float getMin() {
|
|
21
|
+
return min;
|
|
22
|
+
}
|
|
26
23
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
public float getMax() {
|
|
25
|
+
return max;
|
|
26
|
+
}
|
|
30
27
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
public float getCurrent() {
|
|
29
|
+
return current;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
public LensInfo getLens() {
|
|
33
|
+
return lens;
|
|
34
|
+
}
|
|
35
|
+
}
|