0.0.1-beta.24 • Published 5 years ago

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

Weekly downloads
8
License
MIT
Repository
github
Last release
5 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

5 years ago

0.0.1-beta.23

5 years ago

0.0.1-beta.22

5 years ago

0.0.1-beta.21

5 years ago

0.0.1-beta.20

5 years ago

0.0.1-beta.19

5 years ago

0.0.1-beta.18

5 years ago

0.0.1-beta.17

5 years ago

0.0.1-beta.16

5 years ago

0.0.1-beta.15

5 years ago

0.0.1-beta.14

5 years ago

0.0.1-beta.13

5 years ago

0.0.1-beta.12

5 years ago

0.0.1-beta.11

5 years ago

0.0.1-beta.10

5 years ago

0.0.1-beta.9

5 years ago

0.0.1-beta.8

5 years ago

0.0.1-beta.7

5 years ago

0.0.1-beta.6

5 years ago

0.0.1-beta.5

5 years ago