I'm trying to get cameras working in Chrome on Android, but the request to access them just isn't popping up.
I'm testing using the Example: Webcam template built into Construct. I have a version online over here.
I've tested it with these devices so far:
I am aware there was an issue regarding this recently that was supposedly fixed in r219. Someone else brought it up in December on here.
User Media: work around a spec change in Chrome 47 that broke camera/microphone access
This issue is specific to Chrome. I had a really old version of it on my Nexus 7 (31) and the user request did still appear. After it was updated, it stopped appearing. Requests work fine through the latest version of Firefox on my HTC M8.
Attach a Capx
Description of Capx
Unchanged version of the basic webcam tutorial template built into Construct.
Steps to Reproduce Bug
The status text on the page immediately changes to "Declined!" after you hit the "Get Webcam" button.
A camera request should appear from the Chrome browser.
Operating System and Service Pack
Construct 2 Version ID
Release r221 (64-bit)
This is not a bug: it's actually due to a recent change in Chrome. Due to security concerns, some sensitive features like webcam, microphone and geolocation accesses now require a "secure browsing context". Typically this means HTTPS, but localhost also counts. I assume you are testing with preview-over-wifi with a URL like http://192.168.0.1:50000. The problem is since this is neither localhost nor HTTPS, Chrome treats it as insecure and blocks access to sensitive features. So any requests for sensitive features are immediately declined.
If you publish your app to a HTTPS server, it should work again. However this makes testing more cumbersome. To raise this issue with the Chrome developers I filed this report suggesting that there be an option to disable these restrictions on private IPs, which would make testing easier.
Develop games in your browser. Powerful, performant & highly capable.
Thank you for clearing this up! You're correct, I added an SSL certificate to my testing domain and it's working normally now. My web host is great, so it wasn't difficult to implement at all.
If you see the comments in that report, it appears it's also possible to use the devtools port forwarding feature to enable this. That might help speed up testing. I think it would be easier with a browser flag though, which I'm suggesting to them.