Git Product home page Git Product logo

vue-web-cam's Introduction

vue-web-cam

npm npm Contributions welcome License

Webcam component for VueJs. See this for browser compatibility.

Installation

npm install vue-web-cam --save

yarn add vue-web-cam

Usage

import Vue from 'vue'
import WebCam from 'vue-web-cam'

Vue.use(WebCam)
// or
import {WebCam} from 'vue-web-cam'
Vue.component(WebCam.name, WebCam)

Testing & Dev

npm run dev

Props

prop type default notes
height number 500 height of video element
width number 500 width of video element
autoplay boolean true autoplay attribute
screenshotFormat string 'image/jpeg' format of screenshot
deviceId string null currently selected camera

Events

name param notes
started stream emitted once the stream has started
stopped stream emitted once the stream has stopped
error error emitted if the stream failed to start with the error returned
notsupported error emitted when the browser does not support this feature
cameras cameras emitted when a list of all cameras available is loaded
camera-change deviceId emitted when camera change occurs

Methods

name param notes
capture void Capture the current image through the webcam as base64 encoded string
changeCamera deviceId change the currently selected camera. Must pass in the device ID

License

MIT

Credits

This is based off @smronju vue-webcam and react-webcam

vue-web-cam's People

Contributors

bramski avatar riccardogiorato avatar vinceg avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.