@capgo/camera-preview 7.3.12 → 7.4.0-beta.10

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.
Files changed (61) hide show
  1. package/CapgoCameraPreview.podspec +16 -13
  2. package/README.md +467 -73
  3. package/android/.gradle/8.14.2/checksums/checksums.lock +0 -0
  4. package/android/.gradle/8.14.2/checksums/md5-checksums.bin +0 -0
  5. package/android/.gradle/8.14.2/checksums/sha1-checksums.bin +0 -0
  6. package/android/.gradle/8.14.2/executionHistory/executionHistory.bin +0 -0
  7. package/android/.gradle/8.14.2/executionHistory/executionHistory.lock +0 -0
  8. package/android/.gradle/8.14.2/fileChanges/last-build.bin +0 -0
  9. package/android/.gradle/8.14.2/fileHashes/fileHashes.bin +0 -0
  10. package/android/.gradle/8.14.2/fileHashes/fileHashes.lock +0 -0
  11. package/android/.gradle/8.14.2/fileHashes/resourceHashesCache.bin +0 -0
  12. package/android/.gradle/8.14.2/gc.properties +0 -0
  13. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  14. package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
  15. package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  16. package/android/.gradle/file-system.probe +0 -0
  17. package/android/.gradle/vcs-1/gc.properties +0 -0
  18. package/android/build.gradle +11 -0
  19. package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
  20. package/android/src/main/AndroidManifest.xml +5 -3
  21. package/android/src/main/java/com/ahm/capacitor/camera/preview/CameraPreview.java +472 -541
  22. package/android/src/main/java/com/ahm/capacitor/camera/preview/CameraXView.java +1648 -0
  23. package/android/src/main/java/com/ahm/capacitor/camera/preview/GridOverlayView.java +82 -0
  24. package/android/src/main/java/com/ahm/capacitor/camera/preview/model/CameraDevice.java +54 -0
  25. package/android/src/main/java/com/ahm/capacitor/camera/preview/model/CameraLens.java +70 -0
  26. package/android/src/main/java/com/ahm/capacitor/camera/preview/model/CameraSessionConfiguration.java +79 -0
  27. package/android/src/main/java/com/ahm/capacitor/camera/preview/model/LensInfo.java +34 -0
  28. package/android/src/main/java/com/ahm/capacitor/camera/preview/model/ZoomFactors.java +34 -0
  29. package/dist/docs.json +934 -154
  30. package/dist/esm/definitions.d.ts +445 -83
  31. package/dist/esm/definitions.js +10 -1
  32. package/dist/esm/definitions.js.map +1 -1
  33. package/dist/esm/web.d.ts +73 -3
  34. package/dist/esm/web.js +492 -68
  35. package/dist/esm/web.js.map +1 -1
  36. package/dist/plugin.cjs.js +498 -68
  37. package/dist/plugin.cjs.js.map +1 -1
  38. package/dist/plugin.js +498 -68
  39. package/dist/plugin.js.map +1 -1
  40. package/ios/{Plugin → Sources/CapgoCameraPreview}/CameraController.swift +601 -59
  41. package/ios/Sources/CapgoCameraPreview/GridOverlayView.swift +65 -0
  42. package/ios/Sources/CapgoCameraPreview/Plugin.swift +1369 -0
  43. package/ios/Tests/CameraPreviewPluginTests/CameraPreviewPluginTests.swift +15 -0
  44. package/package.json +1 -1
  45. package/android/src/main/java/com/ahm/capacitor/camera/preview/CameraActivity.java +0 -1279
  46. package/android/src/main/java/com/ahm/capacitor/camera/preview/CustomSurfaceView.java +0 -29
  47. package/android/src/main/java/com/ahm/capacitor/camera/preview/CustomTextureView.java +0 -39
  48. package/android/src/main/java/com/ahm/capacitor/camera/preview/Preview.java +0 -461
  49. package/android/src/main/java/com/ahm/capacitor/camera/preview/TapGestureDetector.java +0 -24
  50. package/ios/Plugin/Info.plist +0 -24
  51. package/ios/Plugin/Plugin.h +0 -10
  52. package/ios/Plugin/Plugin.m +0 -18
  53. package/ios/Plugin/Plugin.swift +0 -511
  54. package/ios/Plugin.xcodeproj/project.pbxproj +0 -593
  55. package/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  56. package/ios/Plugin.xcworkspace/contents.xcworkspacedata +0 -10
  57. package/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  58. package/ios/PluginTests/Info.plist +0 -22
  59. package/ios/PluginTests/PluginTests.swift +0 -83
  60. package/ios/Podfile +0 -13
  61. package/ios/Podfile.lock +0 -23
@@ -1,83 +0,0 @@
1
- import XCTest
2
- import Capacitor
3
- @testable import Plugin
4
-
5
- class PluginTests: XCTestCase {
6
- var plugin: CameraPreview?
7
-
8
- override func setUp() {
9
- super.setUp()
10
- plugin = CameraPreview()
11
- }
12
-
13
- override func tearDown() {
14
- plugin = nil
15
- super.tearDown()
16
- }
17
-
18
- func testStartCamera() {
19
- let call = CAPPluginCall(callbackId: "testStartCamera", options: [
20
- "position": "rear",
21
- "quality": 85,
22
- "width": 800,
23
- "height": 600
24
- ], success: { (_, _) in
25
- // Camera started successfully
26
- XCTAssert(true)
27
- }, error: { (_) in
28
- XCTFail("Error shouldn't have been called")
29
- })
30
-
31
- plugin?.start(call!)
32
- }
33
-
34
- func testFlipCamera() {
35
- let call = CAPPluginCall(callbackId: "testFlipCamera", options: [:], success: { (_, _) in
36
- // Camera flipped successfully
37
- XCTAssert(true)
38
- }, error: { (_) in
39
- XCTFail("Error shouldn't have been called")
40
- })
41
-
42
- plugin?.flip(call!)
43
- }
44
-
45
- func testStopCamera() {
46
- let call = CAPPluginCall(callbackId: "testStopCamera", options: [:], success: { (_, _) in
47
- // Camera stopped successfully
48
- XCTAssert(true)
49
- }, error: { (_) in
50
- XCTFail("Error shouldn't have been called")
51
- })
52
-
53
- plugin?.stop(call!)
54
- }
55
-
56
- func testStartRecordVideo() {
57
- let call = CAPPluginCall(callbackId: "testStartRecordVideo", options: [:], success: { (_, _) in
58
- // Video recording started successfully
59
- XCTAssert(true)
60
- }, error: { (_) in
61
- XCTFail("Error shouldn't have been called")
62
- })
63
-
64
- plugin?.startRecordVideo(call!)
65
- }
66
-
67
- func testStopRecordVideo() {
68
- let expectation = self.expectation(description: "Video recording stopped")
69
-
70
- let call = CAPPluginCall(callbackId: "testStopRecordVideo", options: [:], success: { (result, _) in
71
- // Video recording stopped successfully
72
- let videoUrl = result?.data?["videoUrl"] as? String
73
- XCTAssertNotNil(videoUrl)
74
- expectation.fulfill()
75
- }, error: { (_) in
76
- XCTFail("Error shouldn't have been called")
77
- })
78
-
79
- plugin?.stopRecordVideo(call!)
80
-
81
- waitForExpectations(timeout: 5, handler: nil)
82
- }
83
- }
package/ios/Podfile DELETED
@@ -1,13 +0,0 @@
1
- platform :ios, '14.0'
2
-
3
- target 'Plugin' do
4
- # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
5
- use_frameworks!
6
- pod 'Capacitor', :path => '../node_modules/@capacitor/ios'
7
- end
8
-
9
- target 'PluginTests' do
10
- use_frameworks!
11
-
12
- pod 'Capacitor', :path => '../node_modules/@capacitor/ios'
13
- end
package/ios/Podfile.lock DELETED
@@ -1,23 +0,0 @@
1
- PODS:
2
- - Capacitor (7.0.1):
3
- - CapacitorCordova
4
- - CapacitorCordova (2.0.1)
5
-
6
- DEPENDENCIES:
7
- - "Capacitor (from `../node_modules/@capacitor/ios`)"
8
-
9
- SPEC REPOS:
10
- trunk:
11
- - CapacitorCordova
12
-
13
- EXTERNAL SOURCES:
14
- Capacitor:
15
- :path: "../node_modules/@capacitor/ios"
16
-
17
- SPEC CHECKSUMS:
18
- Capacitor: 23fff43571a4d1e3ee7d67b5a3588c6e757c2913
19
- CapacitorCordova: 9fee2eb6780331b6ff09710d6a7d1f2e4707f1b9
20
-
21
- PODFILE CHECKSUM: 6e5d994cddf49dd94ab390ca7cc02bd62f82f98d
22
-
23
- COCOAPODS: 1.16.2