Webcam is not defined
Getting the following error when trying to use this library with AngularJS front-end
ReferenceError: Webcam is not defined
at o (http://localhost:3000/public/client/myapp/main.js:13705:457)
at http://localhost:3000/public/client/common/vendor.js:45:1323
at ne (http://localhost:3000/public/client/common/vendor.js:45:1380)
at _ (http://localhost:3000/public/client/common/vendor.js:44:27893)
at s (http://localhost:3000/public/client/common/vendor.js:44:23955)
at _ (http://localhost:3000/public/client/common/vendor.js:44:27842)
at http://localhost:3000/public/client/common/vendor.js:44:31387
at http://localhost:3000/public/client/common/vendor.js:45:22614
at p.e.$get.p.$eval (http://localhost:3000/public/client/common/vendor.js:45:29824)
at p.e.$get.p.$digest (http://localhost:3000/public/client/common/vendor.js:45:28397)
Any ideas?
-- A
Hi @atif,
You have to import script webcam.js. You should have it in your bower dependencies because it's required for ng-camera.
<script src="/path/to/webcam.js"></script>
@bcabanes : I have included both webcam, and ng-camera in bower dependencies. Still getting above error
Had the save issue when loading it in Electron. Include it as follow:
<script type="text/javascript" src="vendors/webcamjs/webcam.min.js" onload="window.Webcam = module.exports;"></script>