0.0.1-beta.24 • Published 6 years ago

danielleushuis-capacitor-camera-preview v0.0.1-beta.24

Weekly downloads
8
License
MIT
Repository
github
Last release
6 years ago

Capacitor Camera Preview

Build Status

Capacitor plugin that allows camera interaction from Javascript and HTML (based on cordova-plugin-camera-preview)

Releases are being kept up to date when appropriate. However, this plugin is under constant development. As such it is recommended to use master to always have the latest fixes & features.

PR's are greatly appreciated. Maintainer(s) wanted.

Installation

yarn install capacitor-camera-preview

or

npm install capacitor-camera-preview

Methods

start(options)

Starts the camera preview instance.

import { Plugins } from "@capacitor/core"

const { CameraPreviewCapacitor } = Plugins

CameraPreviewCapacitor.start();

Remember to add the style below on your app's HTML or body element:

html, body, .ion-app, .ion-content {
  background-color: transparent;
}

stop()

Stops the camera preview instance.

CameraPreviewCapacitor.stop();

capture()

const result = await CameraPreviewCapacitor.capture();
const base64PictureData = result.value;

// do sometime with base64PictureData

Demo

pending

0.0.1-beta.24

6 years ago

0.0.1-beta.23

6 years ago

0.0.1-beta.22

6 years ago

0.0.1-beta.21

6 years ago

0.0.1-beta.20

6 years ago

0.0.1-beta.19

6 years ago

0.0.1-beta.18

6 years ago

0.0.1-beta.17

6 years ago

0.0.1-beta.16

6 years ago

0.0.1-beta.15

6 years ago

0.0.1-beta.14

6 years ago

0.0.1-beta.13

6 years ago

0.0.1-beta.12

6 years ago

0.0.1-beta.11

6 years ago

0.0.1-beta.10

6 years ago

0.0.1-beta.9

6 years ago

0.0.1-beta.8

6 years ago

0.0.1-beta.7

6 years ago

0.0.1-beta.6

6 years ago

0.0.1-beta.5

6 years ago