easy-js-camera
Advanced tools
Comparing version 1.0.10 to 1.0.11
{ | ||
"name": "easy-js-camera", | ||
"version": "1.0.10", | ||
"version": "1.0.11", | ||
"description": "A package which helps with adding camera support to a web application", | ||
@@ -5,0 +5,0 @@ "main": "src/Camera.js", |
@@ -73,3 +73,3 @@ import CameraModel from "./CameraModel"; | ||
await this.getDevices(); | ||
console.log('Constraints', this.constraints); | ||
console.log('Constraints', this.constraints.getConstraint()); | ||
let stream = await navigator.mediaDevices.getUserMedia(this.constraints.getConstraint()); | ||
@@ -90,4 +90,2 @@ this.videoElement.srcObject = stream; | ||
tracks.forEach(track => track.stop()); | ||
this.videoElement.srcObject = null; | ||
this.stream = null; | ||
} | ||
@@ -94,0 +92,0 @@ switch() { |
7170
120