@capacitor-community/camera-preview
Advanced tools
Comparing version 2.0.0 to 2.1.0
{ | ||
"name": "@capacitor-community/camera-preview", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "Camera preview", | ||
@@ -5,0 +5,0 @@ "main": "dist/esm/index.js", |
@@ -80,6 +80,7 @@ <p align="center"><br><img src="https://user-images.githubusercontent.com/236501/85893648-1c92e880-b7a8-11ea-926d-95355b8175c7.png" width="128" height="128" /></p> | ||
| 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) | | ||
| 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 | | ||
| disableAudio | boolean | (optional) Disables audio stream to prevent permission requests, default false. (applicable to web only) | | ||
| lockAndroidOrientation | boolean | (optional) Locks device orientation when camera is showing, default false. (applicable to Android only) | | ||
| enableOpacity | boolean | (optional) Make the camera preview see-through. Ideal for augmented reality uses. Default false (applicable to Android and web only) | ||
| enableZoom | boolean | (optional) Set if you can pinch to zoom. Default false (applicable to Android only) | ||
| enableZoom | boolean | (optional) Set if you can pinch to zoom. Default false (applicable to the android and ios platforms only) | ||
@@ -102,5 +103,3 @@ <!-- <strong>Options:</strong> | ||
```javascript | ||
import { Plugins } from "@capacitor/core" | ||
const { CameraPreview } = Plugins; | ||
import { CameraPreviewOptions } from '@capacitor-community/camera-preview'; | ||
import { CameraPreview, CameraPreviewOptions } from '@capacitor-community/camera-preview'; | ||
@@ -122,2 +121,3 @@ const cameraPreviewOptions: CameraPreviewOptions = { | ||
``` | ||
Take into account that this will make transparent all ion-content on application, if you want to show camera preview only in one page, just add a custom class to your ion-content and make it transparent: | ||
@@ -131,2 +131,19 @@ | ||
If the camera preview is not displaying after applying the above styles, apply transparent background color to the root div element of the parent component | ||
Ex: VueJS >> App.vue component | ||
```html | ||
<template> | ||
<ion-app id="app"> | ||
<ion-router-outlet /> | ||
</ion-app> | ||
</template> | ||
<style> | ||
#app { | ||
background-color: transparent !important; | ||
} | ||
<style> | ||
``` | ||
### stop() | ||
@@ -181,3 +198,3 @@ | ||
```javascript | ||
import { CameraPreviewFlashMode } from '@capacitor-community/camera-preview'; | ||
import { CameraPreviewPictureOptions } from '@capacitor-community/camera-preview'; | ||
@@ -184,0 +201,0 @@ const cameraPreviewPictureOptions: CameraPreviewPictureOptions = { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
321352
430
3