Issue 343894 in chromium: Enable focus within getUserMedia()

627 views
Skip to first unread message

chro...@googlecode.com

unread,
Feb 14, 2014, 9:29:14 AM2/14/14
to chromi...@chromium.org
Status: Unconfirmed
Owner: ----
Labels: Cr-Internals-Media Pri-2 Via-Wizard Type-Bug OS-Linux

New issue 343894 by torben.f...@googlemail.com: Enable focus within
getUserMedia()
http://code.google.com/p/chromium/issues/detail?id=343894

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like
Gecko) Ubuntu Chromium/31.0.1650.63 Chrome/31.0.1650.63 Safari/537.36

Example URL:
http://shinydemos.com/qr-code/

Steps to reproduce the problem:
1. Setup a video stream with getUserMedia()
2. Place camera really close to something
3. See blurriness

What is the expected behavior?
Like in native mobile Apps it should be possible to trigger the autofocus
for given coordinates, e.g. on touch.

What went wrong?
The ability to trigger the autofocus is missing.

Did this work before? No

Is it a problem with Flash or HTML5? HTML5

Does this work in other browsers? N/A

Chrome version: 31.0.1650.63 Channel: stable
OS Version: ubuntu0.13.04.1~20131204.1
Flash Version: Shockwave Flash 11.0 r1

Tested with Lenovo X220 and Samsung Galaxy S3.

Usecase: A QR-code scanner, trying to scan e.g. 10x10mm codes.

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

chro...@googlecode.com

unread,
Feb 20, 2014, 12:24:29 PM2/20/14
to chromi...@chromium.org
Updates:
Status: Available
Cc: jub...@chromium.org nik...@chromium.org ser...@chromium.org
jan...@chromium.org tnak...@chromium.org
Labels: -Type-Bug Type-Feature

Comment #3 on issue 343894 by tnak...@chromium.org: Enable focus within
getUserMedia()
http://code.google.com/p/chromium/issues/detail?id=343894

(No comment was entered for this change.)

chro...@googlecode.com

unread,
Feb 26, 2014, 11:16:20 PM2/26/14
to chromi...@chromium.org

Comment #4 on issue 343894 by m...@sowbug.com: Enable focus within
getUserMedia()
http://code.google.com/p/chromium/issues/detail?id=343894

See
https://chrome.google.com/webstore/detail/scanqr/nihhbejdflkeingkkpakffdlmepaeaah
for an example of a Chrome App that could really stand to benefit from this
enhancement.

chro...@googlecode.com

unread,
Nov 13, 2014, 4:33:56 AM11/13/14
to chromi...@chromium.org
Updates:
Labels: -Cr-UI OS-Chrome OS-Android

Comment #7 on issue 343894 by mca...@chromium.org: Enable focus within
getUserMedia()
https://code.google.com/p/chromium/issues/detail?id=343894

a) the current WebRTC JS API is quite bare-bones when it comes to Camera
control features. Moreover, the underlying signalling flow from Renderer to
Browser side is reduced to operational start/stop like commands,
essentially. (NB: there's new code under review for picture taking).

b) Android Video Capture does not implement auto focus. IIRC, AutoFocus is
continuously doing so while on Preview. Btw Camera2 code is in the making
[1], so this is the perfect time for suggestions :)

c) The App in #4 refers to a CrOs, in this case the cameras follow UVC
model and should be on continuous auto focus. I'd recommend trying with an
external USB camera; perhaps the internals do not have the good parameters
for macro.

PS: I see in #1: "Chrome version: 31.0.1650.63" <-- it needs update.

[1] http://crrev.com/611283002 f.i.

chro...@googlecode.com

unread,
Nov 13, 2014, 4:59:42 AM11/13/14
to chromi...@chromium.org

Comment #8 on issue 343894 by torben.f...@googlemail.com: Enable focus
within getUserMedia()
https://code.google.com/p/chromium/issues/detail?id=343894

a) Suggesting a spec update :) Actually tried already to get some spec
people onto the topic… There are more related ideas, like controlling the
flash, when available.

b) The issue is not Android specific. I would like to be able to use the
camera of my laptop to scan bar/qr codes as well.

Unfortunately I cannot update my own issues o.O But the issue still exists
in 40.0.2209.0

chro...@googlecode.com

unread,
Nov 14, 2014, 1:30:38 AM11/14/14
to chromi...@chromium.org

Comment #9 on issue 343894 by vang...@chromium.org: Enable focus within
getUserMedia()
https://code.google.com/p/chromium/issues/detail?id=343894

mcasas@, regarding (b) as far as I can tell from the documentation
(http://developer.android.com/reference/android/hardware/Camera.Parameters.html)
even the now deprecated Camera API on Android supports auto-focus (via
Parameters.FOCUS_MODE_CONTINUOUS_VIDEO). Could it be as easy as adding
that param somewhere near:
https://code.google.com/p/chromium/codesearch#chromium/src/media/base/android/java/src/org/chromium/media/VideoCaptureCamera.java&l=172 ?

chro...@googlecode.com

unread,
Nov 19, 2014, 8:41:26 PM11/19/14
to chromi...@chromium.org
Updates:
Labels: M-41

Comment #13 on issue 343894 by tnak...@chromium.org: Enable focus within
getUserMedia()
https://code.google.com/p/chromium/issues/detail?id=343894

mcasas@ - can this be considered fixed with r304909?

chro...@googlecode.com

unread,
Nov 20, 2014, 9:19:00 AM11/20/14
to chromi...@chromium.org

Comment #16 on issue 343894 by bugdro...@chromium.org: Enable focus within
getUserMedia()
https://code.google.com/p/chromium/issues/detail?id=343894#c16

The following revision refers to this bug:

https://chromium.googlesource.com/chromium/src.git/+/ee8c7cac097f864b19d69dcabd6782e4d8c793dd

commit ee8c7cac097f864b19d69dcabd6782e4d8c793dd
Author: tommi <to...@chromium.org>
Date: Thu Nov 20 14:17:07 2014

Revert of Set camera parameters continuous focus mode on (patchset #1 id:1
of https://codereview.chromium.org/737003003/)

Reason for revert:
Looks like this is causing MANUAL_CanAcquireVgaOnRealWebcam to fail.

Original issue's description:
> Android Video Capture: Set continuous focus mode on in cam parameters.

> This is, apparently, needed for macro modes, although
> autofocus seems to work ok in general.

> BUG=343894
> TEST=Please refer to the bug, basically a gUM() + close QR codes focus
> test.

> Committed: https://crrev.com/667e79783dd2bbd413b165abfd7fae2bfa3210d5
> Cr-Commit-Position: refs/heads/master@{#304909}

TBR=qin...@chromium.org,mca...@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=343894

Review URL: https://codereview.chromium.org/740363002

Cr-Commit-Position: refs/heads/master@{#305009}

[modify]
http://crrev.com/ee8c7cac097f864b19d69dcabd6782e4d8c793dd/media/base/android/java/src/org/chromium/media/VideoCaptureCamera.java

chro...@googlecode.com

unread,
Nov 20, 2014, 7:40:47 PM11/20/14
to chromi...@chromium.org

Comment #17 on issue 343894 by bugdro...@chromium.org: Enable focus within
getUserMedia()
https://code.google.com/p/chromium/issues/detail?id=343894#c17

The following revision refers to this bug:

https://chromium.googlesource.com/chromium/src.git/+/0910435eba14f433438ed2e448a67e799e851bdd

commit 0910435eba14f433438ed2e448a67e799e851bdd
Author: mcasas <mca...@chromium.org>
Date: Fri Nov 21 00:10:59 2014

Android video capture: Set camera parameters continuous focus mode on,
where supported

This is, apparently, needed for macro modes, although autofocus seems to
work ok in general.

A similar CL was landed and reverted (http://crrev.com/737003003). This CL
is an alternative where the supported focus modes are tested before being
set in the Camera.Parameters.

BUG=343894
TEST=Please refer to the bug, basically a gUM() + close text or QR codes
focus test.

Review URL: https://codereview.chromium.org/744193002

Cr-Commit-Position: refs/heads/master@{#305117}

[modify]
http://crrev.com/0910435eba14f433438ed2e448a67e799e851bdd/media/base/android/java/src/org/chromium/media/VideoCaptureCamera.java

chro...@googlecode.com

unread,
Nov 24, 2014, 7:22:22 PM11/24/14
to chromi...@chromium.org

Comment #18 on issue 343894 by bugdro...@chromium.org: Enable focus within
getUserMedia()
https://code.google.com/p/chromium/issues/detail?id=343894#c18

The following revision refers to this bug:

https://chromium.googlesource.com/chromium/src.git/+/d4bc57e27767335584181a8ec7918f9f19ff72e0

commit d4bc57e27767335584181a8ec7918f9f19ff72e0
Author: mcasas <mca...@chromium.org>
Date: Mon Nov 24 23:37:44 2014

Android Video Capture: Rename L with LOLLIPOP in Version check.

BUG=343894
TBR=qin...@chromium.org, acl...@chromium.org

Review URL: https://codereview.chromium.org/756773002

Cr-Commit-Position: refs/heads/master@{#305520}

[modify]
http://crrev.com/d4bc57e27767335584181a8ec7918f9f19ff72e0/media/base/android/java/src/org/chromium/media/VideoCaptureFactory.java

chro...@googlecode.com

unread,
Mar 29, 2015, 2:01:19 AM3/29/15
to chromi...@chromium.org

Comment #21 on issue 343894 by r...@21.co: Enable focus within
getUserMedia()
https://code.google.com/p/chromium/issues/detail?id=343894

I am building a PDF417 scanner based on getUserMedia() however have found
noise to be an issue and having the ability to focus or set focal point
would likely enable this solution to work but without it I fear it wont.
Please consider providing a way to do this with getUserMedia also.

chro...@googlecode.com

unread,
Mar 29, 2015, 2:02:19 AM3/29/15
to chromi...@chromium.org

Comment #22 on issue 343894 by ryan.hu...@gmail.com: Enable focus within
Reply all
Reply to author
Forward
0 new messages