Commit 6fb47e8b authored by Wei Lee's avatar Wei Lee Committed by Commit Bot

Fix default value of mirror settings for external camera

The default value of mirror settings should be set to false only when it
is a user-facing camera. For environment-facing and external cameras,
the default value of mirror settings should be set to true.

Bug: b/140842700
Test: Tested on betty and it works as expectedly.

Change-Id: Ie864b00d8bb5cf48bbc1c33d9acb0922f1ec11ff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1808622
Commit-Queue: Wei Lee <wtlee@chromium.org>
Reviewed-by: default avatarShik Chen <shik@chromium.org>
Cr-Commit-Position: refs/heads/master@{#697166}
parent e28b279f
...@@ -224,7 +224,7 @@ cca.views.camera.Options.prototype.updateVideoDeviceId_ = function( ...@@ -224,7 +224,7 @@ cca.views.camera.Options.prototype.updateVideoDeviceId_ = function(
cca.views.camera.Options.prototype.updateMirroring_ = function(facingMode) { cca.views.camera.Options.prototype.updateMirroring_ = function(facingMode) {
// Update mirroring by detected facing-mode. Enable mirroring by default if // Update mirroring by detected facing-mode. Enable mirroring by default if
// facing-mode isn't available. // facing-mode isn't available.
var enabled = facingMode ? facingMode == 'user' : true; var enabled = facingMode ? facingMode != 'environment' : true;
// Override mirroring only if mirroring was toggled manually. // Override mirroring only if mirroring was toggled manually.
if (this.videoDeviceId_ in this.mirroringToggles_) { if (this.videoDeviceId_ in this.mirroringToggles_) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment