Closed Epikos1994 closed 6 years ago
Seems to work fine here on a Huawei Honor:
What device(s) and browser(s) are you having problems with?
Tested with a Samsung J5 and a Samsung Note 4.
Mainly testing with the Note 4. Android v6.0.1
Playcanvas shows, loads, completes and then this screen.
And you never see the dialog asking for permission to use the camera? What do you see if you go to http://get.webgl.org? Can you remote debug the problem device(s) and get the JavaScript console output?
Nope, No Dialog asking about the camera.
I can, however, dont have access to pc atm. I'll take a look when so.
Wait. There’s no lock on your browser when viewing the app. Does that mean you’re not viewing the link over https? Https is required for camera access.
Ive just checked. Still the same issue. I tried incognito also to see if there were possible cache settings or something. But the only permissions the page says it has/needed are for sound.
Also reset page settings and data. No luck.
Ill send a screenshot when I get to a pc.
I have the same issue on Xiaomi Redmi 3, Android 5.1.1. Although I get camera dialog on the first try, after confirming it the screen is grey. On subsequent tries there is no camera dialog, only grey screen.
Will try to clone this project, build my custom version and debug it.
OK, let me know what you find out. 😄
Ok, here are some findings:
It also may be the issue with getting input from device camera, since placing AR marker in front of it doesn't fire up the cube - so seems like the script doesn't see camera input and can't process it
Sorry haven't been active. On holiday atm. I'll be back on Thursday to help out.
Gl
Another finding - removing calibration .dat file from ArCamera script attribute seems to break desktop version in the same way as it's currently broken on my android - i.e. it just loads to dark grey and doesn't do anything. May be there is an issue with camera calibration file on some androids?
I've found the culprit: ArCamera.prototype.enterAr :: navigator.mediaDevices.getUserMedia(constraints).then(function (stream) {...}) - the code flow doesn't reach inside this callback. No error is caught though.
EDIT: Actually, there is a error - unable to acquire camera stream. Error logging was just broken in .catch branch.
Hmm. Are you able to run any non-PlayCanvas apps on your device that use getUserMedia? For example:
https://webrtc.github.io/samples/src/content/getusermedia/gum/
Nope, getting NotReadableError at this link. Seems like hardware / os issue with my device.
Hmm. Seems so. Weird.
Hey Gents,
So I've been looking around and testing some things out. This looks like an issue for Chrome.
I tested the app using Samsung internet and I get the request to access camera and the app works fine. (However it was using my front camera)
I'll keep digging some more and let you know what I find.
If this is a Chrome bug (regression?), then you might want to report it on:
https://bugs.chromium.org/p/chromium/issues/list
They're normally quite responsive.
It works in Firefox for me, so seems like Chrome issue indeed.
Hey Guys,
It's now working on Chrome. Believe this is Issue fixed?
Thanks, Dean
Thanks for the update. Closing...
Currently having an issue getting the camera to work on Android devices. The play canvas app launches and then just shows a grey/blue screen. This is also reproducible in the demo example you provided.
I tried adding a UI to see if the app wasn't launching at all but I could see it. So it looks like an issue with init/rendering the camera from the device?
I'll test IOS when I get the chance.
I tried looking around in the source to see if I could identify the problem, but no luck. Just moved to PlayCanvas from Unity, Loving working with AR so far. Fun and easy to play around with.
Any help would be appreciated. Thanks.