getUserMedia is not defined
alexucgit opened this issue · comments
Hi!
I've this error
Error: getUserMedia is not defined. This may mean that the user has declined camera access, or the browser does not support media APIs. If you are running in iOS, you must use Safari.
this is my package.json
{ "name": "pharma", "version": "12.0.0", "license": "PrimeNG Commercial", "scripts": { "ng": "ng", "start": "ng serve --host 192.168.0.20", "build": "ng build", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e" }, "private": true, "dependencies": { "@angular/animations": "~12.0.0", "@angular/cdk": "~12.0.0", "@angular/common": "~12.0.0", "@angular/compiler": "~12.0.0", "@angular/core": "~12.0.0", "@angular/forms": "~12.0.0", "@angular/platform-browser": "~12.0.0", "@angular/platform-browser-dynamic": "~12.0.0", "@angular/router": "~12.0.0", "@eisberg-labs/ngx-barcode-scanner": "2.0.3", "@fortawesome/angular-fontawesome": "^0.9.0", "@fortawesome/fontawesome-svg-core": "^1.2.36", "@fortawesome/free-brands-svg-icons": "^5.15.4", "@fortawesome/free-regular-svg-icons": "^5.15.4", "@fortawesome/free-solid-svg-icons": "^5.15.4", "@fullcalendar/angular": "^5.10.0", "@fullcalendar/core": "^5.8.0", "@fullcalendar/daygrid": "^5.10.0", "@fullcalendar/interaction": "^5.10.0", "@fullcalendar/timegrid": "^5.10.0", "chart.js": "^3.3.2", "dayjs": "^1.10.7", "dcc-utils": "^0.2.0", "primeflex": "^3.0.1", "primeicons": "4.1.0", "primeng": "12.2.0", "prismjs": "1.9.0", "rxjs": "~6.6.0", "tslib": "^2.0.0", "web-animations-js": "^2.3.2", "zone.js": "~0.11.4" }, "devDependencies": { "@angular-devkit/build-angular": "~12.0.0", "@angular/cli": "~12.0.0", "@angular/compiler-cli": "~12.0.0", "@types/jasmine": "~3.6.0", "@types/jasminewd2": "~2.0.8", "@types/node": "^12.11.1", "codelyzer": "^6.0.0", "jasmine-core": "~3.6.0", "jasmine-spec-reporter": "~5.0.0", "karma": "~5.1.0", "karma-chrome-launcher": "~3.1.0", "karma-coverage-istanbul-reporter": "~3.0.3", "karma-jasmine": "~4.0.0", "karma-jasmine-html-reporter": "^1.5.0", "protractor": "~7.0.0", "ts-node": "~8.3.0", "tslint": "~6.1.0", "typescript": "~4.2.3" } }
Browser: Chrome, Safari
Hi alexucgit and thanks for reporting!
Isn't getUserMedia supported https://caniuse.com/stream?
I didn't test it but I think your problem is in running it from localhost
without setting up localhost as allowed insecure origin.
Look at this https://stackoverflow.com/a/58090783/6539315 (I have http://localhost,https://localhost
).
Let me know if this solves your issue, and Ill add it in README.