jeromeetienne / AR.js

Efficient Augmented Reality for the Web - 60fps on mobile!
MIT License
15.79k stars 2.22k forks source link

Only secure origins allowed error #151

Closed kumarahir closed 7 years ago

kumarahir commented 7 years ago

On hosting the starter AR code from below link https://aframe.io/blog/arjs/ and opening the url in Lenovo X3 following error is thrown

Webcam Error Name:NotSupportedError Message: Only secure origins are allowed (see:https://goo.gl/Y0ZkNV)

Environment Hosting: Wamp server on local machine Mobile: Lenovo X3 OS: Android 5.1.1 Chrome browser 59.0

Following url is working perfectly fine https://jeromeetienne.github.io/AR.js/three.js/examples/mobile-performance.html

kumarahir commented 7 years ago

Opening following urls on same mobile platform is giving the same error https://rawgit.com/jeromeetienne/AR.js/dev/three.js/examples/dev.html https://rawgit.com/jeromeetienne/AR.js/dev/three.js/examples/mobile-performance.html

tetreault commented 7 years ago

so are you hosting it on a server behind HTTPS? all the above links work for me. @kumarahir

kumarahir commented 7 years ago

Am hosting it on my local machine and accessing the url via local network only.

tetreault commented 7 years ago

you need HTTPS to access userMedia

kumarahir commented 7 years ago

yes got that. I setup SSL on my local server and now it's working fine on local server.

As far as the working of mentioned links goes, I didn't use https in the url. After using https they are working fine too.