AckerApple / ack-angular-webcam

MIT License
37 stars 19 forks source link

MediaDeviceInfo is not defined #56

Open muzeyr opened 3 years ago

muzeyr commented 3 years ago

It works fine when I try it on local computer, When I move prod system I get the following error.

Uncaught ReferenceError: MediaDeviceInfo is not defined at vendor-es2015.js:128087 at Object../node_modules/ack-angular-webcam/webcam.component.js (vendor-es2015.js:128138) at webpack_require__ (runtime-es2015.js:85) at Object../node_modules/ack-angular-webcam/index.js (vendor-es2015.js:127527) at webpack_require (runtime-es2015.js:85) at Module../src/app/app.module.ts (main-es2015.js:207) at webpack_require (runtime-es2015.js:85) at Module../src/main.ts (main-es2015.js:927) at webpack_require__ (runtime-es2015.js:85) at Object.0 (main-es2015.js:948)

Screenshot at Oct 14 08-44-39

AckerApple commented 3 years ago

You must be on https or localhost. It’s a web browser security restriction

muzeyr commented 3 years ago

You must be on https or localhost. It’s a web browser security restriction

There is no SSL certificate on the host I use, Is there any other way to use it

AckerApple commented 3 years ago

You can google till the cows come home. It comes down to: https or localhost.

It’s a security thing. A great read. Look it up or just now: https or localhost

If you need it to work with just one computer you can jump through hoops to create a self assigned certificate and then inject that into the machine(s) you want to use.

Telling you, its how browsers work you cannot get around this