New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 814298 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

LG G6 selects back facing camera (environment) by default

Reported by dagi...@gmail.com, Feb 21 2018

Issue description

Steps to reproduce the problem:
1. Go to https://webrtc.github.io/samples/src/content/devices/input-output/
2. Observe that back facing camera is selected by default

What is the expected behavior?
The front facing camera is selected by default (sensible default anyway)

What went wrong?
One of the back facing cameras are selected by default, instead of the front facing one.

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 64.0.3282.137  Channel: stable
OS Version: 7.0.0
Flash Version: 

I have had no luck trying facingMode either, but I don't have a test case for that. In any case I think the front facing (user facing in the facingMode spec) should be default, or that the user is given a choice such as Firefox on Android and Opera on Android when facingMode is not set. enumerateDevices and selecting manually works, but I strongly believe the user facing camera should be default on mobile when no facingMode is present.
 
Labels: Needs-triage-Mobile
Cc: sandeepkumars@chromium.org
Labels: FoundIn-66 Target-66 FoundIn-64 FoundIn-65
Status: Untriaged (was: Unconfirmed)
Tested the issue in Android and able to reproduce the issue. Similar behavior is observed since Chrome #60.0.3072.0

Steps Followed:
1. Launched the Chrome Browser.
2. Navigated to https://webrtc.github.io/samples/src/content/devices/input-output/
2. Observed that back facing camera is selected by default

Chrome versions tested:
64.0.3282.137(Stable)

OS:
Android 6.0.1

Android Devices:
LG G5

This seems to be a Non-Regression issue as same behavior is seen since M60.  Untriaged for further input's on this issue.

Please navigate to below link for log's and video--
go/chrome-androidlogs/814298

Thanks!

Comment 3 by guidou@chromium.org, Feb 22 2018

Labels: Needs-Feedback
daginge@ or sneedpkumars@: Can you check the output of https://guidou.github.io/enumdemo.html?

Comment 4 by dagi...@gmail.com, Feb 22 2018

Output as follows:

1 - audioinput - default - Standard
2 - audioinput - 16a56ea572c60b275990100f7dd8530c1c79ed66cbe25336a8755b14470a98b6 - Speakerphone
3 - audioinput - a327d2742e64c52b9880ae1d3778b5a8906caad83e44cc003def9679e0702c78 - Headset earpiece
4 - videoinput - a327d2742e64c52b9880ae1d3778b5a8906caad83e44cc003def9679e0702c78 - camera2 2, facing back
5 - videoinput - 688872dc9aad39ac07b34b4bb2619da942a14c6b82dcfea1e8ba24df97431075 - camera2 1, facing front
6 - videoinput - 16a56ea572c60b275990100f7dd8530c1c79ed66cbe25336a8755b14470a98b6 - camera2 0, facing back
7 - audiooutput - default - Standard

Comment 5 by dagi...@gmail.com, Mar 10 2018

Any updates on this?
Owner: guidou@chromium.org
Status: Assigned (was: Untriaged)
triaging to guidou@ as owner
Cc: guidou@chromium.org
Components: -Blink>WebRTC Blink>GetUserMedia>Webcam
Owner: chfremer@chromium.org
Based on #4, it's clear that the back camera called "camera2 2, facing back" is selected because it is the first one in the enumeration.
There is no concept of system default for cameras, so what getUserMedia() does is that it selects the first one in the device enumeration.
If we want the front camera to always be the default on Android we should update the Android code (VideoCaptureDeviceFactoryAndroid) to list front cameras first.

chfremer@: Are you a good owner for this?
Cc: braveyao@chromium.org
Ah, ok that makes sense.
Yes, I am a good owner for this.
Also adding braveyao@ on cc, since he has experience with that Android code as well.
Project Member

Comment 9 by bugdroid1@chromium.org, Apr 25 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/62e590c5107a0fb6481e64feb676a1bd68dd2e4d

commit 62e590c5107a0fb6481e64feb676a1bd68dd2e4d
Author: Christian Fremerey <chfremer@chromium.org>
Date: Wed Apr 25 18:19:08 2018

[Video Capture Android] Support facing mode and list user-facing first

On Android, the facing mode of capture devices is currently reported only in
form of a string appended to the device name. This was probably a legacy
solution before facing mode has become an official field that can be queried.

This CL fills the facing mode field so that it gets reported correctly.
It then sorts device infos reported during device enumeration such that
user-facing devices get listed first. This has the effect of making them
preferred over back-facing cameras in case no facing-related constraints are
given.

Bug:  814298 
Change-Id: I366475903693401c64ed7ff3f65d39536d6c13ba
Reviewed-on: https://chromium-review.googlesource.com/1025213
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Weiyong Yao <braveyao@chromium.org>
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Commit-Queue: Christian Fremerey <chfremer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553665}
[modify] https://crrev.com/62e590c5107a0fb6481e64feb676a1bd68dd2e4d/media/base/video_facing.h
[modify] https://crrev.com/62e590c5107a0fb6481e64feb676a1bd68dd2e4d/media/capture/video/android/BUILD.gn
[modify] https://crrev.com/62e590c5107a0fb6481e64feb676a1bd68dd2e4d/media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera.java
[modify] https://crrev.com/62e590c5107a0fb6481e64feb676a1bd68dd2e4d/media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera2.java
[modify] https://crrev.com/62e590c5107a0fb6481e64feb676a1bd68dd2e4d/media/capture/video/android/java/src/org/chromium/media/VideoCaptureFactory.java
[modify] https://crrev.com/62e590c5107a0fb6481e64feb676a1bd68dd2e4d/media/capture/video/android/video_capture_device_factory_android.cc

Status: Fixed (was: Assigned)
[bulk-edit: disregard if N/A] Can the owner please set milestone to this bug if applicable?
Labels: M-68
Fix landed in 68.0.3409.0

Sign in to add a comment