@ruanitto/capacitor-camera-preview
Advanced tools
Comparing version 1.0.8 to 1.1.1
@@ -30,3 +30,5 @@ declare module "@capacitor/core" { | ||
export interface CameraPreviewPictureOptions { | ||
/** The picture height, optional, default 0 (Device default) */ | ||
height?: number; | ||
/** The picture width, optional, default 0 (Device default) */ | ||
width?: number; | ||
@@ -33,0 +35,0 @@ /** The picture quality, 0 - 100, default 85 */ |
{ | ||
"name": "@ruanitto/capacitor-camera-preview", | ||
"version": "1.0.8", | ||
"version": "1.1.1", | ||
"description": "Camera preview", | ||
@@ -5,0 +5,0 @@ "main": "dist/esm/index.js", |
@@ -43,11 +43,15 @@ # Capacitor Camera Preview | ||
``` | ||
yarn add @ruanitto-capacitor-community/camera-preview | ||
yarn add @capacitor-community/camera-preview | ||
or | ||
npm install @ruanitto-capacitor-community/camera-preview | ||
npm install @capacitor-community/camera-preview | ||
``` | ||
#### Android Quirks | ||
On Android remember to add the plugin to `MainActivity` | ||
```java | ||
import com.ahm.capacitor.camera.preview.CameraPreview; | ||
this.init(savedInstanceState, new ArrayList<Class<? extends Plugin>>() {{ | ||
@@ -61,3 +65,3 @@ // Additional plugins you've installed go here | ||
#### Web Quirks | ||
Add `import '@ruanitto-capacitor-community/camera-preview'` to you entry script in ionic on `app.module.ts`, so capacitor can register the web platform from the plugin | ||
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 | ||
<!-- | ||
@@ -135,7 +139,14 @@ #### iOS Quirks | ||
```css | ||
html, body, .ion-app, .ion-content { | ||
background-color: transparent; | ||
ion-content { | ||
--background: transparent; | ||
} | ||
``` | ||
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 cutom class to your ion-content and make it transparent: | ||
```css | ||
.my-custom-camera-preview-content { | ||
--background: transparent; | ||
} | ||
``` | ||
### stop() | ||
@@ -184,2 +195,4 @@ | ||
| quality | number | (optional) The picture quality, 0 - 100, default 85 | | ||
| width | number | (optional) The picture width, default 0 (Device default) | | ||
| height | number | (optional) The picture height, default 0 (Device default) | | ||
@@ -391,2 +404,2 @@ <!-- <info>Take the picture. If width and height are not specified or are 0 it will use the defaults. If width and height are specified, it will choose a supported photo size that is closest to width and height specified and has closest aspect ratio to the preview. The argument `quality` defaults to `85` and specifies the quality/compression value: `0=max compression`, `100=max quality`.</info><br/> --> | ||
pending | ||
A working example can be found at [Demo](https://github.com/capacitor-community/camera-preview/tree/master/demo) |
Sorry, the diff of this file is not supported yet
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
307802
178
401