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

Camera plugin first working version (IOS and Android). #458

Merged
merged 86 commits into from
May 17, 2018

Conversation

quentinleguennec
Copy link
Contributor

Ready for review.

nisdis and others added 27 commits March 19, 2018 20:35
…s more gracefully. Handles app going to

background. Prevent creation of empty video files.
…ermission issue with MIC on iOS. Added support to record to file path sent by flutter on iOS.
…amera-dev

Fixes:
Removed start stop on flutter iOS and dummy calls on Android.
 Fixed permission issue with MIC on iOS.
Added support to record to file path sent by flutter on iOS.
@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again. If the bot doesn't comment, it means it doesn't think anything has changed.

@nisdis
Copy link

nisdis commented Apr 3, 2018

@googlebot I've signed the Google Corporate CLA agreement on [email protected]

@rodydavis
Copy link
Contributor

Will there be a native UI version too?
Just like how image_picker uses the stock image picker and camera. That way the camera and photo album UI is always up to date with the SDK or iOS version the app is running on.

@rodydavis
Copy link
Contributor

When I run the example on a Google Pixel everything is normal. On an iPhone 6s the first video you take is not in the preview window in the bottom and the second video is. Then every other video you take shows up in the preview window otherwise it shows white after recording.

@sigurdm
Copy link
Contributor

sigurdm commented May 8, 2018

@AppleEducate What do you mean by native UI version?
This plugin just provides access to the camera preview in a texture rectangle, and to recording movies and still pictures

@rodydavis
Copy link
Contributor

@sigurdm Native UI as in the stock camera apps on Android and iOS. That would be the full screen camera app that takes care of the flash, camera modes and selecting the camera for you. This plugin is great In Giving you access to the raw camera but it would be nice to also provide a way to ask the user for a photo or video and they can choose on from the Library or take a new one like the image picker does. It navigates to the Stock Camera application on the phone and navigates back with the file.

@sigurdm
Copy link
Contributor

sigurdm commented May 8, 2018

@AppleEducate I think that's outside the responsibilities of this plugin.
I think the behaviour you want can be obtained by combining this plugin with image_picker?

Otherwise please file a new issue at https://github.com/flutter/flutter/issues/new to have track of the discussion in the right place.

@rodydavis
Copy link
Contributor

@sigurdm I think you're right. This may be something for a media_picker plugin.

@quentinleguennec
Copy link
Contributor Author

@sigurdm @AppleEducate I've been looking into the bug with the IOS version, I tracked it down to an issue in the video player plugin. More specifically, an invokeMethod call to "dispose" is not always returning, so the preview is not playing. I'll try to fix it and submit a PR on the video player. Since this is not a bug with the camera plugin we can push the PR forward.
@sigurdm did you find anything else to fix?

@quentinleguennec
Copy link
Contributor Author

I created a new PR with a fix for the issue: PR #557
I couldn't reproduce the issue with this fix.

Fix a bug with video recording sound in IOS
@rodydavis
Copy link
Contributor

rodydavis commented May 10, 2018

@sigurdm I was able to create the plugin I was describing. Capture and Select both Photos and Videos from the Gallery and with the camera using the stock camera apps. I took the image_picker plugin and added video capability. What should I do now? Should I create a video_picker plugin and media_picker plugin that have a dependency on image_picker and video_picker or just bring all the code into media_picker?

https://github.com/AppleEducate/media_picker

@quentinleguennec
Copy link
Contributor Author

Hi @sigurdm !
Do you have any more improvements we could add to the plugin? Also, for PR #557, do you know someone I could add as reviewer?

@rodydavis
Copy link
Contributor

@sigurdm I created a Pull Request for updating image_picker to add video capability:
#565

@tecbot
Copy link

tecbot commented May 11, 2018

as @sigurdm mentioned in his PR, the aspect ratio is wired in iOS, specially if running in fullscreen and on a iPhone X. Looks like the aspect ratio of the video controller is not correctly calculated.

@@ -7,6 +7,7 @@ dependencies:
sdk: flutter
camera:
path: ../
video_player: "0.5.1"
Copy link
Contributor

Choose a reason for hiding this comment

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

This needs to be 0.5.2

Copy link
Contributor

@sigurdm sigurdm left a comment

Choose a reason for hiding this comment

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

Besides the need to use video_player 0.5.2 in the example pubspec which includes the fix, this LGTM
You can add yourself to the AUTHORs file if you want.

@quentinleguennec
Copy link
Contributor Author

@sigurdm Awesome! I updated the pubspec and the authors. Thank you for your review :)

@sigurdm sigurdm merged commit 6a7ff74 into flutter:master May 17, 2018
@sigurdm
Copy link
Contributor

sigurdm commented May 17, 2018

Thanks for all the hard work!

@norbertkross
Copy link

how do I use the camera plugin to record video

@quentinleguennec
Copy link
Contributor Author

quentinleguennec commented Aug 13, 2018 via email

Akachu pushed a commit to Akachu/flutter_camera that referenced this pull request Apr 27, 2020
Some backward incompabilities introduced. See CHANGELOG.
Version bump to 0.2.0
@Niroop4444
Copy link

Can i get to know how to mute the mic while recording?

@crankyvein
Copy link

Can you please add some more functionality
in camera plugin like changing frame rate adding filters, because others app cameras are more advanced like snapchat and Instagram but in camera plugin. We only have basic functionality like capturing image and recording videos that's it.
Please please please please please add these functionality as soon as possible because we need them.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.