W3C home > Mailing lists > Public > public-webrtc-logs@w3.org > January 2020

Re: [mediacapture-main] How to avoid wide-lens backfacing camera on new phones? (#655)

From: DoDo via GitHub <sysbot+gh@w3.org>
Date: Mon, 13 Jan 2020 17:34:32 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issue_comment.created-573780240-1578936871-sysbot+gh@w3.org>
In general, some web apps might want to perform real-time image processing of the camera stream. Sometimes, the app would need to use the camera with autofocus capability. Currently, it is not possible to specify that (usually a wide-lens camera does not support autofocus, but on some devices it does).

The `focusDistance` constraint should also cover this case, as something similar already exists in [Android Camera API](https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#LENS_INFO_MINIMUM_FOCUS_DISTANCE), where the minimum focus distance of `0` indicates a fixed-focus camera. Also, [iOS has also very similar property](https://developer.apple.com/documentation/avfoundation/avcapturedevice/1624643-lensposition?language=objc). However, at the moment no browser implements this constraint.

Regarding the `focalLength`, the appropriate android property would probably be [available focal lengths](https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#LENS_INFO_AVAILABLE_FOCAL_LENGTHS), while on iOS it would require [some calculation](https://stackoverflow.com/questions/47837935/discrepancy-between-iphones-reported-focal-length-and-values-in-avcapturedevice).

However, would it be possible to implement that feature also in desktop browsers?

-- 
GitHub Notification of comment by DoDoENT
Please view or discuss this issue at https://github.com/w3c/mediacapture-main/issues/655#issuecomment-573780240 using your GitHub account
Received on Monday, 13 January 2020 17:34:33 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:22:36 UTC