# vue3-camera

> ![demo](./demo.jpg)

Latest version **0.1.3** (published 2023-11-21) · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install vue3-camera
pnpm add vue3-camera
yarn add vue3-camera
bun add vue3-camera
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2023-11-21 |
| First published | 2023-11-21 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 19.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | s18141099 |
| Keywords | vue, vue3, camera, webcam, webcamera |

## Links

- npm: https://www.npmjs.com/package/vue3-camera
- Repository: https://github.com/s18141099/vue3-camera
- Homepage: https://github.com/s18141099/vue3-camera#readme
- Issues: https://github.com/s18141099/vue3-camera/issues
- npm.io page: https://npm.io/package/vue3-camera

## Dependencies (2)

- [vue](https://npm.io/package/vue.md) ^3.3.4
- [vite-plugin-css-injected-by-js](https://npm.io/package/vite-plugin-css-injected-by-js.md) ^3.3.0

## Recent versions

- 0.1.3 (latest) — 2023-11-21
- 0.1.2 — 2023-11-21
- 0.1.1 — 2023-11-21
- 0.1.0 — 2023-11-21

## README

# Vue3 Camera

![demo](./demo.jpg)

## Introduction

**vue3-camera** is a simple Vue 3 component designed to integrate webcam functionality into Vue applications.
Easily capture images from the user's webcam with minimal configuration.

## Features

- **Easy Integration**: Seamlessly integrate webcam functionality into your Vue 3 projects.
- **Capture Images**: Capture images from the user's webcam.
- **Customizable**: Customize the component to fit your application's styling and requirements.

## Installation

```bash
npm install vue3-camera
```

## Usage

1. Import the `Vue3Camera` component into your Vue file.

    ```ts
    <script setup lang="ts">
    import Camera from "vue3-camera"
    </script>
    ```

2. Use the `Vue3Camera` component in your template.

    ```html
    <template>
        <Camera @on-snapshot="onSnapshot" facing-mode="environment" :grid-line="true" />
    </template>
    ```

3. Handle the event for image capture in your methods.

    ```ts
    const onSnapshot = (base64: string) => {
        console.log(base64)
    }
    ```

## Props

- **facing-mode**: "environment" | "user" (default: "environment").
- **grid-line**: boolean.

## Events

- **on-snapshot**: Triggered when an image is captured. Returns the captured image data.

```html
<Camera @on-snapshot="onSnapshot"/>
```

## License

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.

## Contribution

Contributions are welcome! Please open an issue or submit a pull request.

---
_Source: https://npm.io/package/vue3-camera · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
