Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker: camera cannot be used in embedded sample application #126

Open
ptitzler opened this issue Apr 2, 2020 · 1 comment
Open

Docker: camera cannot be used in embedded sample application #126

ptitzler opened this issue Apr 2, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@ptitzler
Copy link
Contributor

ptitzler commented Apr 2, 2020

The console log contains the following error message if a browser is used that requires a secure context to access navigator.mediaDevices as documented here https://developer.mozilla.org/en-US/docs/Web/API/Navigator/mediaDevices

webapp.js:179 Uncaught TypeError: Cannot read property 'getUserMedia' of undefined
    at HTMLButtonElement.runWebcam (webapp.js:179)
    at HTMLButtonElement.dispatch (jquery-3.3.1.min.js:2)
    at HTMLButtonElement.y.handle (jquery-3.3.1.min.js:2)
@ptitzler ptitzler added the bug Something isn't working label Apr 2, 2020
@ajbozarth
Copy link
Member

Making a note here after a convo with @ptitzler over slack. This error is thrown by all browsers (in some manner) when hitting the http url of the web app. This does not occur if you hit the https url. Users can bypass this in their browser using developer tools/settings though (method differs by browser). This is a security feature and cannot be solved "server-side" in the web app code, only "client-side" in a browser.

A "solution" to this may be to disable the button or add a dialog of some sort if the web app is loaded on http

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants