@capgo/camera-preview 7.3.9 → 7.4.0-beta.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/CapgoCameraPreview.podspec +16 -13
- package/README.md +298 -68
- package/android/.gradle/8.14.2/checksums/checksums.lock +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 +2 -0
- 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/android/build.gradle +9 -0
- package/android/src/main/java/com/ahm/capacitor/camera/preview/CameraPreview.java +239 -545
- package/android/src/main/java/com/ahm/capacitor/camera/preview/CameraXView.java +848 -0
- package/android/src/main/java/com/ahm/capacitor/camera/preview/model/CameraDevice.java +54 -0
- package/android/src/main/java/com/ahm/capacitor/camera/preview/model/CameraLens.java +70 -0
- package/android/src/main/java/com/ahm/capacitor/camera/preview/model/CameraSessionConfiguration.java +65 -0
- package/android/src/main/java/com/ahm/capacitor/camera/preview/model/LensInfo.java +34 -0
- package/android/src/main/java/com/ahm/capacitor/camera/preview/model/ZoomFactors.java +34 -0
- package/dist/docs.json +702 -151
- package/dist/esm/definitions.d.ts +326 -80
- package/dist/esm/definitions.js +10 -1
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/web.d.ts +27 -1
- package/dist/esm/web.js +244 -4
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +254 -4
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +254 -4
- package/dist/plugin.js.map +1 -1
- package/ios/{Plugin → Sources/CapgoCameraPreview}/CameraController.swift +359 -34
- package/ios/{Plugin → Sources/CapgoCameraPreview}/Plugin.swift +307 -16
- package/ios/Tests/CameraPreviewPluginTests/CameraPreviewPluginTests.swift +15 -0
- package/package.json +1 -1
- package/android/src/main/java/com/ahm/capacitor/camera/preview/CameraActivity.java +0 -1279
- package/android/src/main/java/com/ahm/capacitor/camera/preview/CustomSurfaceView.java +0 -29
- package/android/src/main/java/com/ahm/capacitor/camera/preview/CustomTextureView.java +0 -39
- package/android/src/main/java/com/ahm/capacitor/camera/preview/Preview.java +0 -461
- package/android/src/main/java/com/ahm/capacitor/camera/preview/TapGestureDetector.java +0 -24
- package/ios/Plugin/Info.plist +0 -24
- package/ios/Plugin/Plugin.h +0 -10
- package/ios/Plugin/Plugin.m +0 -18
- package/ios/Plugin.xcodeproj/project.pbxproj +0 -593
- package/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
- package/ios/Plugin.xcworkspace/contents.xcworkspacedata +0 -10
- package/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/ios/PluginTests/Info.plist +0 -22
- package/ios/PluginTests/PluginTests.swift +0 -83
- package/ios/Podfile +0 -13
- 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
|