<scripttype="module"src="https://unpkg.com/camera-component/dist/camera-component/camera-component.esm.js"></script><scriptnomodulesrc="https://unpkg.com/camera-component/dist/camera-component/camera-component.js"></script><camera-componentid="cam"show-preview="true"></camera-component><buttononclick="cam.start()">Open the camera in embedded mode</button><buttononclick="cam.start(1)">Open the camera in a modal</button><script>const cam = document.getElementById('cam');
cam.addEventListener('picture', (e) =>console.log('Picture in base 64:', e.detail));
cam.addEventListener('backButton', () =>console.log('backButton'));
cam.addEventListener('webcamStop', () =>console.log('webcamStop'));
</script>
This is the camera component, ready to start the cam. It works in two different modes: embedded or in a modal.
<camera-componentid="cam"show-preview="true"></camera-component><buttononclick="cam.start()">Open the camera in embedded mode</button><buttononclick="cam.start(1)">Open the camera in a modal</button><script>const cam = document.getElementById('cam');
cam.addEventListener('picture', (e) =>console.log('Picture in base 64:', e.detail));
cam.addEventListener('backButton', () =>console.log('backButton'));
cam.addEventListener('webcamStop', () =>console.log('webcamStop'));
</script>
The npm package camera-component receives a total of 87 weekly downloads. As such, camera-component popularity was classified as not popular.
We found that camera-component demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.It has 1 open source maintainer collaborating on the project.
Package last updated on 20 Dec 2022
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
The planned feature introduces a review step before releases go live, following the Shai-Hulud attacks and a rocky migration off classic tokens that disrupted maintainer workflows.