Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

[camera_web] Do not flip the video on the back camera #4281

Merged
merged 3 commits into from Aug 30, 2021
Merged

[camera_web] Do not flip the video on the back camera #4281

merged 3 commits into from Aug 30, 2021

Conversation

bselwe
Copy link
Contributor

@bselwe bselwe commented Aug 27, 2021

Before, the video was flipped on all cameras making a video incorrectly mirrored when taken from a back camera. Now, the video is not flipped on the back camera.

Part of flutter/flutter#45297.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the relevant style guides and ran the auto-formatter. (Note that unlike the flutter/flutter repo, the flutter/plugins repo does use dart format.)
  • I signed the CLA.
  • The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • I listed at least one issue that this PR fixes in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
  • I updated CHANGELOG.md to add a description of the change.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test exempt.
  • All existing and new tests are passing.

Copy link
Member

@ditman ditman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Comment on lines +192 to +196
if (!isBackCamera) {
canvas.context2D
..translate(videoWidth, 0)
..scale(-1, 1);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will probably need to be applied per-frame (somehow) when recording video.

@ditman ditman merged commit 18129d6 into flutter:master Aug 30, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 30, 2021
NickalasB added a commit to NickalasB/plugins that referenced this pull request Sep 7, 2021
* master: (490 commits)
  Allow neutral conclusion in publishing check (flutter#4321)
  Revert "[image_picker] add forceFullMetadata to interface" (flutter#4314)
  [image_picker] add forceFullMetadata to interface (flutter#4288)
  [flutter_plugin_tools] Adjust diff logging (flutter#4312)
  Remove gradle.properties from plugins (flutter#4309)
  build-examples .pluginToolsConfig.yaml support (flutter#4305)
  [camera_web] Make plugin publishable for the first time. (flutter#4304)
  adds option to re-authenticate on google silent sign in (flutter#4251)
  [ci.yaml] Add builders to recipes cq (flutter#4306)
  Add scripts for Windows LUCI recipe (flutter#4303)
  [video_player] Ensure seekTo is not called before video player is initialized.  (flutter#4300)
  Ensure setExposureOffset returns new value on Android (flutter#4301)
  Add a way to opt a file out of Dart formatting (flutter#4292)
  [flutter_plugin_tools] Add Linux support to native-test (flutter#4294)
  [image_picker]Android update cache (flutter#4124)
  [flutter_plugin_tools] Fix build-examples for packages (flutter#4248)
  [flutter_plugin_tool] Migrate 'publish' to new base command (flutter#4290)
  [flutter_plugin_tool] Move branch-switching logic from tool_runner.sh to tool (flutter#4268)
  [flutter_plugin_tool] Add support for running Windows unit tests (flutter#4276)
  [camera_web] Do not flip the video on the back camera (flutter#4281)
  ...

# Conflicts:
#	packages/webview_flutter/webview_flutter/CHANGELOG.md
#	packages/webview_flutter/webview_flutter/android/src/main/java/io/flutter/plugins/webviewflutter/FlutterWebView.java
#	packages/webview_flutter/webview_flutter/pubspec.yaml
fotiDim pushed a commit to fotiDim/plugins that referenced this pull request Sep 13, 2021
* feat: do not flip the video on the back camera

* test: do not flip the video on the back camera tests

* feat: update getVideoSize usage
amantoux pushed a commit to amantoux/plugins that referenced this pull request Sep 27, 2021
* feat: do not flip the video on the back camera

* test: do not flip the video on the back camera tests

* feat: update getVideoSize usage
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants