Video/image out of focus using back camera on Samsung with Media Captu

Hi, not entirely sure if this is the right forum but I’ve tried everything including stackoverflow, but no luck so far. Hoping someone here has any ideas!

I am using the Media Capture and Streams API in an application (the goal is to make a photo of a drivers license). I am running into the problem that using the back facing camera on Samsung phones (I have so far tried the S20 and S22) the camera doesn’t focus correctly (or I should I say at all) and it’s impossible to get a clear photo. Oddly enough, the user facing camera works perfect, which is also the case with the built in camera app (both camera’s)!

I am basically using the code from Taking still photos with getUserMedia() - Web APIs | MDN which can be easily used to reproduce the issue.

PS I have tried using several browsers.

I imagine that is the licenses deliberately has camera blurring effects that the front facing camera overcomes.

I’ve moved this to the Mobile Camera forum

Samsung Developer Relations

Hi Ron, Thank you for the respons and moving this to the appriopriate forum.
Is there any way to resolve this?

PS Just out of curiosity, what is the reasoning behind doing this when accessing the camera from a webpage (and not when accessing it from a regular/native app)?

I can think of several reasons and they all would be speculative and I may be totally wrong :slight_smile:

Samsung Developer Relations

Hello Ron,

Would you mind expanding on those reasons? I am running into the same issue and would love to some different solutions to try. The S22 back facing camera does not seem to respond to the focusMode field being set in the getUserMedia() constraints. Any help or advice would be greatly appreciated!

To prevent fraud and identity theft. I needed to take a picture of my new Drivers license once to verify my ID and it wouldn’t work because of the Holograph luckily a 7 year old Passport worked fine.

Try to take a screen shot of your banking information or take a picture of your banking information on a computer screen. It will come out blurred. There is some PDFs that you can read just fine on your phone or computer but try to print them out and they are readable but are blurry.


Ok so this is a security measure that Samsung has specifically implemented? Older Samsung’s and phones from other manufacturers are not having the similar issues.

You asked me what my speculation was, and I was thinking it was probably a Standards issue but it may be a bug.


1 Like