Front camera uses IR camera on a Pixel

Hi there

I’m wondering if anyone has run into this issue before, when switching the camera to the Front facing camera in a WebAR experience using a Google Pixel, the camera that is used is the IR camera therefore everything is in grayscale, there doesn’t seem to be an option to tell it to use one or the other, is there any workaround for this issue as I have an app that is going live this week and would love to be able to fix this problem.

Thanks in advance

Hi,

Are you sure it’s using a different camera rather than just displaying in greyscale for some other reason? I wasn’t aware there was a separately addressable IR camera on the Pixel (Pixel 1?).

Can you see if there are two separate front-facing cameras listed by this page?
https://webrtc.github.io/samples/src/content/devices/input-output/

Chrome seemed to return devices in an opposite order to other browsers where the “default” device was at the end of the list, perhaps new versions have switched it round again. Can you let us know the exact Chrome version you’re using too?

Thanks

Simon

Hi Simon,

Just tested the above link you posted these were the results, image

I forgot to mention that the device was a Pixel 4 in my original post. The chrome version is 87.0.4280.101

I have tested this on other android devices and the front camera works as it should, it just seems to be on Google Pixel devices that I experience this issue.

Thanks

Thanks for the info.

I’ve got a Pixel 4A here, but that only shows one camera for each direction.

Unfortunately I don’t think the getUserMedia spec defines any sort of ordering that would allow identifying the “standard” device for front / rear cameras. As I mentioned on most browsers it’s the first in the list, for Chrome on rear-facing devices it seemed to be the one sorted last, but for front-facing ones looks like it’s the one sorted first… :man_facepalming:

Which site is going to be running your experience? https://web.zappar.com or somewhere else?

Thanks for looking into that Simon, it’s a strange one indeed. Yes I will be using https://web.zappar.com to run the experience.

Hi dev2, just wondering if you found a solution to this with google pixel?