@capacitor-community/camera-preview 3.0.0 → 3.1.0
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 +2 -2
- package/android/src/androidTest/java/com/getcapacitor/android/ExampleInstrumentedTest.java +3 -3
- package/android/src/main/java/com/ahm/capacitor/camera/preview/CameraActivity.java +835 -799
- package/android/src/main/java/com/ahm/capacitor/camera/preview/CameraPreview.java +184 -173
- package/android/src/main/java/com/ahm/capacitor/camera/preview/CustomSurfaceView.java +12 -14
- package/android/src/main/java/com/ahm/capacitor/camera/preview/CustomTextureView.java +16 -18
- package/android/src/main/java/com/ahm/capacitor/camera/preview/Preview.java +327 -323
- package/android/src/main/java/com/ahm/capacitor/camera/preview/TapGestureDetector.java +15 -14
- package/android/src/test/java/com/getcapacitor/ExampleUnitTest.java +4 -3
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/web.d.ts +2 -2
- package/dist/esm/web.js +24 -23
- package/dist/esm/web.js.map +1 -1
- package/ios/Plugin/CameraController.swift +106 -129
- package/ios/Plugin/Plugin.swift +76 -90
- package/ios/PluginTests/PluginTests.swift +8 -8
- package/package.json +27 -2
package/README.md
CHANGED
|
@@ -54,7 +54,7 @@ Open `android/app/src/main/AndroidManifest.xml` and above the closing `</manifes
|
|
|
54
54
|
For more help consult the [Capacitor docs](https://capacitorjs.com/docs/android/configuration#configuring-androidmanifestxml).
|
|
55
55
|
|
|
56
56
|
## Extra iOS installation steps
|
|
57
|
-
You will need to add two permissions to `Info.plist`. Follow the [Capacitor docs](https://capacitorjs.com/docs/ios/configuration#configuring-infoplist) and add permissions with the raw keys `NSCameraUsageDescription` and `NSMicrophoneUsageDescription`.
|
|
57
|
+
You will need to add two permissions to `Info.plist`. Follow the [Capacitor docs](https://capacitorjs.com/docs/ios/configuration#configuring-infoplist) and add permissions with the raw keys `NSCameraUsageDescription` and `NSMicrophoneUsageDescription`. `NSMicrophoneUsageDescription` is only required, if audio will be used. Otherwise set the `disableAudio` option to `true`, which also disables the microphone permission request.
|
|
58
58
|
|
|
59
59
|
## Extra Web installation steps
|
|
60
60
|
Add `import '@capacitor-community/camera-preview'` to you entry script in ionic on `app.module.ts`, so capacitor can register the web platform from the plugin
|
|
@@ -80,7 +80,7 @@ Starts the camera preview instance.
|
|
|
80
80
|
| storeToFile | boolean | (optional) Capture images to a file and return back the file path instead of returning base64 encoded data, default false. |
|
|
81
81
|
| disableExifHeaderStripping | boolean | (optional) Disable automatic rotation of the image, and let the browser deal with it, default true (applicable to the android and ios platforms only) |
|
|
82
82
|
| enableHighResolution | boolean | (optional) Defaults to false - iOS only - Activate high resolution image capture so that output images are from the highest resolution possible on the device |
|
|
83
|
-
| disableAudio | boolean | (optional) Disables audio stream to prevent permission requests, default false. (applicable to web only) |
|
|
83
|
+
| disableAudio | boolean | (optional) Disables audio stream to prevent permission requests, default false. (applicable to web and iOS only) |
|
|
84
84
|
| lockAndroidOrientation | boolean | (optional) Locks device orientation when camera is showing, default false. (applicable to Android only) |
|
|
85
85
|
| enableOpacity | boolean | (optional) Make the camera preview see-through. Ideal for augmented reality uses. Default false (applicable to Android and web only)
|
|
86
86
|
| enableZoom | boolean | (optional) Set if you can pinch to zoom. Default false (applicable to the android and ios platforms only)
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
package com.getcapacitor.android;
|
|
2
2
|
|
|
3
|
+
import static org.junit.Assert.*;
|
|
4
|
+
|
|
3
5
|
import android.content.Context;
|
|
4
6
|
import android.support.test.InstrumentationRegistry;
|
|
5
7
|
import android.support.test.runner.AndroidJUnit4;
|
|
6
|
-
|
|
7
8
|
import org.junit.Test;
|
|
8
9
|
import org.junit.runner.RunWith;
|
|
9
10
|
|
|
10
|
-
import static org.junit.Assert.*;
|
|
11
|
-
|
|
12
11
|
/**
|
|
13
12
|
* Instrumented test, which will execute on an Android device.
|
|
14
13
|
*
|
|
@@ -16,6 +15,7 @@ import static org.junit.Assert.*;
|
|
|
16
15
|
*/
|
|
17
16
|
@RunWith(AndroidJUnit4.class)
|
|
18
17
|
public class ExampleInstrumentedTest {
|
|
18
|
+
|
|
19
19
|
@Test
|
|
20
20
|
public void useAppContext() throws Exception {
|
|
21
21
|
// Context of the app under test.
|