Closed hujiajie8002 closed 2 years ago
@hujiajie8002 Please check these links, one is the apache virtualhost with port setup, one is problem with http not allowing you to access camera. https://www.atlantic.net/vps-hosting/host-multiple-websites-on-a-single-server-with-apache-on-ubuntu-18-04/ https://stackoverflow.com/questions/60957829/navigator-mediadevices-is-undefined/66605018#66605018
I believe, your problem is from the camera. If you host it without https, default settings don't allow you to access camera. You can use firefox to set true to media.devices.insecure.enabled
and media.getusermedia.insecure.enabled
. Then it should work.
If you are not on localhost you must serve the webpage over HTTPS for security reasons as mentioned above. This is required by all modern web browsers for camera / mic access etc. I have a live working demo here as reference: https://glitch.com/~disappearing-people
@zcemycl @jasonmayes You're a great help! God bless you.
Most welcome! Happy hacking
I have put it in my webserver apache ,but it doesn‘t work when i open the url by chrome or safari and it real confuse me