qr-scanner icon indicating copy to clipboard operation
qr-scanner copied to clipboard

pc webcam mirroring problem

Open pmcquay opened this issue 2 years ago • 1 comments

I have a logitech pc webcam, and if I refer to it by ID, the video is not mirrored.

If I refer to it as "environment", the video is mirrored, and if I refer to it as "user" the video is not mirrored. (opposite what the docs say.)

This behaviour exists in the demo page.

Is there a way to specify devices by ID, and also specify a default to the mirroring? I need this to work on phones as well, and I presume that that works correctly, but in our case a webcam will almost always need to be mirrored.

pmcquay avatar Mar 02 '22 19:03 pmcquay

I experienced the same problem, with opposite behaviour on desktop, when selecting a webcam by id. The default facing mode when choosing a webcam by id should be "user" aka mirrored(?), but its mirrored, when its in "environment" mode.

Tested it on mobile and it works there, with the facing modes "environment" for back camera and "user" for front camera.

So I guess this opposite behaviour on desktop is a bug and would be the solution for most cases if it would work like expected, but otherwise you cannot know if the camera is user facing or not, when its just a camera by id, so to have a separate option to control the mirroring, additionally to the current behaviour, would be ideal.

My current solution is a camera selector just like the one in the demo, with both behavioural options ("user" and "environment") + all the cameras found, so the user can choose the desired option. At least if its only one webcam, you can then always get a mirrored view by selecting "environment", which is of course misleading and needs to be fixed.

jaquoh avatar Mar 31 '22 12:03 jaquoh