โ ๏ธ - In active development: This library has yet to fulfill its promise and may change its API without warning, use with caution.
Use any device's camera (screenshot) capabilities from the browser with a single utility with a single API.
- Integrate on any frontend. Vanilla JS, React, Vue, Angular, Svelte... - No need to have a separate interface/package for each framework you support.
- Easily add to your project from the CDN. It should be easy for integrators to use your library.
- Written in Typescript, framework agnostic.
npm i --save @ez-pz/simple-camera
Include the script and styles in your html:
<script src="https://unpkg.com/@ez-pz/simple-camera/dist/simple-camera.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/@ez-pz/simple-camera/dist/simple-camera.css"></link>
and then start the camera with
<script>
var target = document.getElementById("target");
window["ez-pz-simple-camera"].startCamera(target);
</script>
See https://codesandbox.io/s/simple-camera-no-framework-demo-0qbuv
- Development: Typescript, Storybook
- Testing: Jest, testing-library
- Bundling: Rollup
- Clone the repo
git clone https://github.com/jospablos/simple-camera.git
- Install deps
npm i
- Start test watching
npm run test:watch
- Run Storybook
npm run storybook
If you want to contribute, Take a look a the V1 project kanban and pick any task :) https://github.com/jospablos/simple-camera/projects/1