Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cameraclick

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cameraclick - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

35

dist/cameraclick.js

@@ -0,1 +1,2 @@

console.log(`${require('../package.json').name}`, ' - v', require('../package.json').version);
function CameraClick(element, camOptions) {

@@ -28,17 +29,21 @@ let isPlaying = false;

captureBtn.disabled = false;
navigator.getUserMedia({
video: true
}, function (localMediaStream) {
videoWrapper.innerHTML = '';
videoWrapper.appendChild(videoCanvas);
videoCanvas.srcObject = localMediaStream;
mediaTracks = localMediaStream;
window.mediaTracks = mediaTracks;
if (typeof onSuccess === 'function') {
onSuccess(localMediaStream);
}
}, function (error) {
if (typeof onError === 'function') onError(error);
});
if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
navigator.mediaDevices.getUserMedia({
video: true
}).then(function (localMediaStream) {
videoWrapper.innerHTML = '';
videoWrapper.appendChild(videoCanvas);
videoCanvas.srcObject = localMediaStream;
mediaTracks = localMediaStream;
window.mediaTracks = mediaTracks;
if (typeof onSuccess === 'function') {
console.log('rolou');
onSuccess(localMediaStream);
}
}).catch(function (error) {
if (typeof onError === 'function') onError(error);
});
}
};

@@ -92,4 +97,2 @@

Array.from(this.getTracks()).forEach(function (track) {
console.log('track: ', track);
if (track) {

@@ -96,0 +99,0 @@ track.stop();

{
"name": "cameraclick",
"version": "1.1.1",
"version": "1.1.2",
"description": "Simple script to capture images from your browser",

@@ -5,0 +5,0 @@ "files": [

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc