cmusatyalab / openface

Face recognition with deep neural networks.
http://cmusatyalab.github.io/openface/
Apache License 2.0
15.15k stars 3.6k forks source link

Make web demo secure because of Chrome's deprecation of powerful features on insecure origins #75

Closed bamos closed 7 years ago

bamos commented 8 years ago

Original mailing list post: https://groups.google.com/forum/#!topic/cmu-openface/TNZR_QVR8Nc

When I try to use the web demo connecting to a Docker container, I get the following message:

getUserMedia() no longer works on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details.

They suggest three workarounds:

  1. localhost is treated as a secure origin over HTTP, so if you're able to run your server from localhost, you should be able to test the feature on that server.
  2. You can run chrome with the --unsafely-treat-insecure-origin-as-secure="example.com" flag (replacing "example.com" with the origin you actually want to test), which will treat that origin as secure for this session. Note that you also need to include the --user-data-dir=/test/only/profile/dir to create a fresh testing profile for the flag to work.
  3. Use secure protocols
barrettclark commented 8 years ago

I've generated the certs for https and wss connections so that I could make calls on the same network from different computers (similar to docker on OS X), but self-signed certs did not appear to be good enough for the getUserMedia() calls. I'll post an update if I chase this down further.

Tom-Neverwinter commented 8 years ago

https://www.kirupa.com/html5/accessing_your_webcam_in_html5.htm This may be a good place to start

SalehAly commented 7 years ago

Hey,

I have found another solution to the getUserMedia issue on OSX from this answer here. where you can run the demo from your localhost:8000

you can execute this commands from your terminal which adds a VirtualBox port forward to map a port on the docker host to your local machine

vboxmanage controlvm default natpf1 "nameformapping,tcp,,8000,,8000"
vboxmanage controlvm default natpf1 "nameformapping2,tcp,,9000,,9000"

Or you can open VirtualBox

1- Click on your docker machine 
2- Go To Settings -> Network -> Port Forwarding
3- add the port mapping rules 
screen shot 2017-03-15 at 3 18 58 pm
stale[bot] commented 7 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.