This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

vue3-camera
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

Vue3 Camera

demo

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

npm install vue3-camera

Usage

  1. Import the Vue3Camera component into your Vue file.

    <script setup lang="ts">
    import Camera from "vue3-camera"
    </script>
  2. Use the Vue3Camera component in your template.

    <template>
        <Camera @on-snapshot="onSnapshot" facing-mode="environment" :grid-line="true" />
    </template>
  3. Handle the event for image capture in your methods.

    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.
<Camera @on-snapshot="onSnapshot"/>

License

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

Contribution

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

Package Sidebar

Install

npm i vue3-camera

Weekly Downloads

5

Version

0.1.3

License

none

Unpacked Size

19.6 kB

Total Files

6

Last publish

Collaborators

  • s18141099