EnsembleUI / ensemble

Build native apps 20x faster than Flutter, RN or any other tech
https://ensembleui.com/
BSD 3-Clause "New" or "Revised" License
119 stars 15 forks source link

Camera integration #128

Closed amin-nas closed 1 year ago

amin-nas commented 1 year ago
  1. User can access the camera (photo/video) and device gallery via Ensemble Action (e.g. button click). Here's a sample action (also see showDialog action for implementation reference):

    Button:
    label: Open Camera
    onTap:
    action: openCamera
    options:
      useGallery: true              # see below for all options
    onComplete:
      //@code
      # access to the files here, which could be empty
  2. When this action is taken, open this camera widget in full screen. Image

  3. Once the user have complete this Action (either take or pick a file or decide to cancel), the camera popup will close and invoke the Action callback onComplete, which will have reference to the files (if any).

These are all the options the user can pass in:

These are not explicit options but implied automatically:



Outdated specs (for reference):

@hamxa152 There are two modes -

  1. Camera - this puts the camera either inline on the page or as full screen view (if configured)
  2. ImagePicker - this puts a button on the page. When user clicks on the button, it launches either the camera or the photo picker depending on what's configured.

Camera should have the following properties - All these properties are optional.

Image_Picker should be able to launch the Camera or just the gallery

Please review these and let us know if any of these is not supported in Flutter package. We can skip those for now that are not supported.

@vusters please review

kmahmood74 commented 1 year ago

this is the same as #131

JasPanesar commented 1 year ago

From a Camera integration perspective - would it be a stretch to leave the above parameters in place but also support video capture from both cameras for what is built into the Flutter package?

Thanks!

kmahmood74 commented 1 year ago

@JasPanesar are you suggesting capturing video from both front and back cameras at the same time? I know some phones have that capability but not sure if it is yet supported in a flutter package. do you know of a flutter package that supports it?

If you are suggesting capturing video from front or back camera independently, yes that will be supported as the user can just flip the camera inside the camera view. We can add a configuration for which camera to turn on by default. That's a good idea. I'll update the configuration. Thank you

JasPanesar commented 1 year ago

@kmahmood74 My initial is support for recording video with the front or back camera for iOS/Android and Web in addition to photos. In my case, I'm looking to tap a record button and it instantly starts to record video (ideally from a default camera).

I've found "low/no code" platforms often are missing the ability to record video from either camera, and sometimes "Camera" functionality is limited to photo capture only.

Recording both cameras at the same time would be amazing and very helpful. I've seen it in apps but can do some digging for a library. If that should be in a different request let me know.

kmahmood74 commented 1 year ago

@JasPanesar got it, thank you for explaining it. Yes, we will certainly be adding he ability to record video along with taking pictures from the camera. Ensemble is a platform for building front-ends for all types of apps.

Have you tried it? If not, give it a shot and let us know what you think. https://ensembleui.com and click on Start for Free on top right.

vusters commented 1 year ago

@snehmehta please close this if no longer applies after your work.

snehmehta commented 1 year ago

369 resolved