[image_picker] Add videoQuality parameter - platform_interface#11144
[image_picker] Add videoQuality parameter - platform_interface#11144Koichi5 wants to merge 1 commit intoflutter:mainfrom
Conversation
Adds VideoQuality enum and an optional quality parameter to getVideo in the platform interface. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging. If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group. |
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Code Review
This pull request introduces a videoQuality parameter to allow selecting video quality when picking videos. It adds a VideoQuality enum and updates the getVideo method in the platform interface and its implementations. My review has identified a few critical issues where the new quality parameter is not correctly passed through all code paths, specifically in MethodChannelImagePicker and CameraDelegatingImagePickerPlatform. Additionally, I've suggested an improvement to the documentation for the new VideoQuality enum to clarify its behavior on Android.
| required ImageSource source, | ||
| CameraDevice preferredCameraDevice = CameraDevice.rear, | ||
| Duration? maxDuration, | ||
| VideoQuality quality = VideoQuality.high, |
| required ImageSource source, | ||
| CameraDevice preferredCameraDevice = CameraDevice.rear, | ||
| Duration? maxDuration, | ||
| VideoQuality quality = VideoQuality.high, |
There was a problem hiding this comment.
|
|
||
| /// Video quality setting for video recording/picking. | ||
| /// | ||
| /// This enum corresponds to `UIImagePickerControllerQualityType` on iOS. |
Description
Adds
VideoQualityenum and an optionalqualityparameter togetVideoin the platform interface, so callers can choose low, medium, or high quality
when recording or picking video. Defaults to high quality for backward compatibility.
Part 1 of 3 for flutter/flutter#179940
Related PRs
Pre-Review Checklist
[shared_preferences]///).