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

[camera] Add web support #4240

Merged
merged 25 commits into from
Sep 20, 2021
Merged

[camera] Add web support #4240

merged 25 commits into from
Sep 20, 2021

Conversation

bselwe
Copy link
Contributor

@bselwe bselwe commented Aug 13, 2021

Adds web support to the camera plugin.

  • Added web support to the camera example app, following the instructions of the web package.
  • Updated camera README.md with the web instructions.

TODO

  • Endorse camera_web plugin.
  • Update camera version (pubspec.yaml) and CHANGELOG.md.

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.

@bselwe
Copy link
Contributor Author

bselwe commented Aug 13, 2021

@ditman @felangel

@ditman
Copy link
Member

ditman commented Aug 13, 2021

I'm going to use this to publish a demo version of the camera_web

@ditman
Copy link
Member

ditman commented Aug 13, 2021

Published here!

https://dit-vgv-camera-test.web.app

There's something weird going on with the orientation of the preview in my machine. It seems to be preferring a portrait camera rather than landscape in my laptop. Also in my phone the external camera is flipped, when it probably shouldn't? Not sure, but it's a start!! :D

@sgehrman
Copy link

There's something weird going on with the orientation of the preview in my machine. It seems to be preferring a portrait camera rather than landscape in my laptop

Same issue. Works great but I can't figure out how to force it to landscape on web.

bselwe and others added 4 commits August 25, 2021 16:18
…4239)

* chore: update camera_platform_interface to 2.1.0
* feat: add pause to Camera
* test: add Camera pause test
* feat: add pausePreview and resumePreview implementation
* test: add pausePreview and resumePreview tests
@google-cla

This comment has been minimized.

@google-cla google-cla bot added cla: no and removed cla: yes labels Aug 25, 2021
@ditman

This comment has been minimized.

@google-cla google-cla bot added cla: yes and removed cla: no labels Aug 25, 2021
@ditman
Copy link
Member

ditman commented Aug 25, 2021

@bselwe I've updated this branch slightly, please remember to pull changes!

@ditman
Copy link
Member

ditman commented Aug 27, 2021

OK, so I've deployed the latest changes to https://dit-vgv-camera-test.web.app, and now there's only one thing that bugs me slightly: the preview does not really give users a clue of what's the orientation of the camera when the photo is taken. This is especially true in mobile phones (where the preview is landscape, but the photo taken is normally in portrait mode).

However, I think this is an issue with the example app itself, rather than the plugin itself. For now, I don't think this is a release blocker, so we probably should publish the first version of the camera plugin asap, and get it in the hands of the people :) (well, more people, at least!)

@bselwe
Copy link
Contributor Author

bselwe commented Aug 30, 2021

@ditman Hm, it seems that the published demo behaves differently than when running locally. Not sure but it might be that the published version did not include some of the latest PRs/fixes. Rebased with master and reverted one unnecessary fix.

@ditman
Copy link
Member

ditman commented Aug 30, 2021

@bselwe I've deployed the latest demo, and everything that has been merged so far, here:

https://dit-vgv-camera-test.web.app

(Verified it contains up to "don't flip the preview on external cameras")

PS: You might need to refresh a few times so the new service worker (and app) kicks in :)

@ditman
Copy link
Member

ditman commented Sep 17, 2021

This needs to be rebased one last time after #4358 lands, so we only merge code changes in the camera core package.

@bselwe bselwe marked this pull request as ready for review September 17, 2021 16:09
@ditman ditman removed the request for review from bparrishMines September 17, 2021 16:10
@ditman
Copy link
Member

ditman commented Sep 18, 2021

This looks good, but I'm not endorsing a plugin at 7:30PM of a Friday, next week :P

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, let's go!

@ditman ditman merged commit 42b9909 into flutter:master Sep 20, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 20, 2021
fluttergithubbot pushed a commit to flutter/flutter that referenced this pull request Sep 20, 2021
amantoux pushed a commit to amantoux/plugins that referenced this pull request Sep 27, 2021
* feat: add web to the example app
* docs: update README and point users to camera_web for more web-specific info.
NickalasB added a commit to NickalasB/plugins that referenced this pull request Sep 27, 2021
* master: (51 commits)
  [webview_flutter] Update version number app_facing package (flutter#4375)
  [webview_flutter] Adjust integration test domains (flutter#4383)
  Remove some trivial custom analysis options files (flutter#4379)
  [google_maps_flutter_platfomr_interface] Add Marker drag events (flutter#2653)
  [flutter_plugin_tools] Improve version check error handling (flutter#4376)
  [flutter_plugin_tools] Allow overriding breaking change check (flutter#4369)
  [url_launcher] Error handling when URL cannot be parsed with Uri.parse (flutter#4365)
  [webview_flutter] Migrate main package to fully federated architecture. (flutter#4366)
  [google_sign_in] Bump minimum Flutter version and iOS deployment target (flutter#4334)
  Add false secret lists, and enforce ordering (flutter#4372)
  [camera_web] Update usage documentation (flutter#4371)
  [video_player] VTT Support (flutter#2878)
  Require authors file (flutter#4367)
  [flutter_plugin_tools] Fix federated safety check (flutter#4368)
  [webview_flutter] Extract WKWebView implementation into a separate package (flutter#4345)
  [webview_flutter] Extract Android implementation into a separate package (flutter#4343)
  [in_app_purchase] Ensure the `introductoryPriceMicros` field is populated correctly. (flutter#4364)
  [flutter_plugin_tools] Add a federated PR safety check (flutter#4329)
  [camera] Add web support (flutter#4240)
  [webview_flutter] Bump minimum Flutter version and iOS deployment target (flutter#4361)
  ...

# Conflicts:
#	packages/webview_flutter/webview_flutter/lib/platform_interface.dart
#	packages/webview_flutter/webview_flutter/lib/src/webview_method_channel.dart
#	packages/webview_flutter/webview_flutter/lib/webview_flutter.dart
clocksmith pushed a commit to clocksmith/flutter that referenced this pull request Oct 29, 2021
KyleFin pushed a commit to KyleFin/plugins that referenced this pull request Dec 21, 2021
* feat: add web to the example app
* docs: update README and point users to camera_web for more web-specific info.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants