jeromeetienne / AR.js

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

WebcamError NotReadableError Could not start video source on my GalaxyS10 #692

Closed EugeneFitzher closed 4 years ago

EugeneFitzher commented 4 years ago

Hello, I'm using Samsung Galaxy S10 ( G977, QP1A.190711.020 ) version Android 10 and chrome version 79.0.3945.93.

I'm new to webAR, and I'm trying to learn AR.js, but there are errors when I open the every AR websites you suggested to test or fix the following bug and every examples included on ar.js github said: 'Webcam Error Name: NotReadableError, Message: Could not start video source'. (not present in your browser -> solved with https) I found the way that changing camera can solve this problem some cases, but for me, just white site is showing. ( I used these links to try: https://codepen.io/nicolocarpignoli/full/KKwzRdJ => just white sites, CHANGE CAMERA works nothing. https://nicolo-carpignoli-herokuapp.com/select-camera => WebcamError shown first, and when I click 'Switch camera' button, chrome said on status bar: Accessing video input. Touch to return to https:// ~ .' But also white site no contents just 'Switch Camera' and VR button. ) I'm trying to solve this problem, but I can't.

How can I solve it?

Thanks.

pidzvnese commented 4 years ago

I have the same problem, who can help me?

nicolocarpignoli commented 4 years ago

Hi everybody

I guess the problem is the camera, as default Chrome it's picking the wrong camera as the first one.

To verify if it's that: please try any AR.js app with Mozilla Firefox and let us know, if the problems occurs again.

nicolocarpignoli commented 4 years ago

Firefox should make you choose between all of your cameras (or at least 2+) and one of them should be the correct one to use.

nicolocarpignoli commented 4 years ago

So for this problem, this PR is crucial now https://github.com/jeromeetienne/AR.js/pull/661

EugeneFitzher commented 4 years ago

@nicolocarpignoli firefox works fine. https://nicolo-carpignoli.herokuapp.com/select-camera/ You are right. The problem is chrome do not select the camera correctly.

nicolocarpignoli commented 4 years ago

Yes. As a backup for now you can use Firefox. At least until someone makes/fixes that PR

nicolocarpignoli commented 4 years ago

closing this one, there are a lot of duplicates, like: https://github.com/jeromeetienne/AR.js/issues/581

Jaco-Jonker commented 4 years ago

@nicolocarpignoli - I know you closed this thread, but cannot seem to find a solution to allowing Android devices to select a camera through Chrome? I also do not have the option of using Firefox as the new Huawei devices being released does not currently have support for Firefox? Is there a solution to this yet?