Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨🚧 Multi camera support #303

Merged
merged 55 commits into from
Apr 13, 2023
Merged

✨🚧 Multi camera support #303

merged 55 commits into from
Apr 13, 2023

Conversation

istornz
Copy link
Contributor

@istornz istornz commented Apr 3, 2023

Description

CamerAwesome is now able to show multiple sensors preview! 📹

This is the most requested feature in the official camera plugin ⭐️

This PR add multi camera feature for iOS (Android will be developed soon by @apalala-dev ).

How it's work?

CamerAwesome now provide a list of Sensor. You just need what you want to display (front, back camera or telephoto, wide angle camera etc.).

First Sensor provided in the array will be displayed in fullscreen (like CamerAwesome do now), each others sensors will be added in a floating preview which can be dragged by the user.

Demo

multi cam example

This example show sensors:

  • Wide angle (back).
  • Telephoto.
  • Front

Example

CameraAwesomeBuilder.awesome(
  // [...]
  sensors: [
    Sensor.position(SensorPosition.back),
    Sensor.position(SensorPosition.front),
  ],
  // [...]
),

This sample code, show back sensor in fullscreen (because set at first).

User will seen a floating preview which is showing front camera (user will be able to drag floating preview to change it's position).

Roadmap

  • ✨ Android integration.
  • ✨ Take multiple picture from all sensors (currently, when taking a picture, only the first sensor is taken).
  • ✨ Find a way to show multiple taken pictures in examples.
  • ⚡️ Find a way to know how maximum camera is supported in one multi camera session (budget on iOS).
  • 🚸 Create a factory to define single & multi camera (intent to improve usability).
  • 🚸 Specify camera index to change zoom, brightness etc.
  • 🚸 Add ability to set config for awesome camera floating preview (position & size).
  • 📝 Add documentation.

This PR will close #131

Checklist

Before creating any Pull Request, confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]).

  • 📕 I read the Contributing page.
  • 🤝 I match the actual coding style.
  • ✅ I ran flutter analyze without any issues.

Breaking Change

  • 🛠 My feature contain breaking change.

  • Sensors enum has been renamed SensorPosition.

  • sensors attribute in CameraAwesomeBuilder now accept a list of Sensor.

@istornz istornz added enhancement New feature or request iOS iOS related issue labels Apr 3, 2023
@istornz istornz added the android Android related issue label Apr 7, 2023
@apalala-dev apalala-dev changed the base branch from master to release/v2.0.0 April 12, 2023 07:50
@apalala-dev apalala-dev merged commit c694074 into release/v2.0.0 Apr 13, 2023
@apalala-dev apalala-dev deleted the feature/multi-cam branch April 13, 2023 08:48
@aytunch
Copy link

aytunch commented May 17, 2023

@istornz thank you for your hard work. quick 2 questions:

  1. As far as I see we can preview both cameras at the same time. Can we also save these multiple video streams to separate files as well?
  2. Is there a chance we can display the multiple video stream according to our UI needs? So not full screen and maybe preview both cameras in small circular widgets in my widget tree in a row next to each other? Does the API allow developers to display previews however they like?

@Sun3
Copy link

Sun3 commented Nov 4, 2023

I am also interested in this feature, is there an update?

Also will we have the ability to save the multi camera photos merged and separate?

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android Android related issue enhancement New feature or request iOS iOS related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to capture video from multiple cameras at the same time?
4 participants