jeromeetienne / AR.js

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

Camera permission not granted #548

Closed nicolocarpignoli closed 5 years ago

nicolocarpignoli commented 5 years ago

I found this problem with last chrome (75) and also latest Safari

image

Important: there is no debug log on console, and the problem has suddenly shown up only in Desktop Browsers: fortunately on android (with chrome 75, so latest one) still works.

Did anyone experienced this as well?

It breaks codepen example on Readme of AR.js and other AR.js apps that were working last days.

nicolocarpignoli commented 5 years ago

I have problems also in local environment, with or withouth HTTPS makes no difference

nicolocarpignoli commented 5 years ago

examples: on github.io https://jeromeetienne.github.io/AR.js/three.js/examples/mobile-performance.html

on codepen: https://codepen.io/nicolocarpignoli/pen/vMBgob

nicolocarpignoli commented 5 years ago

broken webcam! better this way🙂

iggykov commented 5 years ago
Screenshot 2019-07-08 at 19 35 09

Hi Nicolo! I have a similar problem when clicking learn new marker area. Do you know how to overcome this?

iggykov commented 5 years ago

in my browser the link with the hiro marker works very well: ---> examples: on github.io https://jeromeetienne.github.io/AR.js/three.js/examples/mobile-performance.html

but this one has the issue: MarkersAreaEmabled :false ---> on codepen: https://codepen.io/nicolocarpignoli/pen/vMBgob nothing happens, no objects appear on the marker

nicolocarpignoli commented 5 years ago

some things to try:

iggykov commented 5 years ago

Hey Nicolo! Thanks for your answer. It means a lot to me, since I am a total beginner with programming and it is not easy to start, becouse I feel like I am annoying everyone around with basic questions :).

So for the link: https://codepen.io/nicolocarpignoli/pen/vMBgob


Answering your other Q:


In addition I copied the code from https://codepen.io/nicolocarpignoli/pen/vMBgob to SublimeText, saved as index.html and opened it locally with all 3 browsers. Here the effect:

Webcam Error Name: NotAllowedError Message: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.


P.S. Maybe it is a different topic, but I wonder if you could give me some guidance on this: What is this message on the screen:

MarkersAreaEnabled :false

What does this mean? Additionally I noticed that it disappears, when i try to put a 'custom' marker... Then there are some buttons like:

Do you know any link that explains this features to beginners?

nicolocarpignoli commented 5 years ago

For the last question, use this <a-scene embedded arjs='sourceType: webcam; debugUIEnabled: false; > instead of the a-scene currently used. this will disable debug buttons and text.

For the safari error, it is strange, safari should asks you camera permission at any website refresh.

Chrome works for me also. Which device are you using? I suggest you to run the example on smartphone and show hiro marker on screen (laptop or whatever)